[Ffmpeg-devel] Discrete levels on image quality

jean.mab at bluewin.ch jean.mab
Tue Jan 30 09:55:48 CET 2007


Hi,

I want to modify the quality compression of an image while using a 
mpeg4 video compression.

Here is what I have done:


    c->flags=CODEC_FLAG_QSCALE;// enable quality compression

   image->quality=100;

I found that it's possible to change the quality between  1 (good) 
and FF_LAMBDA_MAX (bad) where FF_LAMBDA_MAX =256*128-1.

After some experiments, it seems that there are 29 steps between 
these values making changing the quality. These steps are:
3596
3478
3360
3242
3124
3006
2888
2770
2653
2535
2417
2299
2181
2063
1945
1827
1710
1592
1474
1356
1238
1120
1002
885
767
649
531
413
295

That is the reason why these commands are the same:
(http://lists.mplayerhq.hu/pipermail/ffmpeg-devel/2004-
September/038126.html)
>       picture->quality=100; (Not change image).
>       picture->quality=50; (Not change image).
>       picture->quality=1; (Not change image).

Does somebody explain me a little more about these steps?
I thought that image->quality changes the quality factor of the 
jpeg compression but it doesn't seem to be that.
Does somebody know on which level does this quality act?

Thank you

JMab





More information about the ffmpeg-devel mailing list