Encoding CBR h264

Hello Jetson team and developers,

I am using tx2 and gstreamer to stream 1080p30 in real-time application.

I am using JetPack 28.2.1

In order to be as CBR as it can (my stream is “monitored” at 100msec intervals), I tried to configure slices parameters:

“SliceIntraRefreshEnable” set to 1 and “SliceIntraRefreshInterval” set to 5 (or 15 or 30) but both have no effect on stream bitrate over time (mainly CBR over time), I also set “IFrameInterval” to -2 (as I saw in other question in this forum) but it didn’t gave the expected result: in all of the above scenarios, the stream looks close to CBR when my camera is static, but when a movement start, there are some very big spikes of data, that I cannot tolerate in my application.

I understand from the manual, that if using “slices”, I should see the intra frame “spreads” over some multiple frames, but I couldn’t see that. Did I understood properly the “slices” functionality? And should it works well in my version and with my parameters? If not, what can I do?


You can try to

  1. Enable two pass CBR
  2. Set virtual buffer size
  3. Set stringent bitrate

Please refer to sample commands in gstreamer user guide

Thanks for your reply.

I’ve tried all of your suggestions, but it seems that my stream is not CBR “enough” (if i’m looking at time intervals that are smaller than 1 sec).
I tried to use “slice” parameters, but that has small effect too.

  1. I saw, somewhere else in this forum, that one can configure infinite GOP mode (IPPPP…PP frames) - does my system support this feature? and how can I configure it?
  2. a little bit off-topic, what command/parameter should I use in order to force an IDR frame?


Please refer to the sample and give it a try:
h265 decode failed - #4 by DaneLLL

the IDR frame mechanism works fine, thanks

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