Could not get sample data with nvv4l2decoder but avdec_h264 ok


jetson nano 2GB, nvidia-jetpack: 4.6-b197, GStreamer: 1.14.5


get frames for further processing

Problem description:

I’ve created a pipeline in test.c:
filesrc → matroskademux → h264parse →
avdec_h264/nvv4l2decoder → videoconvert → tee
tee → fakesink
tee → appsink

if avdec_h264 is used, I could get every frame like this(seems ok):
frame size=3110400, data=0x3030, 0x3030, 0x3030, 0x3130, 0x3131, 0x3131, 0x3231, 0x3132

but when I use nvv4l2decoder, I got very small frame size:
frame size= 1008, data=0x03F0, 0x0003, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000

is it because the decoded frames were in the gpu memory when nvv4l2decoder is used so that I cannot access it ?
is it poosible to get frame data with nvv4l2decoer?

test.c (9.3 KB) (1.6 KB)
test file:

BTW, I’ve test the performance:

  • nvv4l2decoder: 270-280 fps
  • avdec_h264: 70-86 fps
  • omxh264dec: 30-32 fps

Please link the gstreamer pipeline like this and try again:

... ! nvv4l2decoder ! 'video/x-raw(memory:NVMM)' ! nvvidconv ! video/x-raw,format=NV12 ! appsink

Either NV12 or I420 should work fine. May refer to this sample:
Gstreamer decode live video stream with the delay difference between gst-launch-1.0 command and appsink callback - #6 by DaneLLL

1 Like

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