Low bit rate H.265 encoder help

The following gstreamer pipeline fragment with encode (video) into a 200kps bandwidth-limited stream:

x265enc bitrate=140 option-string=“vbv-maxrate=200:vbv-bufsize=800”

The video is typically VGA quality at this low bit rate, but this is adequate for my purposes.

Is there a way to get the same effect with either of the Jetpack hardware H.265 encoders?

(i.e. omxh265enc or nvv4l2h265enc)

My experience, thusfar, is that target bitrate is not respected on these hardware encoders and that cbr (constant bit rate) mode does not work.

This seems like it would be a common use case.
What am I missing?

Hi,
Please use nvv4l2h265enc plugin and configure CBR + virtual buffer size:
Random blockiness in the picture RTSP server-client -Jetson TX2 - #5 by DaneLLL

DaneLLL and others who have struggled to get constant bit rate H.265 encoding to work on the Jetson:

  1. The bitrate property of nvv4l2h265enc and omxh.265enc is specified in bits per second – not kilobits per second!

  2. Setting the vbv-size property explicitly is not necessary.

  3. If you specify a bitrate that is too low, the encoder will quietly ignore it. If trying to achieve a low-bit rate, test with lo-res video initially, then increase the resolution until the bitrate output from the encoder begins to increase. (until it starts overriding your specified bit rate)

  4. The omxh265enc is superior to the nvv4l2h265enc in producing low bit-rate streams relatively free of artifacts.

Here are the omxh265 encoder properties that work for me:

omxh265enc bitrate=$((BITRATE*1000)) control-rate=2 EnableTwopassCBR=1 EnableStringentBitrate=1

where BITRATE is the (usual) target kilobits/s

I found this would encode 768x432x30fps video at ~150kbps or any other BITRATE I choose > 150kbps.

NVidia:
Please document that your bitrate units are in bits/s, especially given that the other gstreamer encoders use kilobits/s

Hi,
Thanks for the sharing. We did not notice x264enc has bitrate in kbit/sec. Will check to add bit/sec in gst-inspect-1.0 nvv4l2h264enc in future release.

The omx plugins are not maintained for a while, if you see stability issues, we would encourage to use v4l2 plugins.

We do see CBR +virtual buffer size working in most cases. Probably it does not has significant difference in your use-case.

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