[x264-devel] aqp and bit rate if content is static

Jason Garrett-Glaser jason at x264.com
Wed Mar 28 18:12:01 CEST 2012


On Wed, Mar 28, 2012 at 4:45 AM, Johannes Ebersold
<johannes.ebersold at dfki.de> wrote:
> Hi,
>
> I have some questions concerning Adaptive Quantization as well as Intra
> refresh, both used in an low-latency streaming setup.
>
> But, first a few words on the the setup: We use x264 to encode an image
> stream provided by an renderer. The encoded video stream is sent to an
> client using an RTSP stream.
>
> However, we would like to have something like low-latency, high-quality and
> low band width, which is of course nearly impossible :)
> Thus, we use adaptive quantization and add aqp modifiers based on the
> rendered image in order to achieve high quality for interesting regions and
> low quality for regions somehow not interesting. We use crf of default value
> 23 and modify the QP in a range from -25 (achieving nearly highest quality)
> to 5 (lowering the quality somewhat). Since the regions of interest are
> rather small we save up band width compared to encoding without modifying
> the QPs.
>
> Since the renderer renders new images only on user interaction, we often
> have long times in which no changes of the streamed image happens (e.g. 3
> minutes and more) and the same image is feed to the encoder until a new
> image appears. We now implemented an iterative process, which increases
> quality (by decreasing QPs to 0) in 10 steps, which means, that after 10
> consecutive frames without content change we should have a "perfect"
> picture.
>
> In order to achieve low latency, we additionally employed intra-refresh,
> triggering intra refresh every time the image content changes.

Why do you do this?

> Thus far, this works well, but we expected that, the band width would drop
> to nearly zero, after an optimal image was encoded and the content does not
> change anymore for the next x frames. Since the encoder could now use
> skip-blocks all over the place. However, the bit rate does not drop, instead
> it is constant and really high, which must be because of the high quality.
>
> Now the questions:
> - Why is does the band width not drop after reaching an "highest quality"
> image? Did we miss something? Shouldn't the bit rate drop towards zero if
> the content does not change?

I'm not entirely sure; posting a sample of your encoded video will help.

> - We modify the QP based on the QPs choosen by x264, however, those choosen
> QPs (crf 23) vary somewhat. Is there a way to see the chosen QPs, preferably
> on macroblock base?

Not programmatically, no.  They're chosen based on frame QP + AQ
offset + MBtree offset.

Jason


More information about the x264-devel mailing list