[FFmpeg-user] x264 preset (speed) question

Toerless Eckert tte at cs.fau.de
Mon Nov 21 09:32:00 EET 2016


On Mon, Nov 21, 2016 at 01:01:55AM +0100, Carl Eugen Hoyos wrote:
> Note that this is not the x264 mailing list.
> (Assuming you can reproduce with the x264 binary.)

Yes, i can. Didn't even know there was a separate mailing list.
*sigh*. What a fragementation. Ok, will ask there as well.

> > at same quality.
> 
> Why do you think so?
> I believe this is the same question I asked Matteo
> (but remember that my knowledge about encoding
> with modern video codec implementations is limited).

I am just guessing as well. Not a lot of good documentation easily
found googling..

http://slhck.info/articles/crf

Aka: CRF means encoding happens at constant "Quality", aka: contant
amount of "lossy" compression - just adjusted by the amount of movement.
Frames with lots of movement get lower quality because sharpness/details
are less well perceived during movement.

So, not  clear to me how different presets could produce different
quality.

The ffmpeg output shows that the encoder generates more P,B frames
the slower the preset gets. That accounts for the speed - aka :
more searching.

[libx264 @ 0x1dfde00] frame I:18    Avg QP:20.44  size:106259
[libx264 @ 0x1dfde00] frame P:4482  Avg QP:23.61  size: 32531

[libx264 @ 0x1dfde00] frame I:44    Avg QP:18.84  size: 69786
[libx264 @ 0x1dfde00] frame P:2019  Avg QP:21.30  size: 30925
[libx264 @ 0x1dfde00] frame B:2437  Avg QP:23.87  size: 10687

[libx264 @ 0x1dfde00] frame I:51    Avg QP:20.02  size: 57142
[libx264 @ 0x1dfde00] frame P:3048  Avg QP:23.91  size: 17277
[libx264 @ 0x1dfde00] frame B:1401  Avg QP:26.92  size:  5031

[libx264 @ 0x1dfde00] frame I:51    Avg QP:19.85  size: 58123
[libx264 @ 0x1dfde00] frame P:3058  Avg QP:23.83  size: 17789
[libx264 @ 0x1dfde00] frame B:1391  Avg QP:26.90  size:  6082

[libx264 @ 0x1dfde00] frame I:51    Avg QP:19.94  size: 56970
[libx264 @ 0x1dfde00] frame P:3055  Avg QP:23.95  size: 18003
[libx264 @ 0x1dfde00] frame B:1394  Avg QP:26.76  size:  6377

[libx264 @ 0x1dfde00] frame I:51    Avg QP:19.93  size: 57072
[libx264 @ 0x1dfde00] frame P:3056  Avg QP:23.94  size: 18006
[libx264 @ 0x1dfde00] frame B:1393  Avg QP:27.11  size:  6029

[libx264 @ 0x1dfde00] frame I:44    Avg QP:19.43  size: 61735
[libx264 @ 0x1dfde00] frame P:1845  Avg QP:23.57  size: 22645
[libx264 @ 0x1dfde00] frame B:2611  Avg QP:26.64  size:  8494

[libx264 @ 0x1dfde00] frame I:42    Avg QP:19.35  size: 62896
[libx264 @ 0x1dfde00] frame P:1803  Avg QP:23.58  size: 22637
[libx264 @ 0x1dfde00] frame B:2655  Avg QP:26.91  size:  8226

[libx264 @ 0x1dfde00] frame I:32    Avg QP:19.82  size: 64599
[libx264 @ 0x1dfde00] frame P:1728  Avg QP:25.21  size: 22017
[libx264 @ 0x1dfde00] frame B:2740  Avg QP:28.88  size:  7818

The QP's are all quite close together, not sure if any of the
other lines of output from ffmpeg would be better quality
difference indicators.

I remember that a few years back when i tried to figure out the
best encoding with Handbrake, the total bits improved a lot more
with slower presets ...

Cheers
    Toerless


More information about the ffmpeg-user mailing list