Nvv4l2h265enc doesn't seem to support keyframe intervals larger than 30

I tried to build a GStreamer pipeline with following nvv4l2h265enc settings.

nvv4l2h265enc iframeinterval=40 bitrate=8000000 insert-vui=true

Everything works as expected except that iframeinterval seems to be capped on 30 regardless of framerate - setting it to 1, 10 or 30 gives appropriate results, while everything above gives the same results as setting it to 30. I’ve also tried to use SliceIntraRefreshInterval instead of iframeinterval, and it behaves exactly the same. How can I make nvv4l2h265enc give me keyframe interval of, let’s say, 300 frames?

Hi,
Do you use r32.6.1(Jetpack 4.6)? On the release, we add one property for setting IDR interval:

  idrinterval         : Encoding IDR Frame occurance frequency
                        flags: readable, writable, changeable only in NULL or READY state
                        Unsigned Integer. Range: 0 - 4294967295 Default: 256

Please also set it along with iframeinterval.

I use L4T 32.4.4 [ JetPack 4.4.1 ]. The parameter you mentioned isn’t implemented there yet, it seems.

  1. Can I assume that before idrinterval was added, iframeinterval implementation in nvv4l2h265enc was bugged and unable to be used properly for values above 30 (in omxh265enc such probem didn’t exist)?
  2. With idrinterval added, do I always have to make it the same value as iframeinterval for values above 30 to work?

Can I expect any answers to questions above?

Hi,
You may download gst-v4l2 of r32.6.1 and build/replace it on r32.4.4. Please backup original libgstnvvideo4linux2.so before the replacement.

Or refer to the code and port it to r32.4.4. It is a simple change to add a property.

Thanks for your input, but that still doesn’t answer any of the questions I asked above.

Hi,
As you have noticed, the property is not implemented on Jetpack 4.4.1. If you need to set the property in your use-case, we would suggest upgrade to latest release.

I have noticed that, and I am planning to upgrade, but that still doesn’t answer my questions. I’ll repeat them here:

  1. Can I assume that before idrinterval was added, iframeinterval implementation in nvv4l2h265enc was bugged and unable to be used properly for values above 30 (in omxh265enc such probem didn’t exist)?
  2. With idrinterval added, do I always have to make it the same value as iframeinterval for values above 30 to work?

Does it really work in JP 4.6? I updated to this version and looks like it didn’t help.

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