Skip to content

Instantly share code, notes, and snippets.

@khufkens
Last active January 26, 2022 17:57
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save khufkens/829e4a5cf063dc9b71b07d0f1f690faf to your computer and use it in GitHub Desktop.
Save khufkens/829e4a5cf063dc9b71b07d0f1f690faf to your computer and use it in GitHub Desktop.
Twitter movie from PNG sequence
# convert pngs to mp4
ffmpeg -r 2 -i tmp/%03d.png -y out.mp4
# convert mp4 to twitter compatible format
ffmpeg -i out.mp4 -vf scale=1280:720 -b:v 5000K -minrate 5000K -maxrate 5000K -b:a 128K -r 30 -f mp4 -vcodec libx264 -profile:v high -pix_fmt yuv420p -strict -2 -ac 2 -acodec aac twitter.mp4
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment