Gstreamer: H264/5 Encoders lacks NumberOfReference setting

Both elements gstv4l2h264enc and gstv4l2h264enc lacks the important ability to setup Reference Frames.

The code is easy to implement, but it looks like the driver is not ready for it?

Hi,
This is a new feature. If you need the function, please contact us https://www.nvidia.com/en-us/contact/sales/
Thanks for requesting this, and sorry for giving wrong feature request process in the initial answer. Jetson feature requests are always welcome in the forum. See #10 and #12 below for updates.

I don’t understand.

“New” Feature?

Contact Sales?

So this is a business issue?

Hi,

Yes, by default encoder decides reference frames and it cannot be configured.

I’m more confused now.

As other people have reported, the GStreamer software provided by nVidia is not “robust,” nor something that can be considered good enough to be used as a commercial product. So this is by design? (business “strategy”)

I mean, the Jetson Nano product is designed as a “mousetrap” to get our attention, to then contact sales and “allow us” to buy the “production” software and professional consulting services/support to use the Jetson Nano as a product? In this case (if this is the case), can you be so kind as to point me to a web page describing the commercial grade SW and services available and the cost? (or is so expensive that I need to “contact sales”)

OR

Simply: The software level of the Jetson Nano is now in an embryonic stage and open to developers & entrepreneurs as an early “opportunity” to allow us to provide commercial solutions to the general public.

Yes, by default encoder <b>decides reference frames</b> and it cannot be configured.

BTW: I checked the stream, The number of Reference Frames is always the same “ONE” In other words, the encoder is NO deciding the number of reference frames. And as coded on 01_video_encoder, the Number of Reference Frames can be configured.

Hi,
gst-v4l2 is open source code. Please refer to NvVideoEncoder.cpp and implement it by yourself.

I will.

Feedback, it is critical that nVidia clarifies to the public the current stage of the SW available. The Jetson Nano is an impressive piece of Hardware while the core SW is just “open source” quality. For me, this means “opportunity.”

Thanks, Dane for the clarification.

Reviewed the source and added the code to enable the configuration of num-Reference-Frames (Attached)

However something is missing: The code compiles properly and I can install the element, The new option is reported and recognized BUT the encoder doesn’t start. (maybe it requires another library/driver version?)

Please help.

gstv4l2h264enc_num-Reference-Frames.zip (6.03 KB)

Hi,
This request is reviewed. Since r32.2 is around the corner and at the last mile, it is planned to be delivered in r32.3.

Can you share any ETA for r32.2 and r32.3?

Anything I can help to enable the feature, any hint in what might be wrong (that I can control)

Hi Rudoplh,
On r32.1, please apply your patch along with below modification:

diff --git a/gst-v4l2/gstv4l2object.c b/gst-v4l2/gstv4l2object.c
index 2c0dcd8..e0b3e0a 100644
--- a/gst-v4l2/gstv4l2object.c
+++ b/gst-v4l2/gstv4l2object.c
@@ -4750,7 +4750,8 @@ set_v4l2_video_mpeg_class (GstV4l2Object * v4l2object, guint label,
 
   if (control.id == V4L2_CID_MPEG_VIDEOENC_VIRTUALBUFFER_SIZE)
     control.string = (gchar *) &buffer_size;
[b]-  else if (control.id == V4L2_CID_MPEG_VIDEOENC_SLICE_INTRAREFRESH_PARAM)
+  else if (control.id == V4L2_CID_MPEG_VIDEOENC_SLICE_INTRAREFRESH_PARAM ||
+           control.id == V4L2_CID_MPEG_VIDEOENC_NUM_REFERENCE_FRAMES)[/b]
     control.string = (gchar *) &params;
   else
     control.value = params;

And try again.

Works perfect! Thanks!