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

Johannes Ebersold johannes.ebersold at dfki.de
Thu Mar 29 18:31:34 CEST 2012


Hi,

thanks for your answer and your great work on the x264 encoder :)

I am short on time today, but may provide a sample tomorrow ...

We did some testing today and dropped the idea of increasing quality by 
adjusting QPs, thus we now have a stream with normal CRF setting (23) 
and AQ.

But our problem remains ... and maybe i should clarify my question somewhat:
We put the same image into the encoder about  500 times in a row, might 
also be more or less, just to say a concrete and realistic number ;) The 
bit rate, after the first frame, should drop to (nearly) zero, even with 
intra refresh activated and started with the first of those 500 frames? 
Unfortunately this does not happen and the bit rate is on a constant 
(high) level.

Thanks again
Johannes


On 03/28/2012 06:12 PM, Jason Garrett-Glaser wrote:
> 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
> _______________________________________________
> x264-devel mailing list
> x264-devel at videolan.org
> http://mailman.videolan.org/listinfo/x264-devel



More information about the x264-devel mailing list