Last active
March 7, 2016 23:38
-
-
Save aferriss/864f26239507b63a2f22 to your computer and use it in GitHub Desktop.
ffmpeg compress video to MP4
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
ffmpeg -i input.mov -c:v libx264 -maxrate 20000k -bufsize 3000k -pix_fmt yuv420p -crf 24 out.mp4 | |
# see here https://trac.ffmpeg.org/wiki/Encode/H.264 | |
# -pix_fmt may not be necessary but I use it sometimes for backwards compatibility. | |
# -bufsize tells ffmpeg how often to check that bitrate is at the requested rate | |
# -crf is not necessary but can get videos really small if set >30 (at the expense of quality) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment