[FFmpeg-user] Qscale vs CRF

Ferdi Scholten ferdi at sttc-nlp.nl
Fri Apr 28 21:45:49 EEST 2023


Hello,
> I need to understand the difference between Qscale and CRF in terms of
> video compression.
> In terms like, by using crf or qscale does it improve the Image quality and
> the bandwidth, which one would be better using it?
> I also found some links that qscale does not support in libx264, does that
> mean that It needs to be used only with H265 or what does it mean?
>
> Thanks,
> Naveen B.

qscale was used by old codecs up until mpeg4-asp (stuff like divx, xvid 
etc.) to set variable bitrate with a number between 1 and 31 where the 
highest number was the lowest quality. It has been superseded by crf in 
modern codecs like H264 and newer.

crf tries to keep the same quality of the image by changing the bitrate 
as needed. In crf also the lower the number, the better the quality. 
Most modern codecs interpret crf 1 as lossless coding.

So crf keeps a constant quality but in doing so can use more, or less 
bandwith depending on the source material.

If you are constrained by bandwith you might better use cq (constrained 
quality) or VBV if available for your codec if keeping qulity is desired 
up until a certain limit.

More info here: https://slhck.info/video/2017/03/01/rate-control.html


More information about the ffmpeg-user mailing list