Skip to content

Instantly share code, notes, and snippets.

@emilcarr
Last active May 28, 2021 13:05
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 emilcarr/2106b3ceda0de1a81eed50e4b28efb55 to your computer and use it in GitHub Desktop.
Save emilcarr/2106b3ceda0de1a81eed50e4b28efb55 to your computer and use it in GitHub Desktop.
ffmpeg commands cheatsheet

FFMPEG cheatsheet

Convert video for twitter

Twitter only works with videos with AAC audio, YUV 4:2:0 pixel format and an aspect ratio between 1:3 and 3:1, according to their developer docs

ffmpeg -i input_video.mp4 -c:a aac -c:v libx264 -filter:v "format=yuv420p" output_video.mp4

Audio over a static image

ffmpeg -i image.png -i audio.mp3 -r 30 video.mp4
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment