Skip to content

Instantly share code, notes, and snippets.

@saulfield
Created April 30, 2025 00:35
Show Gist options
  • Save saulfield/9ed05e9a2e3025579c54146c626b3f41 to your computer and use it in GitHub Desktop.
Save saulfield/9ed05e9a2e3025579c54146c626b3f41 to your computer and use it in GitHub Desktop.
ffmpeg command to create mp4 from mp3 + image
ffmpeg -loop 1 -framerate 2 -i cover.jpg -i song.mp3 -vf "pad=ceil(iw/2)*2:ceil(ih/2)*2:color=black" -c:v libx264 -preset medium -tune stillimage -crf 18 -c:a copy -shortest -pix_fmt yuv420p out.mp4
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment