[Libav-user] Filesize difference between using ffmpeg command line and C API

Carl Eugen Hoyos ceffmpeg at gmail.com
Wed Mar 31 00:16:01 EEST 2021


Am Di., 30. März 2021 um 16:43 Uhr schrieb Alexandre Bizeau <abizeau at 36pix.com>:
>
>
> While using following ffmpeg command :
>
> ffmpeg -framerate 12 -pattern_type glob -i 'FRAMES/frame_*.tif' -map 0:v test_binffmpeg.mp4
>
> It uses the default H.264 parameters which are preset=medium and crf=23. This generates a file size with bit_rate = 1358 kb/s and size = 1659kb.
>
> But by using my own code to encode an mp4 video (using the exact same images), I then have a video around bit_rate = 3929 kb/s and size = 4757kb.
>
> In my code, I leave the codec options to default, and even if I try to overwrite with preset=medium + crf=23, I still have the same size of 4757kb.

> I'm wondering what I am missing?

Isn't 23 the default for crf?

Carl Eugen


More information about the Libav-user mailing list