Skip to content

Instantly share code, notes, and snippets.

@bhertzing
Forked from bivald/ffmpeg.sh
Created December 31, 2015 18:52
Show Gist options
  • Save bhertzing/49a686dcba885b084e61 to your computer and use it in GitHub Desktop.
Save bhertzing/49a686dcba885b084e61 to your computer and use it in GitHub Desktop.
FFmpeg commands
# TO MP4 (with quicktime/windows media player support)
# Convert to 720 MP4 (roughly 7MB for 30 seconds)
ffmpeg -i input.mp4 -s hd720 -c:v libx264 -crf 23 -c:a aac -strict -2 -pix_fmt yuv420p output.mp4
# Convert to 1080 MP4 (roughtly 60MB for 30 seconds) - high resolution, but not RAW
ffmpeg -i input.mp4 -s hd1080 -c:v libx264 -crf 23 -c:a aac -strict -2 -pix_fmt yuv420p output.mp4
# Animated gif to mp4
ffmpeg -i input.gif -strict -2 -pix_fmt yuv420p output.mp4
# Convert to AVI
ffmpeg -i input.mp4 -q:a 2 -q:v 2 -s hd720 output.avi
# Convert to WMV
ffmpeg -i input.mp4 -q:a 2 -q:v 2 -s hd720 output.wmv
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment