Limit nvv4l2h264enc/nvv4l2h265enc max bitrate


• Hardware Platform: Jetson Xavier NX
• JetPack Version: 5.0.2

I run the following GStreamer pipeline, H.265 encoding a 720p 25fps video and sending MPEG-TS through UDP:

... ! videorate max-rate=25 drop-only=true ! queue max-size-buffers=3 leaky=downstream ! nvvidconv ! nvv4l2h265enc control-rate=constant_bitrate iframeinterval=50 insert-sps-pps=true profile=Main num-B-Frames=0 preset-level=UltraFastPreset EnableTwopassCBR=false maxperf-enable=true bitrate=1250000 vbv-size=200000 ! h265parse ! mpegtsmux name=stream_muxer alignment=7 ! queue ! udpsink sync=false host= port=5004 ! ...

My wireless link has a bandwidth of 2Mbps, and I’m trying to optimize nvv4l2h265enc for maximum bandwidth and quality. Since I-frame is once per 2 seconds, I need to smooth the stream so that it never exceeds 2Mbps. that’s the reason for 1.25Mbps bitrate with 200000 vbv-size.

Is this the right approach? Can someone please explain vbv-size in more details than documented (actually couldn’t find any)?

Thank you!

Fir this use-case, we would suggest set virtual buffer size. Please refer to the example in
Random blockiness in the picture RTSP server-client -Jetson TX2 - #5 by DaneLLL

2Mbps is a bit strict for 720p25. For quick scene changes, it may exceed the limit. Please note this.