views:

44

answers:

1

i have a list of images which im trying to convert to a video.

the images are the following:
t2.jpg
t3.jpg
t4.jpg

I can convert those three images into a video with:
ffmpeg -r 5 -i t%d.jpg -y -an video.avi

but if i turn the names to t20.jpg,t30.jpg and t40.jpg, it doesn't work anymore.
and changing %d to %02d doesn't make any difference.

What am I doing wrong?

The user interface around ffmpeg seems to be very bad.
Is there any other way to turn a list of images into a video?

+1  A: 

Hope this helps

For creating a video from many images:

ffmpeg -f image2 -i foo-%03d.jpeg -r 12 -s WxH foo.avi

The syntax foo-%03d.jpeg specifies to use a decimal number composed of three digits padded with zeroes to express the sequence number. It is the same syntax supported by the C printf function, but only formats accepting a normal integer are suitable.

Source

Praveen S
I get the same error:FFmpeg version SVN-rUNKNOWN, Copyright (c) 2000-2007 Fabrice Bellard, et al. configuration: --enable-gpl --enable-pp --enable-swscaler --enable-pthreads --enable-libvorbis --enable-libtheora --enable-libogg --enable-libgsm --enable-dc1394 --disable-debug --enable-shared --prefix=/usr libavutil version: 1d.49.3.0 libavcodec version: 1d.51.38.0 libavformat version: 1d.51.10.0 built on Apr 23 2010 15:11:13, gcc: 4.2.4 (Ubuntu 4.2.4-1ubuntu3) t%02d.jpg: I/O error occured Usually that means that input file is truncated and/or corrupted.
Hermann Ingjaldsson
You can try renaming the files from to t10,t11,t12 as it says they should form a sequence.
Praveen S
i name them 11.jpg,12.jpg,13.jpg and 14.jpgthen run:ffmpeg -f image2 -i %02d.jpg -r 12 -s WxH foo.aviand get error:%02d.jpg: I/O error occuredUsually that means that input file is truncated and/or corrupted.but i mean, i know there is nothing wrong with the files themselves,they worked perfectly when the names were 1.jpg...4.jpg.and the command had a %d.jpg
Hermann Ingjaldsson
@Hermann I think when you use %2d you need to start naming your files from 01 upto 99, %3d from 001 upto 999 and so on.Clearly the error is because it is not able to find the sequence of files which it has to use.
Praveen S
yeah that was it, one must start from file one, and that file-one must be named 01.jpg etc.
Hermann Ingjaldsson