[x264-devel] Re: Constatnt Bitrate

Alex Izvorski aizvorski at gmail.com
Thu Mar 15 05:51:57 CET 2007


On Thu, 2007-03-15 at 14:52 +0330, Azadeh Rasouli wrote:
> Hi everybody,
>  
>  Can anyone tell me how I can have a constant bit-rate when I'm using
> x.264 for coding? when I use x.264's option (e.g. -B 400)  for
> running, bitrate is increased a lot (more than the time when the
> target bitrate is not specified) and it's a lot more than the bit-rate
> that I want to have. 
>  
> I typed : 
>  
>     ./x264 -v --b-rdo -t 2  -r 3 --frames 3 foreman.yuv -o output.x264
> 176x144  -------> result : 372.73 kb/s 
>    ./x264 -v --b-rdo -t 2 -B 400 -r 3 --frames 3 foreman.yuv -o
> output.x264 176x144 -----> result : 469.07 kb/s 
>  
>  
> Thanks for your help in advance.
>  
> Regards,
> Azadeh

Hello,

Try giving it the following options: --bitrate=400 --vbv-maxrate=400 .

With just bitrate, you get ABR mode not CBR, i.e. the bitrate may go
over temporarily, sometimes by a lot, but the average will be about
right.  With vbv-maxrate, you get CBR mode, it will generally stay
within several percent of your target all the time.  CBR may still be
under the specified rate if you have very simple footage (a still
image), or go over if you have really pathological footage (randomly
inserted horizontal bands of noise).  Another useful option is
vbv-bufsize, which is effectively the averaging period for the bitrate.

A couple more thoughts: 
- foreman is on the short side for ratecontrol to fully kick in; if you
want something much closer to the specified rate, use a longer clip (a
few minutes?)
- 400 is a very high bitrate for the size of your clip: normally
0.15-0.25 bits/pixel is good, you're at 0.63.  I'm not sure why that
would screw up ratecontrol, if anything it should be the other way
around, but it might - try with a 720x480 or 352x288 and 0.20
bits/pixel.
- you may want to set --fps=30: foreman is 30(?), you are just using the
default 25 here.

Regards,
--Alex

-- 
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