
Recherche avancée
Autres articles (58)
-
Les formats acceptés
28 janvier 2010, parLes commandes suivantes permettent d’avoir des informations sur les formats et codecs gérés par l’installation local de ffmpeg :
ffmpeg -codecs ffmpeg -formats
Les format videos acceptés en entrée
Cette liste est non exhaustive, elle met en exergue les principaux formats utilisés : h264 : H.264 / AVC / MPEG-4 AVC / MPEG-4 part 10 m4v : raw MPEG-4 video format flv : Flash Video (FLV) / Sorenson Spark / Sorenson H.263 Theora wmv :
Les formats vidéos de sortie possibles
Dans un premier temps on (...) -
Ajouter notes et légendes aux images
7 février 2011, parPour pouvoir ajouter notes et légendes aux images, la première étape est d’installer le plugin "Légendes".
Une fois le plugin activé, vous pouvez le configurer dans l’espace de configuration afin de modifier les droits de création / modification et de suppression des notes. Par défaut seuls les administrateurs du site peuvent ajouter des notes aux images.
Modification lors de l’ajout d’un média
Lors de l’ajout d’un média de type "image" un nouveau bouton apparait au dessus de la prévisualisation (...) -
Le profil des utilisateurs
12 avril 2011, parChaque utilisateur dispose d’une page de profil lui permettant de modifier ses informations personnelle. Dans le menu de haut de page par défaut, un élément de menu est automatiquement créé à l’initialisation de MediaSPIP, visible uniquement si le visiteur est identifié sur le site.
L’utilisateur a accès à la modification de profil depuis sa page auteur, un lien dans la navigation "Modifier votre profil" est (...)
Sur d’autres sites (7028)
-
How to code Laravel FFMpeg video conversion for specific parameters ?
7 octobre 2022, par Wayne FulcherI am using Laravel 9.x running php 8.1.x.
I have some code that I use to convert videos that have a context type other than video/mp4 to a H264 format. The reason is to make a video format that is compatible with Apple (iOS), Android and most web browsers. This code has worked so far on every video we have used it on except for one.
My current code is


$ffmpeg = FFMpeg::create();
 $video = $ffmpeg->open($videoFilename);
 $format = new X264();
 $format->setAudioCodec("aac"); 
 $video->save($format, $newFilename);



So in an attempt to debug what else needs to be done I started manually running ffmpeg commands on my computer against a copy of the video in question. I have finally figured out what additional parameters are required to successfully convert that video so it plays on all devices. The manual command is as follows :


ffmpeg -i input.mov -pix_fmt yuv420p -b:v 4000k -c:v libx264 output.mp4



I am about 90% sure the parameters that dealt with the specifics of this video were the following :


-pix_fmt yuv420p -b:v 4000k


My problem now is I can not figure out what changes to my php code I need to make that would be the equivalent to those additional command line parameters.
Also I am wondering as I am typing this question, is there a way for me to "auto-detect" when a video requires this additional parameters or not ? (maybe that is a second post/question)


-
mips/mathops : remove 64-bit code
26 février 2015, par James Cowgillmips/mathops : remove 64-bit code
GCC is perfectly happy generating optimized multiplication code on its own for
64-bit arches. GCC refuses to optimize the loongson code when in 32-bit mode,
so I’ve left that.Signed-off-by : James Cowgill <james410@cowgill.org.uk>
Signed-off-by : Michael Niedermayer <michaelni@gmx.at> -
Issues in executing FFmpeg command in Java code in Linux
12 août 2017, par Tina JI have problems executing this
ffmpeg
command in my java code :ffmpeg -i sample.mp4 -i ad.mp4 -filter_complex "[0:v]trim=0:15,setpts=PTS-STARTPTS[v0]; [1:v]trim=0:5,setpts=PTS-STARTPTS[v1]; [0:v]trim=20:30,setpts=PTS-STARTPTS[v2]; [v0][v1][v2]concat=n=3:v=1:a=0[out]" -map "[out]" output.mp4
I used the
getRuntime()
method below, but that doesn’t work for me. Even if I simply remove the"
, still it doesn’t work. When I simply copy-paste the equivalent string in terminal, it works.String c1=" -i "+dir+"sample.mp4 "+"-i "+dir+"ad.mp4 -filter_complex [0:v]trim=0:15,setpts=PTS-STARTPTS[v0]; [1:v]trim=0:5,setpts=PTS-STARTPTS[v1]; [0:v]trim=20:30,setpts=PTS-STARTPTS[v2]; [v0][v1][v2]concat=n=3:v=1:a=0[out] -map [out] "+dir+"output.mp4";
RunCommand("ffmpeg"+c1);Using this method :
private static void RunCommand(String command) throws InterruptedException {
try {
// Execute command
Process proc = Runtime.getRuntime().exec(command);
System.out.println(proc.exitValue());
// Get output stream to write from it
// Read the output
BufferedReader reader =
new BufferedReader(new InputStreamReader(proc.getInputStream()));
String line = "";
while((line = reader.readLine()) != null) {
System.out.print(line + "\n");
// System.out.println(ads.get(0));
}
proc.waitFor();
} catch (IOException e) {
}
}This one doesn’t work also, and printing the exit value shows this :
Exception in thread "main" java.lang.IllegalThreadStateException: process hasn't exited
at java.lang.UNIXProcess.exitValue(UNIXProcess.java:423)
at parser.Parser.RunCommand(Parser.java:106)
at parser.Parser.commandGenerator2(Parser.java:79)
at parser.Parser.main(Parser.java:44)If I move the
proc.waitFor();
before printing the exit value, it is1
.What is the problem ? Why it doesn’t run in Java code ?