AV1 encoder does not work rpc option for changing bitrate and framerate

Hi, I am trying to encode with rpc option to change bitrate and framerate while encoding the stream with following options. H.264 works properly. But it seems that AV1 does not work.

H.264:

$ ./video_encode input.yuv 1280 720 H264 out.h264 -br 1500000 -rpc "f900,b500000"
Creating Encoder in blocking mode 
Opening in BLOCKING MODE 
NvMMLiteOpen : Block : BlockType = 4 
===== NVMEDIA: NVENC =====
NvMMLiteBlockCreate : Block : BlockType = 4 
875967048
842091865
H264: Profile = 66, Level = 51 
NVMEDIA: Need to set EMC bandwidth : 376000 
NVMEDIA_ENC: bBlitMode is set to TRUE 
Frame 900: Changing parameters
Bitrate = 500000
875967048
842091865
Could not read complete frame from input file
File read complete.
Got 0 size buffer in capture 
App run was successful

AV1:

$ ./video_encode input.yuv 1280 720 AV1 out.av1 -br 1500000 -rpc "f900,b500000"
Creating Encoder in blocking mode 
Opening in BLOCKING MODE 
NvMMLiteOpen : Block : BlockType = 283 
===== NVMEDIA: NVENC =====
NvMMLiteBlockCreate : Block : BlockType = 283 
808539713
842091865
NVMEDIA: Need to set EMC bandwidth : 846000 
NVMEDIA_ENC: bBlitMode is set to TRUE 
Frame 900: Changing parameters
Bitrate = 500000
808539713
842091865
Could not read complete frame from input file
File read complete.
Got 0 size buffer in capture 
App run was successful

Here is the encoded bitrate on H.264 and AV1. As you can see, AV1 line shows always 1500kbps.

I had tried framerate. But this was also same result.

Hi,
Thanks for reporting it. We will check this.

Hi,
We have checked this and confirmed this is hardware constraint.
With further confirmation, there is no software implementation for this.
Bitrate and frame rate cannot be changed in runtime in AV1 encoding. The parameters are only configurable in initialization.

Thank you for your update. Do you have a plan to implement this feature in AV1 encoding? I am planning to use Orin encoder for WebRTC but it does not stream video stably without this feature. Because WebRTC estimates the bitrate in runtime then it need to encode with estimated bitrate accurately.

Hi,
We are checking this. As of now it is not planned yet. Is it fine to use H265 or VP9 in your use-case?

Yes, we are checking another codec also. Does it support VP9 codec? it seems that it does not support VP9.

Hi,
Yes, your are correct. There is only VP9 decoder. No VP9 encoder. Sorry for the confusion.

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

Hi,
This is enabled on Jetpack 5.1.1(r35.3.1). Please upgrade to the release and try the commands on AGX Orin or Orin NX:

01_video_encode$ gst-launch-1.0 videotestsrc num-buffers=500 ! video/x-raw,width=1920,height=1080 ! filesink location=~/a.yuv
01_video_encode$ ./video_encode ~/a.yuv 1920 1080 AV1 ~/a.av1 -br 8000000 --report-metadata -rpc "f250,b4000000"
01_video_encode$ ./video_encode ~/a.yuv 1920 1080 AV1 ~/a.av1 -br 8000000 --report-metadata -rpc "f250,r60/1"
1 Like