
Recherche avancée
Médias (1)
-
La conservation du net art au musée. Les stratégies à l’œuvre
26 mai 2011
Mis à jour : Juillet 2013
Langue : français
Type : Texte
Autres articles (46)
-
Participer à sa traduction
10 avril 2011Vous pouvez nous aider à améliorer les locutions utilisées dans le logiciel ou à traduire celui-ci dans n’importe qu’elle nouvelle langue permettant sa diffusion à de nouvelles communautés linguistiques.
Pour ce faire, on utilise l’interface de traduction de SPIP où l’ensemble des modules de langue de MediaSPIP sont à disposition. ll vous suffit de vous inscrire sur la liste de discussion des traducteurs pour demander plus d’informations.
Actuellement MediaSPIP n’est disponible qu’en français et (...) -
Personnaliser les catégories
21 juin 2013, parFormulaire de création d’une catégorie
Pour ceux qui connaissent bien SPIP, une catégorie peut être assimilée à une rubrique.
Dans le cas d’un document de type catégorie, les champs proposés par défaut sont : Texte
On peut modifier ce formulaire dans la partie :
Administration > Configuration des masques de formulaire.
Dans le cas d’un document de type média, les champs non affichés par défaut sont : Descriptif rapide
Par ailleurs, c’est dans cette partie configuration qu’on peut indiquer le (...) -
Participer à sa documentation
10 avril 2011La documentation est un des travaux les plus importants et les plus contraignants lors de la réalisation d’un outil technique.
Tout apport extérieur à ce sujet est primordial : la critique de l’existant ; la participation à la rédaction d’articles orientés : utilisateur (administrateur de MediaSPIP ou simplement producteur de contenu) ; développeur ; la création de screencasts d’explication ; la traduction de la documentation dans une nouvelle langue ;
Pour ce faire, vous pouvez vous inscrire sur (...)
Sur d’autres sites (7371)
-
How would I get a Java program that uses FFmpeg to work on other machines ?
13 mars 2024, par user18730690I have a Java program that records the user's screen and microphone audio, combines them by converting the video into an avi file and combining the .wav and .avi file (both converting the video into an .avi and the combining them use FFmpeg in the Java file using ProcessBuilder), and it spits out a .mp4 file that has both the microphone audio and the desktop visuals. When I run it on my machine it works fine, and while it works to some extent on other machines, it doesn't execute the FFmpeg code's functions (such as combining the audio and visuals). Is there anyway to either install FFmpeg automatically when the program first runs or not have the other machine need to install FFmpeg or otherwise ? This is meant for other users to utilize and I think it would be a pain for people to have to install FFmpeg individually.


I have tried to bundle the ffmpeg.exe with the program and install it after it runs but it doesn't seem to install it as I intended it to do :


public static void installFFmpeg() {
 try {
 // Get the directory where the FFmpeg binary will be installed
 String installDir = System.getProperty("user.home") + File.separator + "ffmpeg";

 // Create the installation directory if it doesn't exist
 Files.createDirectories(Paths.get(installDir));

 // Extract FFmpeg binary from resources to the installation directory
 extractResource("/ffmpeg/ffmpeg.exe", installDir + File.separator + "ffmpeg.exe");

 // Set the environment variable for FFmpeg binary path
 System.setProperty("ffmpeg.path", installDir);
 System.out.println("FFmpeg installed successfully.");

 } catch (IOException e) {
 System.err.println("Error installing FFmpeg: " + e.getMessage());
 }
 }

 public static void extractResource(String resourceName, String targetPath) throws IOException {
 InputStream inputStream = MainScreenRecorderFrame.class.getResourceAsStream(resourceName);
 if (inputStream != null) {
 try (FileOutputStream outputStream = new FileOutputStream(targetPath)) {
 byte[] buffer = new byte[1024];
 int length;
 while ((length = inputStream.read(buffer)) != -1) {
 outputStream.write(buffer, 0, length);
 }
 }
 } else {
 throw new IOException("Resource not found: " + resourceName);
 }
 }
 //FFmpeg installation end```





-
java bufferedimage array data immediately changes
26 mars 2016, par kenimport javax.imageio.ImageIO;
import org.bytedeco.javacv.FFmpegFrameGrabber;
public class FrameData
{
int count = 0;
int picWidth;
int picHeight;
BufferedImage img = null;
//GET FRAME COUNT
public int gf_count(int numofFrames, BufferedImage[] frameArray, String fileLocationsent, String videoNamesent) throws IOException
{
String fileLocation = fileLocationsent;
String videoName = videoNamesent;
int frameNums = numofFrames;
int totFrames = 0;
FFmpegFrameGrabber grab = new FFmpegFrameGrabber(fileLocation + videoName);
try { grab.start(); }
catch (Exception e) { System.out.println("Unable to grab frames"); }
for(int i = 0 ; i < frameNums ; i++)
{
try
{
frameArray[i]= grab.grab().getBufferedImage();
totFrames = i;
File outputfile = new File(fileLocation + "GrayScaledImage" + i + ".jpg");
ImageIO.write(frameArray[i], "jpg", outputfile);
}
catch (Exception e) { /*e.printStackTrace();*/ }
}//END for
return totFrames;
}//END METHOD long getFrameCount()Hope someone can explain this to me...
I am just learning java so here goes...
I wrote this code to count the number of frames in a .mov file and to test my buffered image array I generated files of the images. As the code is, it works as planned... The problem is immediately after the capturing, if I send the bufferedimages out as files, they all seem to be just the first image. see example below...for(int i = 0 ; i < frameNums ; i++)
{
try
{
frameArray[i]= grab.grab().getBufferedImage();
totFrames = i;
File outputfile = new File(fileLocation + "GrayScaledImage" + i + ".jpg");
ImageIO.write(frameArray[i], "jpg", outputfile);
}
catch (Exception e) { /*e.printStackTrace();*/ }
}//END forAnd now if I change that to...
for(int i = 0 ; i < frameNums ; i++)
{
try
{
frameArray[i]= grab.grab().getBufferedImage();
totFrames = i; catch (Exception e) { /*e.printStackTrace();*/ }}
for(int j = 0; j < frameNums; j++)
{
File outputfile = new File(fileLocation + "GrayScaledImage" + j + ".jpg");
ImageIO.write(frameArray[j], "jpg", outputfile);
}I don’t understand why I am getting the same image repeatedly.
If further information Is required, just lemme know, this is my first programming question online... Usually find what I am looking for that others have asked. Couldn’t find this one.
Thanks for your time
Ken -
Convert FLV to Mp4 using Java CV 0.8 and FFMPEG in Android
22 février 2016, par Muthukumar SI am new to FFMPEG and JAVA CV. i recorded flv format frames then how to convert flv to mp4 videos programmatically.I am using recor activity code from samples folder. Advance Thanks for help.