Loop Static Image with Audio using FFmpeg

This article provides a straightforward guide on how to convert a single static image and an audio file into a continuous video using the powerful command-line tool FFmpeg. You will learn the exact command needed to loop the image, sync it to the duration of the audio track, and export the final video file quickly and efficiently.

To combine a single static image and an audio file into a video, you can use a single FFmpeg command. Because an image has no inherent duration, you must tell FFmpeg to loop the image infinitely and then stop rendering once the audio track ends.

Here is the standard command to achieve this:

ffmpeg -loop 1 -framerate 2 -i image.jpg -i audio.mp3 -c:v libx264 -tune stillimage -c:a aac -b:a 192k -pix_fmt yuv420p -shortest output.mp4

Understanding the Command Parameters

By running this command in your terminal or command prompt, FFmpeg will quickly package your image and audio into a perfectly synchronized MP4 video suitable for uploading to platforms like YouTube or Vimeo.