Browser FFmpeg recipe
Create Video from Image and Audio Online with FFmpeg
Create an MP4 from one image and one audio file.
Command
Run this FFmpeg command
ffmpeg -loop 1 -i cover.jpg -i audio.mp3 -c:v libx264 -tune stillimage -c:a aac -b:a 192k -pix_fmt yuv420p -shortest output.mp4When to use it
- podcast artwork videos
- music previews
- simple audio uploads
How it works
- Upload the image and audio files.
- Make sure the second input filename matches your audio file.
- Run FFmpeg and download the MP4 video.
Option reference
| Option | What it does |
|---|---|
-loop 1 | Loops the still image for the duration of the output. |
-tune stillimage | Optimizes H.264 encoding for still images. |
-pix_fmt yuv420p | Improves playback compatibility. |
-shortest | Stops when the audio ends. |
Practical notes
- Use a 16:9 image for a standard video frame.
- Large images can slow browser encoding; resize first if needed.
FAQ
Why do I need yuv420p?
It improves compatibility with common players and upload platforms.
Can I use a PNG image?
Yes. Change the input filename to match your PNG file.