[FFmpeg-user] Confusion about quality parameters
Moritz Barsnick
barsnick at gmx.net
Tue Jun 25 16:23:22 EEST 2019
On Tue, Jun 25, 2019 at 14:48:58 +0200, Ulf Zibis wrote:
> > my input is a 1.5 minute mp4 video with 19.5 MB
[...]
> > ./ffmpeg in.mp4 -c:a copy out.mp4
> > ffmpeg version N-93873-g6276b4db97 Copyright (c) 2000-2019 the
[...]
> > I see q=31.0. (the output file is only 5.9 MB)
[...]
> > When I use (with static release build 4.1.3 from johnvansickle):
> > ffmpeg in.mp4 -c:a copy out.mp4
[...]
> > I see q=28.0. (the output file is 16.3 MB)
The reason for the size difference is pretty obvious, if you actually
look at the *complete* output. (Which, again - for everyone - is the
reason we request to see it. ;-))
> $ ./ffmpeg -i debug/CYD_1.5m_x264.mp4 -c:a copy debug/CYD_1.5m_x264_dev.mp4
> ffmpeg version N-93873-g6276b4db97 Copyright (c) 2000-2019 the FFmpeg developers
[...]
> Output #0, mp4, to 'debug/CYD_1.5m_x264_dev.mp4':
> Metadata:
> major_brand : isom
> minor_version : 512
> compatible_brands: isomiso2avc1mp41
> encoder : Lavf58.27.103
> Stream #0:0(und): Video: mpeg4 (mp4v / 0x7634706D), yuv420p, 704x576 [SAR 12:11 DAR 4:3], q=2-31, 200 kb/s, 25 fps, 12800 tbn, 25 tbc (default)
> $ ffmpeg -i debug/CYD_1.5m_x264.mp4 -c:a copy debug/CYD_1.5m_x264_4.1.mp4
> ffmpeg version 4.1.3-static https://johnvansickle.com/ffmpeg/ Copyright (c) 2000-2019 the FFmpeg developers
[...]
> Output #0, mp4, to 'debug/CYD_1.5m_x264_4.1.mp4':
> Metadata:
> major_brand : isom
> minor_version : 512
> compatible_brands: isomiso2avc1mp41
> encoder : Lavf58.20.100
> Stream #0:0(und): Video: h264 (libx264) (avc1 / 0x31637661), yuv420p, 704x576 [SAR 12:11 DAR 4:3], q=-1--1, 25 fps, 12800 tbn, 25 tbc (default)
Your self-compiled binary does not include support for libx264,
therefore the output format mp4 defaults to the mpeg4 video codec. This
behaves totally differently to libx264, therefore the sizes (and
default quality settings, and more perhaps) differ.
Otherwise, regarding "-crf" vs "-q" (and everything else): Please see
what Carl Eugen wrote.
Cheers,
Moritz
More information about the ffmpeg-user
mailing list