

Remember that every encoder is different, and what works for x264 will not apply to other encoders.Īdd -pix_fmt yuv420p if the output does not play in dumb players like QuickTime. In this example the audio is stream copied instead of re-encoded. You can use the -ss and -t options to select a random section to encode, such as -ss 30 -t 60 which will skip the first 30 seconds and create a 60 second output. You do not have to encode the whole video to test quality.

CRF (constant rate factor) is your quality level. The two option for you to adjust are -crf and -preset. Example: ffmpeg -i input -codec:v libx264 -preset medium -crf 24 -codec:a copy output.mkv Also, attempting to use the same bitrate and other parameters as the input will most likely not achieve what you want.

However, you can achieve visually lossless (or nearly so) outputs when using a lossy encoder meaning that it may look as if the output is the same quality to your eyes, but technically it is not. Unfortunately, this is not possible when using a lossy encoder, and even lossless encoders may not provide the same quality due to colorspace conversion, chroma subsampling, and other issues. So, there seems to be a conflict between the VP9 CRF range on Google's site and the ffmpeg CRF range on the ffmpeg site.Usually wanting the output to be the "same quality" as the input is an assumed thing that people will always want.

The range of the CRF scale is 0–51, where 0 is lossless, 23 is the default, and 51 is worst quality possible However, on the ffmpeg documentation, I only found reference to CRF for. If you are using -crf with other codecs you will likely need different values for VP9 Note: Other codecs in FFmpeg accept the -crf parameter but may interpret the value differently. In Google's VP9 documentation, I see that: To trigger this mode, you must use a combination of -crf and -b:v I have read this ffmpeg manual about 2-pass conversion, which states that: mov (h264) file to VP9 / WebM using ffmpeg, and I don't know what the CRF numbers mean.
