How to achieve restricted VBR for the MPEG2VideoEncoder?

How to achieve restricted VBR for the MPEG2VideoEncoder?


I'd like to use restricted VBR (RC_RVBR) in the MPEG2VideoEncoder.

For unrestricted VBR I set rc_mode to RC_VBR, quant_vbr[3] to certain values and bitrate to 0. Then
the output bitrate is variable, there's no restrictionn and the output quality/size depends on the quantizers (quant_vbr[3]).

However when I try to achieve restricted VBR I set rc_mode to RC_RVBR, quant_vbr[3] to certain
values and bitrate to the target limit (e.g. 6000000). But then the output bitrate is not restricted by the specified bitrate. On the other hand the output average bitrate is not close to the specified one either. It looks like the input bitrate is ignored.

According to the UMC documentation:
"Restricted VBR requires both bit rate and
quantizers to be set. This mode is similar to CBR but resulting bit rate is not greater than
the bit rate provided in parameters. The quantizer can be increased to decrease size of the
encoded frame."

It is clear that the input bitrate is intended as a restriction (either peak or average bitrate) in restricted VBR.

So, do I have to set some other settings to achieve restricted VBR in the MPEG2VideoEncoder or this is not possible (not implemented) in the current version (IPP 6.x)?

If not implemented, can I increase the quantizers and resupply the input video frame again for
encoding until I get the required bitrate? Is this possible from the public interface of the MPEG2VideoEncoder or I have to modify the implementation in the UMC classes?

6 posts / 0 new
Last post
For more complete information about compiler optimizations, see our Optimization Notice.


I also observed the same problem. The mpeg2 video encoder generates a restricted VBR bitstream, but it does not obey the specified bitrate. It seems the output bitrate is always about 5 Mbits/s. Is it possible to control the output bitrate (average and peak bitrate) of the mpeg2 video encoder in restricted VBR mode?


No one knows the answer?


Sorry for delay, we will investigate and update to you.


Naveen GV

Restricted VBR mode bitrate only sets the upper limit. The resulting bitrate should be less.
This model uses VBV similar to CBR, but when virtual buffer is full, the input flow is swithed off to avoid overflow. It leads to smaller average bitrate.
The provided quantizers are used first, but if the encoded frame length leads to VBV underflow, the frame is re-coded with bigger quantizer, and so on.

Note, that when quantizers are too small, the bitrate can be very close to the requested one.But you would get a performance drop, because each frame can be re-coded multiple times. The second minus is that in this mode VBV dances at the very bottom of the buffer and most of frames have similar bit length about bitrate/fps what gives seriuos quality drop on I and complex frames.



I am facing the same problem with IPP 7.1. When i set restricted VBR bitrate 4mbps i get output at 5 mbps max and 3mbps avg. but as per the umc manual( and Leonid Kulakov above comment) it should not cross maximum bitrate set(in my case it is 4mbps).

i set the restricted VBR in code as shown below:

m_pvidEncoderParams->rc_mode = RC_RVBR;
m_pvidEncoderParams->m_info.iBitrate = m_dwmaxVBR;

Please let me know if i am missing any other setting to achieve restricted VBR in MPEG2Encoder


Naseeb P

Leave a Comment

Please sign in to add a comment. Not a member? Join today