title: Combine unordered images to video (+MP3 audio)
body: <p>So 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:</p>
  
  <pre><code>image001.jpg image002.jpg image003.jpg etc...
  
  
  ffmpeg -f image2 -i img%03d.jpg -i sound.mp3 output.mpg
  </code></pre>
  
  <p>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:</p>
  
  <pre><code>image001.jpg image002.jpg image111.jpg image012.jpg imageFun.jpg image001.jpg image002.jpg imageFun.jpg image055.jpg imageEnd.jpg
  </code></pre>
  
  <p>How would I do that using ffmpeg? <a href="http://ffmpeg.org/ffmpeg.html#toc-image2-2" rel="nofollow">This part of the documentation</a> doesn't exactly help me here. </p>
  
  <p>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".</p>
  
  <p>.</p>
  
  <p><strong>Addition:</strong></p>
  
  <p>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! ;)</p>