Skip to content

Instantly share code, notes, and snippets.

@basperheim
Created February 22, 2022 09:36
Show Gist options
  • Save basperheim/b4a751fa08270db1e09b2c89fee1099b to your computer and use it in GitHub Desktop.
Save basperheim/b4a751fa08270db1e09b2c89fee1099b to your computer and use it in GitHub Desktop.
Use FFmpeg to create an MP4 video from an image and MP3 audio track

Create a video from an image and MP3 file using FFmpeg

Uses the libx264 codec:

ffmpeg -r 1 -loop 1 -y -i input.jpg -i input.mp3 -c:a copy -r 1 -vcodec libx264 -shortest output.mp4
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment