[FFmpeg-user] Is there a way to determine the level of compression
Cecil Westerhof
Cecil at decebal.nl
Sun Jun 4 15:59:05 EEST 2023
Bouke / Videotoolshed <bouke at videotoolshed.com> writes:
>> 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.
I know it can work, because I have seen files shrinking very much. But
sometimes the opposite happens.
> 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.)
Everything I have been working with was captured with a camcorder, or
with a camera.
I should probably dig a bit deeper. See if I can find differences
between videos that where compressed significantly and videos that do
increase.
> 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.)
Because compressing can take more as half an hour. (I am on really old
hardware.) So it would be quite nice if I could skip that step if it
is no necessary.
But if that is not possible …
--
Cecil Westerhof
Senior Software Engineer
LinkedIn: http://www.linkedin.com/in/cecilwesterhof
More information about the ffmpeg-user
mailing list