[FFmpeg-user] Is there a way to determine the level of compression
Cecil Westerhof
Cecil at decebal.nl
Sun Jun 4 17:33:17 EEST 2023
Cecil Westerhof via ffmpeg-user <ffmpeg-user at ffmpeg.org> writes:
> 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.
It looks like videos that are shot in the dark/inside can be
compressed very much, while videos that are shot outside grow.
Logging from something I shot inside in dark circumstances:
-------------- next part --------------
A non-text attachment was scrubbed...
Name: 00007.log
Type: application/octet-stream
Size: 144212 bytes
Desc: not available
URL: <https://ffmpeg.org/pipermail/ffmpeg-user/attachments/20230604/0b531aa2/attachment.obj>
-------------- next part --------------
Input was 2.1 GB output was 289.8 MB. So it was about 1/7 of the original.
Logging from something I shot outside in bright light:
-------------- next part --------------
A non-text attachment was scrubbed...
Name: 00096.log
Type: application/octet-stream
Size: 15961 bytes
Desc: not available
URL: <https://ffmpeg.org/pipermail/ffmpeg-user/attachments/20230604/0b531aa2/attachment-0001.obj>
-------------- next part --------------
Went from 117.5 MB to 170.2 MB. So almost 50% bigger.
I do not see a difference in video quality.
--
Cecil Westerhof
Senior Software Engineer
LinkedIn: http://www.linkedin.com/in/cecilwesterhof
More information about the ffmpeg-user
mailing list