[x264-devel] Question about changing x.264 bitrate on the fly

David Wolstencroft lordrpi at gmail.com
Tue Mar 3 01:39:49 CET 2009


x264 --help
Look at "--zones"

On Mon, Mar 2, 2009 at 4:25 PM, Mark Sauer <mark at skitter.tv> wrote:

> I am looking at creating an application of x.264, but I would like to be
> able to specify the bit rate of different sections of the video sequence.
> IE, I'd like to be able to say
>
> frames 1-300 are at 600 kbps
> frames 301-450 are at 1200 kbps
> frames 451-900 are at 900 kbps
>
> and so on.  I noticed there is an interface to the library
> "x264_encoder_reconfig", but the body doesn't seem to allow for changes to
> the bitrate.
>
> Would it be safe to do something like:
>
> x264_encoder_open( set bitrate to 600 );
>
> for(i=0;i<300;i++) {
>  x264_encoder_encode( frame i );
>  store the nal blocks in a file, etc
> }
>
> x264_encoder_close();
> x264_encoder_open( set bitrate to 1200 );
>
> for(i=300;i<450;i++) {
>  x264_encoder_encode( frame i );
>  store the nal blocks in a file, etc
> }
>
> x264_encoder_close();
> x264_encoder_open( set bitrate to 900 );
>
> for(i=451;i<900;i++) {
>  x264_encoder_encode( frame i );
>  store the nal blocks in a file, etc
> }
>
> x264_encoder_close();
>
> Or would there possibly be some issues with this approach?
> Thanks
> Mark Sauer
> _______________________________________________
> x264-devel mailing list
> x264-devel at videolan.org
> http://mailman.videolan.org/listinfo/x264-devel
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mailman.videolan.org/pipermail/x264-devel/attachments/20090302/0a49a38f/attachment.htm>


More information about the x264-devel mailing list