[FFmpeg-user] Is there a way to determine the level of compression

Bouke / Videotoolshed bouke at videotoolshed.com
Sun Jun 4 14:57:04 EEST 2023



> On 4 Jun 2023, at 13:48, Cecil Westerhof via ffmpeg-user <ffmpeg-user at ffmpeg.org> wrote:
> 
> I most of the time use:
>    -vcodec libx264 -crf 26
> 
> Depending on the video this works great. Often the new size is between
> 1/6 and 1/14 of the original file. But in certain situation the size
> of the new file increases. In those cases I could better use copy. Is
> much faster and creates a smaller video. Is there a way to determine
> the crf value of a video? Then I could use that to determine if I
> should use copy, or not.

Not that I know of.
But try ’slower’ and ‘fast’ with a HQ source, you’ll see it works.

Note, on eg documentaires, some shots may come from YouTube or worse, so the quality of the input codec does not tell you anything.
(If they are camera originals it’s different.)

Why not just run it ‘as usual’, and compare file sizes? If not significant smaller, run a second with ‘-c:v copy’
(Compression will never increase quality, unless you need it for filtering or alike.)

Bouke




More information about the ffmpeg-user mailing list