Created
December 21, 2018 23:04
-
-
Save AkBKukU/11ec6b912078b9c3a3b2b578d4cefde2 to your computer and use it in GitHub Desktop.
Ideal FFMpeg Settings for YouTube videos
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 -preset veryfast -profile:v high -crf 20 -coder 1 -pix_fmt yuv420p -movflags +faststart -g 30 -bf 2 -c:a aac -b:a 384k -profile:a aac_low -strict -2 output.mp4 |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Based on: https://gist.github.com/mikoim/27e4e0dc64e384adbcb91ff10a2d3678
The preset is set to slow in their example which takes a lot of CPU time on higher resolution videos. I changed it to
veryfast
. This doesn't effect quality in any way, just the end file size.The CPU crunching time vs. uploading time will be a YMMV thing, but on my 32 thread workstation it takes way longer than it's worth on 4k60 video.
I also set the crf to 20 for CPU time, in my testing I could not see a difference in the resulting upload. But this does directly effect the quality. (Lower == Better, Higher = Smaller)