
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 (83)
-
Emballe médias : à quoi cela sert ?
4 février 2011, parCe plugin vise à gérer des sites de mise en ligne de documents de tous types.
Il crée des "médias", à savoir : un "média" est un article au sens SPIP créé automatiquement lors du téléversement d’un document qu’il soit audio, vidéo, image ou textuel ; un seul document ne peut être lié à un article dit "média" ; -
Gestion des droits de création et d’édition des objets
8 février 2011, parPar défaut, beaucoup de fonctionnalités sont limitées aux administrateurs mais restent configurables indépendamment pour modifier leur statut minimal d’utilisation notamment : la rédaction de contenus sur le site modifiables dans la gestion des templates de formulaires ; l’ajout de notes aux articles ; l’ajout de légendes et d’annotations sur les images ;
-
Supporting all media types
13 avril 2011, parUnlike most software and media-sharing platforms, MediaSPIP aims to manage as many different media types as possible. The following are just a few examples from an ever-expanding list of supported formats : images : png, gif, jpg, bmp and more audio : MP3, Ogg, Wav and more video : AVI, MP4, OGV, mpg, mov, wmv and more text, code and other data : OpenOffice, Microsoft Office (Word, PowerPoint, Excel), web (html, CSS), LaTeX, Google Earth and (...)
Sur d’autres sites (3916)
-
Batch concatenate pairs of videos
19 février 2021, par dellyiceI have a directory with 1000+ video files. I'd like to concatenate them two-by-two.


An alphabetical ordering of the files give the desired pairs, e.g., the input files


filename_1.mp4
 filename_2.mp4
 filename_3.mp4
 filename_4.mp4
 ...



should result in output files


filename_1-2.mp4
 filename_3-4.mp4
 ...



They input files all have the same dimensions and formats.


How can I write a batch script invoking
ffmpeg
to achieve this ?

-
FFmpeg throws exception while process the commands
4 juin 2014, par Arslan AhmadI am executing commands through process but it always throw this error anyone help me ?
FFMPEGCommand :
String[] ffmpegCommand = {"/data/data/com.example.app/ffmpeg", "-r", ""+VIDEO_FRAME_RATE, "-b", "1000", "-vcodec", "mjpeg", "-i", Environment.getExternalStorageDirectory().getPath() + "/com.example.app/frame_%05d.jpg", Environment.getExternalStorageDirectory().getPath() + "/video.mov"};
ffmpegProcess = new ProcessBuilder(ffmpegCommand).redirectErrorStream(true).start();
W/System.err(29844): java.io.IOException: Error running exec(). Command: [/data/data/com.example.app/ffmpeg, -r, 18, -b, 1000, -vcodec, mjpeg, -i, /storage/emulated/0/com.example.app/frame_%05d.jpg, /storage/emulated/0/video.mov] Working Directory: null Environment: [ANDROID_ROOT=/system, EMULATED_STORAGE_SOURCE=/mnt/shell/emulated, LOOP_MOUNTPOINT=/mnt/obb, EMULATED_STORAGE_TARGET=/storage/emulated, ANDROID_BOOTLOGO=1, LD_LIBRARY_PATH=/vendor/lib:/system/lib, EXTERNAL_STORAGE=/storage/emulated/legacy, ANDROID_SOCKET_zygote=11, ANDROID_DATA=/data, PATH=/sbin:/vendor/bin:/system/sbin:/system/bin:/system/xbin, ANDROID_ASSETS=/system/app, ASEC_MOUNTPOINT=/mnt/asec, BOOTCLASSPATH=/system/framework/core.jar:/system/framework/conscrypt.jar:/system/framework/okhttp.jar:/system/framework/core-junit.jar:/system/framework/bouncycastle.jar:/system/framework/ext.jar:/system/framework/framework.jar:/system/framework/framework2.jar:/system/framework/telephony-common.jar:/system/framework/voip-common.jar:/system/framework/mms-common.jar:/system/framework/android.policy.jar:/system/framework/services.jar:/system/framework/apache-xml.jar:/system/framework/webviewchromium.jar:/system/framework/oem-services.jar:/system/framework/qcmediaplayer.jar, ANDROID_PROPERTY_WORKSPACE=9,0, ANDROID_STORAGE=/storage]
06-02 12:21:36.660: W/System.err(29844): at java.lang.ProcessManager.exec(ProcessManager.java:211)
06-02 12:21:36.660: W/System.err(29844): at java.lang.ProcessBuilder.start(ProcessBuilder.java:195)
06-02 12:21:36.662: W/System.err(29844): at com.example.app.FFMPEGRecorderActivity$ProcessVideo.doInBackground(FFMPEGRecorderActivity.java:1448)
06-02 12:21:36.662: W/System.err(29844): at com.example.app.FFMPEGRecorderActivity$ProcessVideo.doInBackground(FFMPEGRecorderActivity.java:1)
06-02 12:21:36.662: W/System.err(29844): at android.os.AsyncTask$2.call(AsyncTask.java:288)
06-02 12:21:36.663: W/System.err(29844): at java.util.concurrent.FutureTask.run(FutureTask.java:237)
06-02 12:21:36.663: W/System.err(29844): at android.os.AsyncTask$SerialExecutor$1.run(AsyncTask.java:231)
06-02 12:21:36.663: W/System.err(29844): at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1112)
06-02 12:21:36.663: W/System.err(29844): at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:587)
06-02 12:21:36.663: W/System.err(29844): at java.lang.Thread.run(Thread.java:841)
06-02 12:21:36.664: W/System.err(29844): Caused by: java.io.IOException: No such file or directory
06-02 12:21:36.665: W/System.err(29844): at java.lang.ProcessManager.exec(Native Method)
06-02 12:21:36.666: W/System.err(29844): at java.lang.ProcessManager.exec(ProcessManager.java:209)
06-02 12:21:36.667: W/System.err(29844): ... 9 more -
ffmpeg video conversion creates empty file when using php's exec()
23 juillet 2014, par Rob Avery IVWhen I run
ffmpeg
with PHP’sexec()
function to convert a video to flv, the flv file ends up empty. Here is the code I have that does the conversion :// Set our source file
$srcFile = "/path/to/file/".$filename."mp4";
$destFile = "/path/to/file/".$filename;
$ffmpegPath = "ffmpeg";
// Create our FFMPEG-PHP class
$ffmpegObj = new ffmpeg_movie($srcFile);
// Save our needed variables
$srcWidth = makeMultipleTwo($ffmpegObj->getFrameWidth());
$srcHeight = makeMultipleTwo($ffmpegObj->getFrameHeight());
$srcFPS = $ffmpegObj->getFrameRate();
$srcAB = intval($ffmpegObj->getAudioBitRate()/1000);
$srcAR = $ffmpegObj->getAudioSampleRate();
// Call our convert using exec()
$command = $ffmpegPath . " -i " . $srcFile . " -ar " . $srcAR . " -ab " . $srcAB . "k -f flv -s " . $srcWidth . "x" . $srcHeight . " " . $destFile . "> /dev/null 2>/dev/null &";
exec($command);Before I execute the code above, I have an mp4 file this is uploaded which is the one mentioned in the variable
$srcFile
. when uploaded, that file is not empty and I am to use it like a normal video file.Afterwards, there will be both
filename.mp4
andfilename
(formated toflv
video. yes, I’ve tried giving it an .flv extension and nothing different happens) files.filename
ends up empty. To make sure it’s running the right command, I did anvar_dump($command)
to see the command that was actually running. I got this result :ffmpeg -i /path/to/file/filename.mp4 -ar 44100 -ab 70k -f flv -s 640x480 /path/to/file/filename
I then run
exec()
function like this$output = "";
exec($command, $output);
var_dump($output);and like this
$output = exec($command);
var_dump($output);Both times,
$output
is presented as an empty array. Then, I run theffmpeg
command mentioned above through command line. And it worked. It created the flv file and it wasn’t empty and I was able to use as a regular video file with no problems.I also tried adding
> /dev/null 2>/dev/null &
at the end of the command and it still didn’t work.To sum up, so far, when
ffmpeg
is used to convert videos with php’sexec()
, it creates the converted as an empty. Though, if I was to take the same command used withexec()
and use it through command line, it works perfectly fine.I’m stumped. I’ve been tackling this for days and haven’t really gotten anywhere. Where I going wrong ? Is there a different or better way of doing this ? Am I missing something ?