[x264-devel] Dynamic setting of ratecontrol parameters (bitrate, fps)

Anne Aaron anne at dyyno.com
Tue Jan 22 20:34:27 CET 2008


I am also interested in dynamically changing the rate control parameters (bitrate and fps) for CBR rate control with a VBV.

For varying fps (constant bitrate and VBV size), as an intermediate patch, I do the following --
I keep track of the average fps given a time window, and for every new frame I update rc->fps, and recalculate rc->buffer_rate and rc->cbr_decay.

When I run in single thread mode the resulting bitstream seems close enough to CBR. But I am not yet familiar with all the aspects of the x264 rate control so I am not sure whether there's an issue with this. Does anyone see a problem with doing this? If these reconfigurations are ok, could we integrate it and possibly other dynamic rate control changes in x264_encoder_reconfig()? I am looking into dynamically changing the bitrate next.


Anne

-----Original Message-----
From: x264-devel-bounces at videolan.org [mailto:x264-devel-bounces at videolan.org] On Behalf Of Mojtaba Hosseini
Sent: Monday, January 21, 2008 7:13 AM
To: Mailing list for x264 developers
Subject: [x264-devel] Dynamic setting of ratecontrol parameters (bitrate, fps)

Hello,
 I'm interested in changing the average output bitrate of the encoder *dynamically* (in the middle of encoding). From a 2005 post,

http://mailman.videolan.org/pipermail/x264-devel/2005-November/001251.html

Loren states that "There is no way to reinitialize ratecontrol in the middle of an encode".
Looking at the current code, this is still the case with x264_encoder_open() initializing all ratecontrol parameters that are not really changeable from then on.
My questions are:
Is there any interest in the community for the feature of dynamically changing ratecontrol parameters (such as bitrate, qp, etc)? Can anyone suggest an elegant approach? (other than
encoder_open() and close() for every change in ratecontrol!).
Any help or suggestion is appreciated.

Mojtaba Hosseini




More information about the x264-devel mailing list