FFmpeg settings for YouTube and Facebook video uploads
Solution 1:
Don't consider the guidelines as strict requirements. General recommendation is to provide the highest quality that is practical for you to upload. It's that simple; whatever you upload is going to be re-encoded anyway and YouTube will almost always accept whatever you give them. That means you either upload the original content, or if the original is too big you can re-encode it using a high quality. Example using ffmpeg
:
ffmpeg -i input -c:v libx264 -crf 18 -preset slow -c:a copy output.mkv
See FFmpeg Wiki: H.264 for more details–specifically the -crf
and -preset
options. Notice that I simply copied the audio, but you may choose to re-encode it if the source contains uncompressed audio.
Your player may not be able to play the output for various reasons, but YouTube certainly will.