Dynamic bitrate is not working in gst-v4l2

Hello.

My previous forum is this.
https://forums.developer.nvidia.com/t/dynamic-bitrate-in-gst-omx-encoder-does-not-work-at-high-fps/125211

As suggested, I built the gst-v4l2 plugin with an r32.2.3 version that matches the L4T on my tx2 board to check for dynamic bitrate changes.

0:00:04.166126744  3030   0x7f70017d40 ERROR           v4l2videoenc gstv4l2videoenc.c:1034:gst_v4l2_video_enc_loop:<nvv4l2vp8enc1> output buffer size 32312

0:00:04.193630619  3030   0x7f70017d40 ERROR           v4l2videoenc gstv4l2videoenc.c:1034:gst_v4l2_video_enc_loop:<nvv4l2vp8enc1> output buffer size 32382

0:00:04.199995970  3030   0x7f70017d90 ERROR           v4l2videoenc gstv4l2videoenc.c:1034:gst_v4l2_video_enc_loop:<nvv4l2vp8enc0> output buffer size 31769

**/GstPipeline:pipeline0/nvv4l2vp8enc:nvv4l2vp8enc0: bitrate = 10000**

0:00:04.227262266  3030   0x7f70017d90 ERROR           v4l2videoenc gstv4l2videoenc.c:1034:gst_v4l2_video_enc_loop:<nvv4l2vp8enc0> output buffer size 31861

**/GstPipeline:pipeline0/nvv4l2vp8enc:nvv4l2vp8enc0: bitrate = 10000**

0:00:04.233256642  3030   0x7f70017d40 ERROR           v4l2videoenc gstv4l2videoenc.c:1034:gst_v4l2_video_enc_loop:<nvv4l2vp8enc1> output buffer size 32322

0:00:04.260824735  3030   0x7f70017d40 ERROR           v4l2videoenc gstv4l2videoenc.c:1034:gst_v4l2_video_enc_loop:<nvv4l2vp8enc1> output buffer size 32369

0:00:04.265886490  3030   0x7f70017d90 ERROR           v4l2videoenc gstv4l2videoenc.c:1034:gst_v4l2_video_enc_loop:<nvv4l2vp8enc0> output buffer size 31885

(The size of the output buffer was printed using GST_ERROR.)

Looking at the above, when running at 30 fps, the bit rate was changed from 6000000 bps to 10000 bps with the dynamic bit rate change command, but the dynamic bit rate change is not applied properly because the size of the output buffer of the encoder does not change.

gst-v4l2 encoder does not change the dynamic bit rate in the vp8 / h264 codec.

  1. Doesn’t the gst-v4l2 plugin support dynamic bitrate changes?
  2. If it supports dynamic bitrate change, is there a reason it does not apply in my environment?

This is not an answer…You would tell your L4T release, but you may also read this.
This was for Xavier, not sure about TX2. Someone else may further comment.
VP8 may not be efficient for low bitrates, though.

Thanks for the reply.

My L4T version is r32.2.3.

As far as I know, vp8 has been removed from the xavier board, but remains on the tx2 board.

Hi,
We have verified it working in


Could you refer to the sample and try again?

When I ran the case, dynamic bitrate works in nvv4l2encoder (both vp8 and h264). I think there was something wrong with my environment.

Thanks for the reply !

1 Like