FFmpeg

seo610 Messages postés 596 Date d'inscription   Statut Membre Dernière intervention   -  
jeanbi Messages postés 15119 Date d'inscription   Statut Contributeur Dernière intervention   -
Bonjour,


je voudrais, avec FFmpeg dans un terminal, faire une video avec une image et une musique, j'aimerais que l'image s'affiche pour toute la duree de la musique.
Comment faire?

merci

1 réponse

jeanbi Messages postés 15119 Date d'inscription   Statut Contributeur Dernière intervention   2 184
 
bonjour
exemple
ffmpeg -i coeur.mp3 -i coeur.jpg coeur.avi
FFmpeg version 0.6.90-rc0, Copyright (c) 2000-2011 the FFmpeg developers
  built on Apr 11 2011 20:49:15 with gcc 4.6.0 20110331 (Red Hat 4.6.0-2)
  configuration: --prefix=/usr --bindir=/usr/bin --datadir=/usr/share/ffmpeg --incdir=/usr/include/ffmpeg --libdir=/usr/lib64 --mandir=/usr/share/man --arch=x86_64 --extra-cflags='-O2 -g -pipe -Wall -Wp,-D_FORTIFY_SOURCE=2 -fexceptions -fstack-protector --param=ssp-buffer-size=4 -m64 -mtune=generic' --enable-bzlib --enable-libdc1394 --enable-libdirac --enable-libgsm --enable-libmp3lame --enable-libopenjpeg --enable-librtmp --enable-libschroedinger --enable-libspeex --enable-libtheora --enable-libvorbis --enable-libvpx --enable-libx264 --enable-libxvid --enable-x11grab --enable-avfilter --enable-postproc --enable-pthreads --disable-static --enable-shared --enable-gpl --disable-debug --disable-stripping --shlibdir=/usr/lib64 --enable-runtime-cpudetect
  libavutil    50. 40. 0 / 50. 40. 0
  libavcodec   52.117. 0 / 52.117. 0
  libavformat  52.104. 0 / 52.104. 0
  libavdevice  52.  4. 0 / 52.  4. 0
  libavfilter   1. 76. 0 /  1. 76. 0
  libswscale    0. 13. 0 /  0. 13. 0
  libpostproc  51.  2. 0 / 51.  2. 0
[mp3 @ 0x22158a0] max_analyze_duration reached
[mp3 @ 0x22158a0] Estimating duration from bitrate, this may be inaccurate
Input #0, mp3, from 'coeur.mp3':
  Duration: 00:00:39.52, start: 0.000000, bitrate: 56 kb/s
    Stream #0.0: Audio: mp3, 22050 Hz, stereo, s16, 56 kb/s
Input #1, image2, from 'coeur.jpg':
  Duration: 00:00:00.04, start: 0.000000, bitrate: N/A
    Stream #1.0: Video: mjpeg, yuvj422p, 3488x2616, 25 tbr, 25 tbn, 25 tbc
Incompatible pixel format 'yuvj422p' for codec 'mpeg4', auto-selecting format 'yuv420p'
[buffer @ 0x2237430] w:3488 h:2616 pixfmt:yuvj422p
[ffsink @ 0x222e2c0] auto-inserting filter 'auto-inserted scaler 0' between the filter 'src' and the filter 'out'
[scale @ 0x222e5d0] w:3488 h:2616 fmt:yuvj422p -> w:3488 h:2616 fmt:yuv420p flags:0x4
Output #0, avi, to 'coeur.avi':
  Metadata:
    ISFT            : Lavf52.104.0
    Stream #0.0: Video: mpeg4, yuv420p, 3488x2616, q=2-31, 200 kb/s, 25 tbn, 25 tbc
    Stream #0.1: Audio: mp2, 22050 Hz, stereo, s16, 64 kb/s
Stream mapping:
  Stream #1.0 -> #0.0
  Stream #0.0 -> #0.1
Press [q] to stop encoding
frame=    1 fps=  0 q=10.1 Lsize=     758kB time=0.04 bitrate=155286.0kbits/s    
video:420kB audio:310kB global headers:0kB muxing overhead 3.772639%

je te donne le detail pour que tu regardes que les dépendances necessaire soient bien installees
a+
0