[x264-devel] Re: clarification on rate control

Jeff Clagg snacky at ikaruga.co.uk
Thu Apr 6 04:33:18 CEST 2006


On Wed, Apr 05, 2006 at 06:57:48PM -0700, Daniel Rogers wrote:
> Let me see if I got this right:
> to get VBR: do a constant (or ranged) qp encode

There isn't exactly such a thing as "ranged" although crf mode does obey
qp_min. Not that it matters since it sounds like you won't be using crf.

> to get ABR: set a bitrate
> to get CBR: set a bitrate, a max bitrate, and a buffer_size

yup

> >I am pretty sure the spec addresses vbv buffer size (annex A).
> 
> It's a shame that the spec is not freely available. . .

Uh, it's not? Well, the drafts certainly have been. See for example
http://students.washington.edu/lorenm/src/x264/ITU-T_H264.pdf.gz
(slightly altered by Loren, content and meaning are intact)

Anyway annex A does list buffer sizes for each level (see below).

> I experienced that too.  I set vbv_max_bitrate to 768, and  
> vbv_buffer_size to some large value (naively), and then watched as my  
> peak bit rate ended up being around 1000.  I'm trying to understand  
> how why this occurred.

You have to set a bitrate.

> Then what is special?  what determines the max bitrate of the  
> stream?  How is max bitrate measured?  It it average max bitrate?  if  
> so, what is the period of the averaging?

You have to distinguish average bitrate from local bitrate. vbv_maxrate
+ buffer size are how you control local bitrate. Average bitrate need
not even be related. There isn't any time period necessarily associated
with buffer size.

I checked Annex A, and unless I don't understand the chart headings,
you should use a 2,000,000 bit vbv_buffer for level 1.3. See A.3.1.

> Basiclly, I could ask: how do I encode ipod video?  Then someone will  
> tell me a list of flags.  If I ask someone to explain the flags, then  
> I can figure out what I need to set for ipod video, and what  
> compromises I am making in doing so.

Hope you post a guide somewhere when you figure it out. People keep
asking questions about ipod in various places. (no, I don't know what it
needs exactly either, haven't looked into it)

-- 
This is the x264-devel mailing-list
To unsubscribe, go to: http://developers.videolan.org/lists.html



More information about the x264-devel mailing list