Convert mp3 -> Video with static image ( ffmpeg/libav & BASH )

First of all, I would highly recommend you to update ffmpeg to a newer version. You are currently using v1.2.6-7, but as we speak, the current version is 2.3.3.

Here is a working command (see ffmpeg wiki):

ffmpeg -loop 1 -i image.jpg -i audio.mp3 -c:a copy -c:v libx264 -shortest out.mp4

Also, you could optimize overall weight by reencoding audio if you're using raw sound (aiff or wave) as input:

ffmpeg -loop 1 -i image.jpg -i audio.wav -c:a aac -ab 112k -c:v libx264 -shortest -strict -2 out.mp4

For further reading, see this related stackoverflow post.


ffmpeg -loop 1 -i image.jpg -i audio.mp3 -shortest -c:v libx264 -c:a copy result.mkv 

works with version 3.4.2

Tags:

Bash

Ffmpeg

Video