[FFmpeg-user] Combine unordered images to video (+MP3 audio)

Drabner drabner at zoobe.com
Wed Mar 7 13:39:15 CET 2012

I have also posted this problem on stackoverflow
and will add the answer there, if I receive one on the mailing list - and
vice versa.

I did a few jobs with ffmpeg and also created my own dll, using ffmpeg API
directly, but for my next project, I need to be able to combine multiple
images together to a video with ffmpeg, also adding a mp3 sound clip. I know
that you can do that for ordered images like this:

For images:
image001.jpg image002.jpg image003.jpg etc...

ffmpeg command line:
ffmpeg -f image2 -i img%03d.jpg -i sound.mp3 output.mpg

But in our project, we do not have the images ordered like that. Instead,
which images to use for the video in which order is determined at runtime
(one image for each frame of a video at 30fps). 

So a video with 10 frames, for example, could have to consist of the
following order of images:
image001.jpg image002.jpg image111.jpg image012.jpg imageFun.jpg
image001.jpg image002.jpg imageFun.jpg image055.jpg imageEnd.jpg

How would I do that using ffmpeg? 
This part of the documentation (http://ffmpeg.org/ffmpeg.html#toc-image2-2)
doesn't exactly help me here. I really don't want to resort to using the
ffmpeg API directly from C/C++, but fear that I have to if that is not
possible "natively".

If that is not possible with ffmpeg, but with some other software (that runs
on Linux and can be controlled from command line) - I'm all ears! ;)

View this message in context: http://ffmpeg-users.933282.n4.nabble.com/Combine-unordered-images-to-video-MP3-audio-tp4453148p4453148.html
Sent from the FFmpeg-users mailing list archive at Nabble.com.

More information about the ffmpeg-user mailing list