H264 GDR-only encoding using Jetson multimedia API?

Is it possible to get the H264 encoder in the Jetson multimedia API to use only GDR? I.e. no full I-frames or IDR, just a gradual slice refresh over X frames (if first frame is IDR that’s OK). If it’s possible, what parameters needs to be set?

My use case here is to get steady network streams of a large number of cameras going, without the peak data burst issues that simultaneous I-frames would create on the network. Using gstreamer is not an option for me.

Running Jetpack 4.6.2.

Hi,
Please refer to the discussion in the topic:
Jetson Nano multimedia API example 01_encoder with gdr - #5 by DaneLLL

And give it a try. The case of only-first-frame-is-IDR is not tested and it may not work properly. You may give it a try, or try larger interval such as 1000.

Thank you for the fast response and the link. Having read the discussion and example code I still have some questions though.

Is waiting a few frames before enabling GDR the suggested or required procedure? From my tests, if I set it from the very first frame I can get decoding errors on the other end (QSV decoder).

What are supported/good values for nGDRFrames? I see values as low as 6 being mentioned, but for my use case I could envision setting 30 or 60, or even higher.

I would also like to know how often it is required to set the GDR metadata parameter. In the example code it seems it’s set once, after the specified number of frames have been queued. Does it need to be set periodically? Would it be OK to set for every frame? There is very little documentation on how the GDR parameter actually works.

Hi,
In 01_video_encode, it demonstrates setting GDR once. You can modify the code to set v4l2_enc_gdr_params periodically. If nGDRFrames is set to 11 fames, you may set the period to 12 or 13 frames.

Setting nGDRFrames to 30 or 60 is not tested and it may not work properly. If you hit issue in the setting, please share the command and we can set up Jetpack 5.1.1 to check further. To check if the mode can be supported or not.

OK, but just to be clear, to have the GDR feature enabled continuously, is it required to set it again after nGDRFrames has passed?

Hi,
Yes, it is required to set it again after nGDRFrames has passed.

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