Take the 2-minute tour ×
Video Production Stack Exchange is a question and answer site for engineers, producers, editors, and enthusiasts spanning the fields of video, and media creation. It's 100% free, no registration required.

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!

share|improve this question
    
I'm curious why you accepted my answer rather than Josh's more detailed answer that includes a how-to article. I don't mind the reputation points, but it seems like the other answer better addresses your question. –  ObscureRobot Nov 13 '12 at 18:10
1  
I do actually need the audio added to the video, so although I like the article, it doesn't solve my problem. Even though your answer doesn't actually offer a ready-made solution, I prefer to accept one so as to boost my accept rating (making it more likely that others will continue to answer my questions). Sadly this is a feature of StackExchange---it incentivizes askers to accept an answer, even if it doesn't completely answer the question. –  jimbojw Nov 13 '12 at 19:08
    
I completely agree that you should make a point of accepting good answers, but when you do so is a matter of personal preference. I don't ask a lot of questions, so often like to give a weak answer 5-7 days before I accept it. AVP's traffic is light, and people don't seem shy about adding late answers, so it may not be a big deal. –  ObscureRobot Nov 13 '12 at 19:32

3 Answers 3

up vote 2 down vote accepted

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.

share|improve this answer

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.

share|improve this answer

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!

share|improve this answer

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.