
Recherche avancée
Autres articles (45)
-
Des sites réalisés avec MediaSPIP
2 mai 2011, parCette page présente quelques-uns des sites fonctionnant sous MediaSPIP.
Vous pouvez bien entendu ajouter le votre grâce au formulaire en bas de page. -
MediaSPIP v0.2
21 juin 2013, parMediaSPIP 0.2 est la première version de MediaSPIP stable.
Sa date de sortie officielle est le 21 juin 2013 et est annoncée ici.
Le fichier zip ici présent contient uniquement les sources de MediaSPIP en version standalone.
Comme pour la version précédente, il est nécessaire d’installer manuellement l’ensemble des dépendances logicielles sur le serveur.
Si vous souhaitez utiliser cette archive pour une installation en mode ferme, il vous faudra également procéder à d’autres modifications (...) -
MediaSPIP version 0.1 Beta
16 avril 2011, parMediaSPIP 0.1 beta est la première version de MediaSPIP décrétée comme "utilisable".
Le fichier zip ici présent contient uniquement les sources de MediaSPIP en version standalone.
Pour avoir une installation fonctionnelle, il est nécessaire d’installer manuellement l’ensemble des dépendances logicielles sur le serveur.
Si vous souhaitez utiliser cette archive pour une installation en mode ferme, il vous faudra également procéder à d’autres modifications (...)
Sur d’autres sites (6084)
-
ffmpeg images to video with different start times and durations
25 mai 2018, par RichI’ve recently learned of FFMPEG’s existence and I am trying to use it on my wordpress site.
On the site I am working on a html/php/js form page that lets users upload pictures, and set when the image shows and for how long.
Right now the code I have is only showing one image for the entire video.
<?php if (isset($_POST['button'])) {
echo shell_exec('ffmpeg -t '.$cap_1.' -i /myurl/beach-1866431.jpg -t '.$cap_2.' -i /myurl/orlando-1104481-1.jpg -filter_complex "scale=1280:-2" -i /myurl/audio.mp3 -c:v libx264 -pix_fmt yuv420p -t 30 -y /myurl/'.$v_title.'.mp4 2>&1');
} ?>I tried setting "-t" for the duration with my php variables but nothing changes and I cant figure out what to use for the start time of each image.
Also, when writing shell_exec commands, instead of it all being on one line, is there a way to write working command code in php files with line breaks ? For example -
<?php if (isset($_POST['button'])) {
echo shell_exec('ffmpeg -t '.$cap_1.' -i /myurl/beach-1866431.jpg
-t '.$cap_2.' -i /myurl/orlando-1104481-1.jpg
-filter_complex "scale=1280:-2"
-i /myurl/audio.mp3
-c:v libx264 -pix_fmt yuv420p -t 30 -y /myurl/'.$v_title.'.mp4 2>&1');
} ?>EDIT
So far the concat text file seems to work, however I do not know how to set the start times for each image ---
ffconcat version 1.0
file /path/beach-1866431.jpg
duration 3
file /path/orlando-1104481-1.jpg
duration 5
file /path/beach-1866431.jpgAnd ffmpeg command -
shell_exec('ffmpeg -f concat -safe 0 -i /path/file.txt -filter_complex "scale=1280:-2" -i /path/audio.mp3 -c:v libx264 -pix_fmt yuv420p -t 30 -y /path/'.$v_title.'.mp4 2>&1');
EDIT 2
Using the concat method suggested, my code now looks like this —
<?php if (isset($_POST['button'])) {
echo shell_exec('ffmpeg \
-loop 1 -framerate 24 -t 10 -i goldmetal.jpg \
-i 3251.mp3 \
-loop 1 -framerate 24 -t 10 -i cash-register-1885558.jpg \
-loop 1 -framerate 24 -t 10 -i ice-1915849.jpg \
-filter_complex "[0:v][1:a][2:v][3:v]concat=n=4:v=1:a=1[v][a]" -map "[v]" -map "[a]" -c:v libx264 /path/'.$v_title.'.mp4 2>&1');
} ?>But I’m getting this error —
**Stream specifier ':v' in filtergraph description [0:v][1:a][2:v][3:v]concat=n=4:v=1:a=1[v][a] matches no streams.**
EDIT 3
I almost got it working as needed, using 2 commands, one for the images and fade, the other to combine the audio. The only issue I’m having is changing the time each image shows up. —
echo shell_exec('ffmpeg \
-loop 1 -t 5 -i '.$thepath .'/'.$v_pix1.' \
-loop 1 -t 5 -i ' .$thepath . '/cash-register-1885558.jpg \
-loop 1 -t 5 -i ' .$thepath . '/ice-1915849.jpg \
-loop 1 -t 5 -i '.$thepath .'/'.$v_pix1.' \
-loop 1 -t 5 -i ' .$thepath . '/ice-1915849.jpg \
-filter_complex \
"[0:v]setpts=PTS-STARTPTS,fade=t=out:st=4:d=1,scale=1280:720,setdar=16/9,setsar=sar=300/300[v0]; \
[1:v]setpts=PTS-STARTPTS,fade=t=in:st=0:d=1,fade=t=out:st=4:d=1,scale=1280:720,setdar=16/9,setsar=sar=300/300[v1]; \
[2:v]setpts=PTS-STARTPTS,fade=t=in:st=0:d=1,fade=t=out:st=4:d=1,scale=1280:720,setdar=16/9,setsar=sar=300/300[v2]; \
[3:v]setpts=PTS-STARTPTS,fade=t=in:st=0:d=1,fade=t=out:st=4:d=1,scale=1280:720,setdar=16/9,setsar=sar=300/300[v3]; \
[4:v]setpts=PTS-STARTPTS,fade=t=in:st=0:d=1,fade=t=out:st=4:d=1,scale=1280:720,setdar=16/9,setsar=sar=300/300[v4]; \
[v0][v1][v2][v3][v4]concat=n=5:v=1:a=0,format=yuv420p[v]" -map "[v]" -y '.$thepath .'/fadeout.mp4 2>&1');
echo shell_exec('ffmpeg \
-i '.$thepath .'/fadeout.mp4 \
-i '.$thepath .'/3251.mp3 \
-filter_complex "[0:v:0][1:a:0] concat=n=1:v=1:a=1 [vout] [aout]" -map "[vout]" -map "[aout]" -c:v libx264 -r 1 -y '.$thepath .'/mergetest.mp4 2>&1'); -
avcodec/nvdec : Make vp8 initialisation more 'compatible'
27 novembre 2017, par Philip Langdaleavcodec/nvdec : Make vp8 initialisation more 'compatible'
Ancient versions of gcc (pre 4.6) can't directly initialise
members of anonymous inner unions/structs by name.https://gcc.gnu.org/bugzilla/show_bug.cgi?id=10676
Unfortunately, RHEL 6 shipped with one of these ancient
versions and so we're stuck with it until approximately the
heat death of the universe.Putting explicit braces into the initialisation is possibly a
work-around but the behaviour there was never fully understood
before direct initialisation was made to work.So, this may or may not work.
-
Write unencoded ffmpeg packets to a file
24 janvier 2017, par user92238I’m using ffmpeg to receive packets (AVPacket) from an RTSP server.
Rather than decode the packets, I want to write them directly to an MP4 file that can be later opened by a media player. It is important that my application does not incur the overhead of decoding and re-encoding the packets.
I tried simply writing the contents of the AVPacket data field out to a file, but the result is not playable.
I suspect that I need to put additional information at the beginning of the file and/or between the packets to satisfy the MP4 file format. Is there an easy way to do this using ffmpeg functions, or is it something I’ll need to code by hand ? Where can I find the file format ?
Thanks,
Frank