[MPlayer-users] variable bitrate, fixed quality

D Richard Felker III dalias at aerifal.cx
Wed Jul 9 19:57:34 CEST 2003


On Wed, Jul 09, 2003 at 06:28:41PM +0200, Nikolaus Rath wrote:
> [Automatic answer: RTFM (read DOCS, FAQ), also read DOCS/bugreports.html]
> D. Richard Felker, III <dalias at aerifal.cx> wrote:
> >> >> According to an xvid page (http://roeder.goe.net/%7Ekoepi/xvid.shtml,
> >> >> the "XViD Options Explained" PDF), the xvid codec supports such an
> >> >> operation. The page says that I should set the "curve compression" to
> >> >> 0 or 1 and the "payback delay" to 1. But these are the parameter
> >> >> names in a different xvid gui, I can't find them in mencoder. So maybe
> >> >> someone can tell me the equivalent mencoder options?
> >> > 
> >> > The corresponding options for lavc are vqcomp, vqblur, vqsquish,
> >> > vratetol, vrc_maxrate, vrc_minrate. However, the defaults are rather
> >> > good.
> >> 
> >> Nevertheless, I would be happy if you could explain them too. :-)
> > 
> > They're explained in the mplayer man page.
> 
> Yes. But an explanation like
> 
>                  vqcomp=<value>
>                      quantizer compression,  depends  upon  vrc_eq  (pass 1/2)
>                      (default: 0.5)
> 
> isn't really helpful if you aren't an MPEG developer.
> Your explanation below is indeed very good. I think that this type of
> explanation should be in the manpage.

Ah, sorry... Apparently someone removed the old good explanation from
the manpage and put that crap in its place... :/

> >> > Increasing vqcomp (default is 0.5) to something near 1 will make
> >> > quality more steady for the whole movie. Decreasing it will make
> >> > bitrate more steady (close to constant bitrate).
> >> 
> >> I increased vqcomp up to 1. But the bitrate was still exactly as
> >> specified. That is why I'm thinking that some of the other options
> >> have wrong values (maybe mencoder sets them, so the defaults in ffmpeg
> >> don't apply).
> > 
> > The bitrate will always be (almost) exactly as you specify. That's the
> > way it works. What vqcomp affects is how those available bits get
> > distributed among frames. With vqcomp=0, all frames will get
> > approximately the same number of bits, whereas with vqcomp=1, they'll
> > all get approximately the same quantizer (or at least that's how I
> > understand it...). Putting vqcomp all the way up at 1 is probably not
> > a great idea; in that case, you might as well use vqscale=whatever.
> 
> Based on your explanation of rate control, this means that with
> vqscale=1 all frames with low quantizers get an increased quantizer
> and all frames with high quantizers get a decreased quantizer, while
> with vqscale=0 those with high bitrates get increased quantizers and
> those with low bitrates get decreased quantizers during the second
> pass. Is this correct?

Yes, I think that's about right. Except you mean vqcomp, not vqscale. :)

> Then there is a difference between vqscale=n and vqcomp=1. With
> vqcomp=1 you get the best possible constant quantizer at the desired
> bitrate while you have to specify the quantizer manually (bitrate is
> ignored) in the vqscale=n mode.

Yes.

Rich



More information about the MPlayer-users mailing list