NVENC can't reach the target bitrate I set

Here is my RC configuration:
nvEncodeConfig = nvEncAPI->nvEncGetEncodePresetConfig()//preset=NV_ENC_PRESET_LOW_LATENCY_HQ_GUID
nvEncodeConfig->rcParams.vbvBufferSize = 0;
nvEncodeConfig->rcParams.vbvInitialDelay = 0;
nvEncodeConfig->rcParams.rateControlMode = NV_ENC_PARAMS_RC_2_PASS_QUALITY;
nvEncodeConfig->rcParams.averageBitRate = 1000,000;
nvEncodeConfig->rcParams.maxBitRate = 1000,000;

My final output bitrate is about half of my target bitrate, which is 500000. This really confused me.
Looking forward to your reply and help!


Can you share more details regarding how you measure target bitrate? Sample application that reproduces this issue will be more useful for us to review and comment. Also, did you observe same behavior with different contents?

It is not clear if your question really is ‘how to achieve exact target bitrate?’.
If that is what you ask, then target bitrate can be achieved using CBR mode and enable ‘NV_ENC_CONFIG_H264::enableFillerDataInsertion’.


Sorry, my bad. I set the frame rate to 30fps. But the true frame rate sending to the encoder is 18fps.So the encoder can’t reach that bitrate