Skip to content

Instantly share code, notes, and snippets.

@una-ada
Created November 10, 2022 14:36
Show Gist options
  • Save una-ada/f6374ad5d7bac8ac910de76fb728c06a to your computer and use it in GitHub Desktop.
Save una-ada/f6374ad5d7bac8ac910de76fb728c06a to your computer and use it in GitHub Desktop.
A quick command for making a still image video (output.mp4) out of an audio file (input.mp3) and image (input.png) for Twitter posts.
ffmpeg \
-loop 1 \
-i input.png \
-i input.mp3 \
-pix_fmt yuv420p \
-vcodec libx264 \
-tune stillimage \
-acodec aac \
-vb 1024k \
-minrate 1024k \
-maxrate 1024k \
-bufsize 1024k \
-ar 44100 \
-ac 2 \
-strict experimental \
-r 30 \
-t 2:20 \
output.mp4
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment