What is the best way that I can make a video from one photo and one audio file like Mp3

I’m using an Ubuntu headless server, so I need a command line version for this... I tried with avconv but I couldn't find any good documentation for it

I used this command but actually it's not what I need because I get something else:

 sudo avconv  -i filename_1.png -b:v 1000k test.mp4 -b:a 32k

How should I proceed?

  • Welcome to Ask Ubuntu! ;-) Next time, please use your [Shift] key for correct CaPiTaLiSaTiOn! :-)
    – Fabby
    Commented Aug 1, 2015 at 19:19

2 Answers 2


This command will create a video that displays the picture for the duration of the supplied audio file:

ffmpeg -loop 1 -i picture.png -i audio.ogg -shortest output.mpeg

Add extra goodies as desired.

  • ffmpeg is not working on Ubuntu Commented Aug 2, 2015 at 10:48
  • 1
    Sure it is -- works just fine for me! :-) Want to give any more details, like what exactly you mean by "is not working", and perhaps what version of Ubuntu you're running? Commented Aug 4, 2015 at 18:04
  • you are right maybe it''s work in your Ubuntu but try to delete it . you are not able to install it again because there is new version like avconv Commented Aug 4, 2015 at 20:00
  • could you give me the installing command ? maybe i did a mistake or some thing like that Commented Aug 4, 2015 at 20:01
  • Actually, I didn't have it installed on this machine (fairly new workstation) and I installed it using Synaptic just to answer your question. I then immediately uninstalled it along with the dependencies that were no longer needed, so I'll install it again here... ffmpeg 7:2.5.7 (This is Ubuntu 15.04). Dependencies are the typical libavffmpeg stuff (most ffmpeg56) that I see for ffmpeg. Installed and ran fine. Commented Aug 4, 2015 at 21:59

That would do it

ffmpeg -loop 1 -i picture.jpg -i audio.mp3 -shortest -c:v libx264 -c:a copy -tune stillimage output.mp4

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .