[x264-devel] Is it possible to dynamically change the quality mode using libx264

Jason Garrett-Glaser darkshikari at gmail.com
Mon Oct 26 20:02:11 CET 2009


On Mon, Oct 26, 2009 at 11:12 AM, declan harrison
<harrison.declan at googlemail.com> wrote:
> Hi
>
> Im using x264 with ffmpeg to encode videos on the fly (realtime with minimum
> buffering) in a proxy.  So I am working on a HTTP stream and therefore 1
> pass encoding is the only option available to me.
>
> My use case is that after encoding the video for say 10 seconds with a
> "--crf" value of 22 another network element informs me that I need to
> increase/decrease the quality of the video stream being sent to the client.
> I then would like to change the effective "crf" value that I am currently
> encoding the video stream.

For streaming you need to set a maxrate and bufsize so that you don't
exceed the bounds of your connection.  If you want absolutely no
buffer whatsoever, i.e. zero-latency, you need to set bufsize =
(maxrate / framerate).

x264 currently does not support reconfiguring ratecontrol in realtime,
but you can re-init the encoder if you want.

Dark Shikari


More information about the x264-devel mailing list