user3134: I have an image file (png) and an audio file (aiff).  How do I combine them to make a video file that shows the still image and plays the audio file?
Target operating system: either OS X Lion or Ubuntu, using only free software, must be command-line driven (no GUI solutions please).  Thanks in advance!

user2569: This article looks like it'll get you close.  Doesn't include the audio, but that honestly sounds easier than converting the images to video.
Excerpt:

ImageMagick and ffmpeg combined can be used to turn still images into
  video. Both ImageMagick and ffmpeg have been around for years, and are
  readily available as packages with most Linux distributions. The tips
  below allow you to convert images on the command line, which for a may
  appear to be time consuming, but once you know how to do it you'll
  find it much faster than using a GUI!


user1530: I think ffmpeg is what you want, but you will need to dive into the docs to figure out how to make it do what you want.

user3476: To expand upon ObscureRobot's answer, use ffmpeg like so:
ffmpeg -loop 1 -f image2 -r 2 -i input1.png -i input2.aiff -c:v libx264 -c:a copy -shortest output.mp4

-loop 1 -f image2 -r 2 -i input1.png tells ffmpeg to loop input1.png forever, at a frame rate of 2fps. -c:v libx264 tells it to use x264 to encode the video, and -c:a copy tells it to simply copy the audio, without encoding. -shortest makes ffmpeg stop when the shortest input ends - input2.aiff in this case.

3134: <p>I have an image file (png) and an audio file (aiff).  How do I combine them to make a video file that shows the still image and plays the audio file?</p>

<p>Target operating system: either OS X Lion or Ubuntu, using only free software, must be command-line driven (no GUI solutions please).  Thanks in advance!</p>
 2569: <p><a href="http://www.itforeveryone.co.uk/image-to-video.html" rel="nofollow">This article</a> looks like it'll get you close.  Doesn't include the audio, but that honestly sounds easier than converting the images to video.</p>

<p>Excerpt:</p>

<blockquote>
  <p>ImageMagick and ffmpeg combined can be used to turn still images into
  video. Both ImageMagick and ffmpeg have been around for years, and are
  readily available as packages with most Linux distributions. The tips
  below allow you to convert images on the command line, which for a may
  appear to be time consuming, but once you know how to do it you'll
  find it much faster than using a GUI!</p>
</blockquote>
 1530: <p>I think <a href="http://ffmpeg.org/" rel="nofollow"><code>ffmpeg</code></a> is what you want, but you will need to dive into the docs to figure out how to make it do what you want.</p>
 3476: <p>To expand upon ObscureRobot's answer, use ffmpeg like so:</p>

<pre><code>ffmpeg -loop 1 -f image2 -r 2 -i input1.png -i input2.aiff -c:v libx264 -c:a copy -shortest output.mp4
</code></pre>

<p><code>-loop 1 -f image2 -r 2 -i input1.png</code> tells ffmpeg to loop input1.png forever, at a frame rate of 2fps. <code>-c:v libx264</code> tells it to <a href="https://ffmpeg.org/trac/ffmpeg/wiki/x264EncodingGuide" rel="noreferrer">use x264 to encode the video</a>, and <code>-c:a copy</code> tells it to simply copy the audio, without encoding. <code>-shortest</code> makes ffmpeg stop when the shortest input ends - input2.aiff in this case.</p>
