Nvv4l2h265enc WARN problem!

After my last topic,Nvv4l2h265enc crash problem
On 32.5.0/tx2,
Set up this env:export GST_DEBUG=2
There are a lot of warning.
Failed to determine interlace mode;
Failed to probe pixel aspect ratio with VIDIOC_CROPCAP: Unknown error -1
Opening in BLOCKING MODE
Opening in BLOCKING MODE log print twice ?
How to resolve these warnings?
huilian@localhost:~$ export GST_DEBUG=2
huilian@localhost:~$ gst-launch-1.0 videotestsrc num-buffers=100 ! ‘video/x-raw,width=(int)1280,height=(int)720,format=(string)I420,framerate=(fraction)30/1’ ! nvvidconv ! ‘video/x-raw(memory:NVMM),format=(string)I420’ ! nvv4l2h265enc ! fakesink
Setting pipeline to PAUSED …
Opening in BLOCKING MODE
Opening in BLOCKING MODE
0:00:00.211058176 10102 0x55ce45c230 WARN v4l2 gstv4l2object.c:2375:gst_v4l2_object_add_interlace_mode:0x55ce45f5e0 Failed to determine interlace mode
0:00:00.211216704 10102 0x55ce45c230 WARN v4l2 gstv4l2object.c:2375:gst_v4l2_object_add_interlace_mode:0x55ce45f5e0 Failed to determine interlace mode
0:00:00.211287232 10102 0x55ce45c230 WARN v4l2 gstv4l2object.c:2375:gst_v4l2_object_add_interlace_mode:0x55ce45f5e0 Failed to determine interlace mode
0:00:00.211442208 10102 0x55ce45c230 WARN v4l2 gstv4l2object.c:4434:gst_v4l2_object_probe_caps:nvv4l2h265enc0:src Failed to probe pixel aspect ratio with VIDIOC_CROPCAP: Unknown error -1
Pipeline is PREROLLING …
Redistribute latency…
NvMMLiteOpen : Block : BlockType = 8
===== NVMEDIA: NVENC =====
NvMMLiteBlockCreate : Block : BlockType = 8
0:00:00.216743136 10102 0x55ce458320 WARN v4l2bufferpool gstv4l2bufferpool.c:1066:gst_v4l2_buffer_pool_start:nvv4l2h265enc0:pool:src Uncertain or not enough buffers, enabling copy threshold
NVMEDIA: H265 : Profile : 1
NVMEDIA_ENC: bBlitMode is set to TRUE
0:00:00.250223296 10102 0x7f74003280 WARN v4l2bufferpool gstv4l2bufferpool.c:1513:gst_v4l2_buffer_pool_dqbuf:nvv4l2h265enc0:pool:src Driver should never set v4l2_buffer.field to ANY
Pipeline is PREROLLED …
Setting pipeline to PLAYING …
New clock: GstSystemClock
0:00:01.632544256 10102 0x7f74003280 WARN v4l2allocator gstv4l2allocator.c:1511:gst_v4l2_allocator_dqbuf:nvv4l2h265enc0:pool:src:allocator V4L2 provided buffer has bytesused 0 which is too small to include data_offset 0
Got EOS from element “pipeline0”.
Execution ended after 0:00:01.381641536
Setting pipeline to PAUSED …
Setting pipeline to READY …
Setting pipeline to NULL …
Freeing pipeline …

if i change nvv4l2h265enc to omxh265enc plugin ,it also have a lot of warning.
plugin_init failed,no config file;setting temporal_tradeoff failed;
huilian@localhost:~$ gst-launch-1.0 videotestsrc num-buffers=100 ! ‘video/x-raw,width=(int)1280,height=(int)720,format=(string)I420,framerate=(fraction)30/1’ ! nvvidconv ! ‘video/x-raw(memory:NVMM),format=(string)I420’ ! omxh265enc ! fakesink
0:00:00.130061344 10111 0x55a1814290 WARN omx gstomx.c:2826:plugin_init: Failed to load configuration file: Valid key file could not be found in search dirs (searched in: /home/huilian/.config:/etc/xdg as per GST_OMX_CONFIG_DIR environment variable, the xdg user config directory (or XDG_CONFIG_HOME) and the system config directory (or XDG_CONFIG_DIRS)
Setting pipeline to PAUSED …
Pipeline is PREROLLING …
Framerate set to : 30 at NvxVideoEncoderSetParameterNvMMLiteOpen : Block : BlockType = 8
===== NVMEDIA: NVENC =====
NvMMLiteBlockCreate : Block : BlockType = 8
0:00:00.152677792 10111 0x55a1815cf0 WARN omxvideoenc gstomxvideoenc.c:1860:gst_omx_video_enc_set_format: Error setting temporal_tradeoff 0 : Vendor specific error (0x00000001)
NVMEDIA: H265 : Profile : 1
NVMEDIA_ENC: bBlitMode is set to TRUE
Pipeline is PREROLLED …
Setting pipeline to PLAYING …
New clock: GstSystemClock
Got EOS from element “pipeline0”.
Execution ended after 0:00:01.305475616
Setting pipeline to PAUSED …
Setting pipeline to READY …
Setting pipeline to NULL …
Freeing pipeline …

Set up this env: export GST_DEBUG=5
it will get these faults:
0:00:01.099419232 10341 0x5575c16a00 INFO v4l2 gstv4l2object.c:1284:gst_v4l2_object_fill_format_list:nvv4l2h265enc0:sink got 4 format(s):
0:00:01.099458208 10341 0x5575c16a00 INFO v4l2 gstv4l2object.c:1290:gst_v4l2_object_fill_format_list:nvv4l2h265enc0:sink YM12
0:00:01.099488288 10341 0x5575c16a00 INFO v4l2 gstv4l2object.c:1290:gst_v4l2_object_fill_format_list:nvv4l2h265enc0:sink PM10
0:00:01.099521248 10341 0x5575c16a00 INFO v4l2 gstv4l2object.c:1290:gst_v4l2_object_fill_format_list:nvv4l2h265enc0:sink NM12
0:00:01.099549024 10341 0x5575c16a00 INFO v4l2 gstv4l2object.c:1290:gst_v4l2_object_fill_format_list:nvv4l2h265enc0:sink YM24

0:00:01.099825280 10341 0x5575c16a00 DEBUG v4l2 gstv4l2object.c:2668:gst_v4l2_object_probe_caps_for_format_and_size:nvv4l2h265enc0:sink Unable to enumerate intervals for YM12@4096x4096
0:00:01.099862592 10341 0x5575c16a00 WARN v4l2 gstv4l2object.c:2375:gst_v4l2_object_add_interlace_mode:0x5575eb55c0 Failed to determine interlace mode
0:00:01.100195648 10341 0x5575c16a00 DEBUG v4l2 gstv4l2object.c:2668:gst_v4l2_object_probe_caps_for_format_and_size:nvv4l2h265enc0:sink Unable to enumerate intervals for PM10@4096x4096
0:00:01.100229120 10341 0x5575c16a00 WARN v4l2 gstv4l2object.c:2375:gst_v4l2_object_add_interlace_mode:0x5575eb55c0 Failed to determine interlace mode
0:00:01.100500032 10341 0x5575c16a00 DEBUG v4l2 gstv4l2object.c:2668:gst_v4l2_object_probe_caps_for_format_and_size:nvv4l2h265enc0:sink Unable to enumerate intervals for NM12@4096x4096
0:00:01.100536768 10341 0x5575c16a00 WARN v4l2 gstv4l2object.c:2375:gst_v4l2_object_add_interlace_mode:0x5575eb55c0 Failed to determine interlace mode

0:00:01.100756032 10341 0x5575c16a00 INFO v4l2 gstv4l2object.c:4490:gst_v4l2_object_probe_caps:nvv4l2h265enc0:sink probed caps: video/x-raw, format=(string)I420, width=(int)[ 48, 4096 ], height=(int)[ 48, 4096 ], framerate=(fraction)[ 0/1, 2147483647/1 ]; video/x-raw, format=(string)P010_10LE, width=(int)[ 48, 4096 ], height=(int)[ 48, 4096 ], framerate=(fraction)[ 0/1, 2147483647/1 ]; video/x-raw, format=(string)NV12, width=(int)[ 48, 4096 ], height=(int)[ 48, 4096 ], framerate=(fraction)[ 0/1, 2147483647/1 ]
0:00:01.100797504 10341 0x5575c16a00 DEBUG v4l2 gstv4l2object.c:1247:gst_v4l2_object_fill_format_list:nvv4l2h265enc0:src getting src format enumerations
0:00:01.100837376 10341 0x5575c16a00 INFO v4l2 gstv4l2object.c:1284:gst_v4l2_object_fill_format_list:nvv4l2h265enc0:src got 4 format(s):
0:00:01.100871776 10341 0x5575c16a00 INFO v4l2 gstv4l2object.c:1290:gst_v4l2_object_fill_format_list:nvv4l2h265enc0:src VP90
0:00:01.100904576 10341 0x5575c16a00 INFO v4l2 gstv4l2object.c:1290:gst_v4l2_object_fill_format_list:nvv4l2h265enc0:src VP80
0:00:01.100936768 10341 0x5575c16a00 INFO v4l2 gstv4l2object.c:1290:gst_v4l2_object_fill_format_list:nvv4l2h265enc0:src H265
0:00:01.100968480 10341 0x5575c16a00 INFO v4l2 gstv4l2object.c:1290:gst_v4l2_object_fill_format_list:nvv4l2h265enc0:src H264
0:00:01.101024224 10341 0x5575c16a00 WARN v4l2 gstv4l2object.c:4434:gst_v4l2_object_probe_caps:nvv4l2h265enc0:src Failed to probe pixel aspect ratio with VIDIOC_CROPCAP: Unknown error -1

gstv4l2object.c:2668,
2495 /* keep in mind that v4l2 gives us frame intervals (durations); we invert the
2496 * fraction to get framerate */
2497 if (v4l2object->ioctl (fd, VIDIOC_ENUM_FRAMEINTERVALS, &ival) < 0)
2498 goto enum_frameintervals_failed;
so " Failed to determine interlace mode" caused by ioctl VIDIOC_ENUM_FRAMEINTERVALS failed
gstv4l2object.c:4434
4430 if (v4l2object->ioctl (v4l2object->video_fd, VIDIOC_CROPCAP, &cropcap) < 0) {
4431 if (errno != ENOTTY)
4432 GST_WARNING_OBJECT (v4l2object->dbg_obj,
4433 “Failed to probe pixel aspect ratio with VIDIOC_CROPCAP: %s”,
4434 g_strerror (errno));
4435 }

so “Failed to probe pixel aspect ratio” caused by ioctl VIDIOC_CROPCAP failed

Hi,
These look harmless and you should get valid h265 stream if you save to a file. We get the code of gst-v4l2 from 3rdparty and enable hardware acceleration. And certain warning messages are not taken care, but these are harmless and can be ignored.

If you do not get valid h265 stream, please share the steps so that we can replicate the issue and work with teams for further investigation.

yes,these look harmless,and pipeline run fine;
But the last topic memory leak problem remains, Nvv4l2h265enc crash problem
0:03:33.169063483 30128 0x55a1686040 TRACE GST_TRACER :0:: object-alive, type-name=(string)GstCaps, address=(gpointer)0x7f9808a320, description=(string)video/x-h265, stream-format=(string)byte-stream, alignment=(string)au, ref-count=(uint)1, trace=(string);
this leak can resolved by add “gst_caps_unref(allowed_caps);” on gstv4l2videoenc.c before line 1013 [return TRUE]
1010 if (!GST_VIDEO_ENCODER_CLASS (parent_class)->negotiate (encoder))
1011 return FALSE;
1012 if(allowed_caps)
1013 gst_caps_unref(allowed_caps);
1014 return TRUE;
1015 #ifndef USE_V4L2_TARGET_NV
1016 g_ctrl_failed:
1017 GST_WARNING_OBJECT (self, “Failed to get %s profile and level: ‘%s’”,
1018 klass->codec_name, g_strerror (errno));

Hi,
Thanks for the information. The modification looks reasonable. We will check with teams and adopt the fix.

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