Rate Control Issues:
There are two main classes of Rate Controls:
- Virtual-buffer based (implemented in x264 as well as in x265). Such kind of Rate Control is based on virtual buffer model. The encoder tries to not violate (usually not to overflow) the virtual buffer. The virtual buffer parameters:
- size, often called as ‘VBV_size’
- draining bitrate, often called ‘VBV_bitrate’
- initial virtual buffer fullness before starting drained
The idea of virtual buffer appeared a while ago when video was transmitted via telephone or cable TV networks and constant bitrate was must.
From the figure above output of Video Encoder is sent into a smoothing buffer that is drained in a constant rate. In order to keep the constant drained rate the smoothing buffer must not overflow or underflow. The feedback controls Video Encoder output rate to not violate the smoothing buffer. Rate control controls fullness of the smoothing buffer by adjustment of quantization factors, rarely by frame rate.
- ρ-domain rate controls (unfortunately not realized in x264). The relationship between rate and quantization is built through the special parameter ρ, which
is the percentage of zeros among the quantized transform coefficients.
ρ-domain rate control is found to be skewed for low bitrates since significant amount of bits are spent on MB/CTU overhead (motion data etc), therefore an impact of residential bits gets weaker.
In non-multicast case Encoder can get a feedback from Receiver on massive packet losses and in such case Rate Control adjust quantization parameters to reduce output bitrate.
Improvement of Rate Control can be achieved if Content Analysis added:
The above figure is taken from the paper “Rate Control Technology for Next Generation Video Coding Overview and Future Perspective”, Hao Zeng et al.
Note:
Most of Rate-Control implementations are based on R-Q relationship (Q stands for the quantization step) as an approximation of R-D curve. How accurate is R-Q for low-bitrate scenarios? In high and moderate bitrates the lion’s portion of bits belong to residual values. The residual values are directly impacted by Q. In low-bitrate cases a significant portion of bits belong to CTU/MB overhead (e.g. motion data), R-Q relationship is expected to be less accurate. Changing Q might lead to a negligible change of the bit-size of a CTU/MB.
Use Case of Frame Level Rate Control
Chicken and Egg Dilemma in Rate Control Implementation
Is it correct to double the bandwidth when frame rate of video switched from 30Hz to 60Hz?
Scene Change Detection:
Overview of Scene Change Detection Methods
OpenCV for Video Encoding:
Scalable Video Coding:
Why Quality Scalability is not widely Used?
Streaming and Containers:
How Extract Video Stream from DASH Segment (mp4)?
How Get Number Slices per Frame in mp4?
Unsorted Issues:
Flattening in Quality-Rate Curve
On DCT Transform Decorrelation Property
23+ years’ programming and theoretical experience in the computer science fields such as video compression, media streaming and artificial intelligence (co-author of several papers and patents).
the author is looking for new job, my resume
Thanks for your blog, nice to read. Do not stop.