castrend.blogg.se

Ffmpeg crf scaling
Ffmpeg crf scaling







A higher bitrate will result in a better visual quality, but of course it will also result in a bigger file. Therefore it's easy to predict the final file size. In contrast to CRF mode (and QP mode) the resulting average bitrate is known in advance. So this mode only requires half the time of a “Two Pass” encode. Single Pass - Bitrate: This mode will encode your video at an average bitrate with only one single pass. Once you found it, you can use that value for all your future encodes. This way you'll find the highest possible CRF value that still gives an accepted quality for your eyes. Then raise the CRF value in steps of one, until the quality becomes intolerable. Furthermore the common practice is as follows: Start with a low CRF value, such as 16. There also is a rule of thumb: Lowering the CRF value by 6 will double filesize, lowering CRF by 1 will raise filesize by ~12.5% (very roughly).

ffmpeg crf scaling

At the same time “real life” footage with a lot of textures might require much lower quantizers, especially in dark scenes. Nevertheless material with few textures, like Anime and Cartoons, can cope with much higher quantizers. A quantizer of 22 seems to be reasonable for most purposes. Using a quantizer higher than 32 will result in almost unwatchable video. Using a quantizer lower than 16 usually is overkill, except for mastering purposes. Nevertheless a quantizer setting in the range between 16 and 32 should give satisfactory results in most cases. Furthermore the quantizer setting highly depends on contents of your video. Remarks: Choosing the proper quantizer setting for a CRF (or QP) encode is not trivial! That's because visual quality is highly subjective: What some people consider “good quality” other people will consider “horrible quality” - and vice versa. This should give approximately the same file size as before, but better visual quality! Another important advantage of CRF mode is that it will benefit from adaptive quantization, something that QP mode can't do. When switching from QP to CRF mode, you may want to slightly lower the quantizer.

ffmpeg crf scaling

It's recommended to prefer CRF mode over QP mode, although CRF is a bit slower. Therefore the CRF mode should give the same subjective quality as QP mode, but it usually achieves a significant higher compression. For example it will raise the quantizers in “fast” scenes where the loss won't be visible anyway and lower the quantizers in “slow” scenes. The advantage of the CRF mode is that it suits the human perception much better than the QP mode. Internally CRF mode uses the same ratecontrol algorithm as x264's ABR mode, only without a target bitrate. To be more precise, this mode encodes at a constant “rate factor”, which is derived from the specified quantizer. It basically works similar to the QP Mode (see above), but it will encode with an average quantizer instead of a constant one.

ffmpeg crf scaling

Single Pass - Constant Rate Factor: This mode is also known as the “CRF Mode” or “Constant Quality” mode.









Ffmpeg crf scaling