The H264 or H265 encoder can not control the bitrate if the framerate change

The interface enc->setBitrate(bps) can set the video stream bitrate,and it work well.
But sometimes we want to change both the bitrate and the framerate, and the output video stream bitrate not be controled , eg:

enc->setRateControlMode(V4L2_MPEG_VIDEO_BITRATE_MODE_CBR);
enc->setBitrate(1.510001000)
enc->setFrameRate(25, 1); // when we init the encoder,the output bitrate is 1.5M
…//some times later
enc->setBitrate(18001000)
enc->setFrameRate(15, 1); // and we begin to use the 15fps to push the YUV frame to the encoder, but the output bitrate is not 800k

So how to change both fps and framerate,and make sure the encoder bitrate control right?

Hi,
Do you use Orin Nano? There is no hardware encoder in Orin Nano, so NvVideoEncoder class is not supported. You would need to use software encoder.

Sorry,In fact I used Jetson Xavier Nx.

Hi,
We have the demonstration in the sample:

/usr/src/jetson_multimedia_api/samples/01_video_encode

Please try the runtime option:

Runtime configurable parameter string should be of the form:
"f<frame_num1>,<prop_id1><val>,<prop_id2><val>#f<frame_num1>,<prop_id1><val>,<pr
op_id2><val>#..."
e.g. "f20,b8000000,i1#f300,b6000000,r40/1"

This topic was automatically closed 14 days after the last reply. New replies are no longer allowed.