[Ffmpeg-devel] [Wishlist] Specify *input* frame rate for image sequence

Rich Felker dalias
Sat Aug 6 18:02:57 CEST 2005


On Sat, Aug 06, 2005 at 03:31:38PM +0100, Mary Ellen Foster wrote:
> (I'm sending this to the "devel" list, rather than the "user" list,
> because my initial instinct was to file a wishlist bug, and when I
> clicked on the "bug" link it told me to post to this list.)
> 
> I'm currently trying to figure out the best way to create .avi files
> from the output of another program I use. The program outputs,
> separately:
> - A sequence of image files
> - The accompanying soundtrack
> 
> I've been partially successful in using ffmpeg to create the .avi
> file, using the following sort of command line (I've also shown the
> output):
> % ffmpeg -i img%04d.jpg -r 30 -i sound.wav -acodec mp3 -vcodec xvid \
>     -pix_fmt yuv420p movie.avi
> ffmpeg version CVS, build 3211265, Copyright (c) 2000-2004 Fabrice Bellard
>   configuration:  --enable-mp3lame --enable-libogg --enable-pthreads
> --prefix=/disk/scratch --enable-faad --enable-a52 --enable-xvid
> --enable-shared --enable-gpl --extra-cflags=-I/disk/scratch/include
> --extra-ldflags=-L/disk/scratch/lib
>   built on Aug  6 2005 13:56:43, gcc: 3.2.2 20030222 (Red Hat Linux 3.2.2-5)
> Input #0, image2, from 'img%04d.jpg':
>   Duration: 00:00:09.9, start: 0.000000, bitrate: N/A
>   Stream #0.0: Video: mjpeg, yuvj420p, 350x350, 25.00 fps
> Input #1, wav, from 'sound.wav':
>   Duration: 00:00:08.3, start: 0.000000, bitrate: 352 kb/s
>   Stream #1.0: Audio: pcm_s16le, 22050 Hz, mono, 352 kb/s
> Output #0, avi, to 'movie.avi':
>   Stream #0.0: Video: xvid, yuv420p, 350x350, 30.00 fps, q=2-31, 200 kb/s
>   Stream #0.1: Audio: mp3, 22050 Hz, mono, 64 kb/s
> Stream mapping:
>   Stream #0.0 -> #0.0
>   Stream #1.0 -> #0.1
> Press [q] to stop encoding
> frame=  296 q=9.0 Lsize=     393kB time=8.4 bitrate= 384.3kbits/s
> video:283kB audio:66kB global headers:0kB muxing overhead 12.751704%
> 
> The problem: the intended frame rate of the image sequence is actually
> 30 FPS; this is not changeable in the program that's creating it. As
> far as I can tell, "-r 30" in the above command line only controls the
> frame rate of the *output* stream; however, there's no way I can tell

Put it before the -i and it will control the input stream. This is in
the docs, isn't it??

Rich





More information about the ffmpeg-devel mailing list