View Full Version : ABR Buffer Size of X264 Rate Control
xkfz007
8th October 2013, 02:42
In the abr mode of x264 rate control, a buffer is used. However, the buffer size is changing, which is increasing by step sqrt(fps value), such as sqrt(25), sqrt(30), sqrt(50). I do not understand the reason why the buffer size is variable, rather than a constant? Someone please give me some hints.
Dark Shikari
8th October 2013, 02:50
In 1-pass ABR, the goal is to hit an average bitrate for the whole video, without any constraints. The encoder does not know the length of the video, so the "buffer size" for this decision increases as it gets more and more frames. Ideally (as in 2-pass), the "buffer" would be the entire video.
As far as I can tell though, the sqrt is of the duration of the video so far, not the fps.
xkfz007
8th October 2013, 03:37
Thanks very much. It is the duration of the video, and I remembered incorrectly. It is my honor to get a reply from the professor of x264.
xkfz007
8th October 2013, 04:09
In 1-pass ABR, the goal is to hit an average bitrate for the whole video, without any constraints. The encoder does not know the length of the video, so the "buffer size" for this decision increases as it gets more and more frames. Ideally (as in 2-pass), the "buffer" would be the entire video.
As far as I can tell though, the sqrt is of the duration of the video so far, not the fps.
In x264 1-pass ABR, the initial value of the buffersize is:
abr_buffer = 2 * rcc->rate_tolerance * rcc->bitrate
Suppose the rcc->rate_tolerance equals 1.0. So the initial value is the twice the value of bits of first seconds. And the following size increases every second. I wander if it is reasonable to set the initial value of abr buffer as rcc->bitrate*1(the bits of first second), and increase the it by rcc->bitrate*1, which means for the first second the value is rcc->bitrate*1, second for rcc->bitrate*2, third for rcc->bitrate*3?
vBulletin® v3.8.11, Copyright ©2000-2026, vBulletin Solutions Inc.