NvMediaParserParse Unsupported Codec, NVMEDIA Video Dec Unsupported Stream

Hi,
I am trying to decode a video stream received using Gstreamer rtspsrc. Using this pipeline the stream is decoded and I can see the video.

DISPLAY=:0 gst-launch-1.0 rtspsrc location="rtsp://192.168.1.130:8554/test" ! \
rtpmp2tdepay! tsdemux name=demux \
demux. ! h264parse ! avdec_h264 ! videoconvert ! xvimagesink async=false sync=false \
demux. ! aacparse ! avdec_aac ! audioconvert !  alsasink async=false sync=false

But I have changed the pipeline in order to use hardware accelerated decoder:

DISPLAY=:0 gst-launch-1.0 rtspsrc location="rtsp://192.168.1.130:8554/test" ! \
rtpmp2tdepay! tsdemux name=demux  \
demux. ! h264parse ! nvv4l2decoder enable-frame-type-reporting=1 ! nvvidconv ! xvimagesink async=false sync=false \
demux. ! aacparse ! avdec_aac ! audioconvert ! alsasink async=false sync=false`

And now the pipeline opens a widow but there is no video and constantly is printed these messages:

NVMEDIA: NvMMLiteNVMEDIADecDoWork: 1985: NVMEDIA Video Dec Unsupported Stream
NVMEDIA: NVMEDIABufferProcessing: 1507: NvMediaParserParse Unsupported Codec

I am using enable-frame-type-reporting=1 since the parameter is recommended here for h264: https://docs.nvidia.com/jetson/l4t/index.html#page/Tegra%20Linux%20Driver%20Package%20Development%20Guide/accelerated_gstreamer.html#wwpID0E0N20HA

Does somebody know the cause of this problem?

Regards.

You may try :

  • removing h264parse before nvv4l2decoder
  • use: h264parse → avc stream format → h264parse → byte-stream format → nvv4l2decoder
  • or use omxh264dec instead of nvv4l2decoder

Hi,
If your source is not H264/H265 GDR stream, you should not need to set enable-frame-type-reporting=1. GDR stream is special stream and cannot be decoded weill without setting the property.

Hi Honey_Patouceul,

When I have removed h264parse I get a linking error:

WARNING: from element /GstPipeline:pipeline0/GstTSDemux:demux: Delayed linking failed.
Additional debug info:
./grammar.y(510): gst_parse_no_more_pads (): /GstPipeline:pipeline0/GstTSDemux:demux:
failed delayed linking some pad of GstTSDemux named demux to some pad of nvv4l2decoder named nvv4l2decoder0

I have tried replacing nvv4l2decoder with omxh264dec but I also have an error, since omxh264dec is deprecated I have not invested time researching the problem.

About you second suggestion:

DISPLAY=:0 gst-launch-1.0 rtspsrc location=“rtsp://192.168.1.130:8554/test” ! rtpmp2tdepay! tsdemux name=demux
demux. ! h264parse ! nvv4l2decoder ! nvvidconv ! xvimagesink async=false sync=false
demux. ! aacparse ! avdec_aac ! audioconvert ! alsasink async=false sync=false -v

Currently these are the caps reported by src/sink pads:

  • h264parse sink: caps = video/x-h264, stream-format=(string)byte-stream, alignment=(string)nal
  • h264parse src: caps = video/x-h264, stream-format=(string)byte-stream, alignment=(string)au, . . .

then I have changed the caps in the h264parse sink pad to use stream-format=avc :

DISPLAY=:0 gst-launch-1.0 rtspsrc location="rtsp://192.168.1.130:8554/test" ! rtpmp2tdepay! tsdemux name=demux \
demux. ! video/x-h264,stream-format=avc,alignment=nal ! h264parse ! nvv4l2decoder ! nvvidconv ! xvimagesink async=false sync=false \
demux. ! aacparse ! avdec_aac ! audioconvert !  alsasink async=false sync=false -v

But I get delayed linking fail message.

I am not sure if I applying correctly your suggestion.

Hi DaneLLL,

When is removed enable-frame-type-reporting=1 only is printed this error:
NVMEDIA: NVMEDIABufferProcessing: 1507: NvMediaParserParse Unsupported Codec

Hi,
Please try uridecodebin:

gst-launch-1.0 uridecodebin uri="rtsp://192.168.1.130:8554/test" ! nvoverlaysink

See if this pipeline works.

I get exactly the same error:

DISPLAY=:0 gst-launch-1.0 uridecodebin uri="rtsp://192.168.1.130:8554/test" ! nvoverlaysink 
Setting pipeline to PAUSED ...
Pipeline is live and does not need PREROLL ...
Progress: (open) Opening Stream
Progress: (connect) Connecting to rtsp://192.168.1.130:8554/test
Progress: (open) Retrieving server options
Progress: (open) Retrieving media info
Progress: (request) SETUP stream 0
Progress: (open) Opened Stream
Setting pipeline to PLAYING ...
New clock: GstSystemClock
Progress: (request) Sending PLAY request
Progress: (request) Sending PLAY request
Progress: (request) Sent PLAY request
Opening in BLOCKING MODE
Opening in BLOCKING MODE 
NvMMLiteOpen : Block : BlockType = 261 
NVMEDIA: Reading vendor.tegra.display-size : status: 6 
NvMMLiteBlockCreate : Block : BlockType = 261 
NVMEDIA: NVMEDIABufferProcessing: 1507: NvMediaParserParse Unsupported Codec 

I think the RTSP source is transmitting a correct stream since the pipeline works with avdec_h264 and also I can decode the stream using vlc (vlc rtsp://192.168.1.130:8554/test)

Hi,
Please check if you can dump the stream:

gst-launch-1.0 rtspsrc location="rtsp://192.168.1.130:8554/test" ! rtpmp2tdepay! tsdemux name=demux \
demux. ! video/x-h264,stream-format=avc,alignment=nal ! h264parse ! video/x-h264,stream-format=byte-stream ! filesink location=a.h264

And run the command:

gst-launch-1.0 filesrc location=a.h264 ! h264parse ! nvv4l2decoder ! nvoverlaysink

If the issue is present, please attach a.h264 so that we can check why it cannot be decoded by hardware decoder.

Not sure, but maybe the link errors were related to missing space after rtpmp2tdepay.
Anyway, I think that my suggestion is not relevant for your case.
I think @DaneLLL would provide much better advice.

I realized the problem was because the encoder in the server side was not reporting the correct profile and level, the problem was fixing using:

  • profile: constrained-baseline
  • level: 5 (for 1920x1080, the level is set according to the resolution)

Also during the tests I moved my RTSP server into the XavierNX, in order to use the nvv4l2h264enc using this element the RTSP client pipeline using nvv4l2decoder works correctly but I saw the accelerated hardware encoder is reporting NULL for level and profile. (profile=(string)NULL, level=(string)NULL).
For example:

gst-launch-1.0 mpegtsmux name=mux videotestsrc ! nvvidconv ! nvv4l2h264enc ! fakesink -v

Caps:

  • nvv4l2h264enc0.GstPad:src: caps = video/x-h264, stream-format=(string)byte-stream, alignment=(string)au, profile=(string)NULL, level=(string)NULL, width=(int)320, height=(int)240, pixel-aspect-ratio=(fraction)1/1, framerate=(fraction)30/1, interlace-mode=(string)progressive, colorimetry=(string)bt601, chroma-site=(string)jpeg, multiview-mode=(string)mono, multiview-flags=(GstVideoMultiviewFlagsSet)0:ffffffff:/right-view-first/left-flipped/left-flopped/right-flipped/right-flopped/half-aspect/mixed-mono

But I am not sure if this is an error since this does not affect the nvv4l2decoder. For example, this pipeline works correctly.

gst-launch-1.0 videotestsrc ! nvvidconv ! nvv4l2h264enc ! nvv4l2decoder ! nv3dsink -v

Hi,
The h264 stream is parsed/decoded to get profile/level in nvv4l2decoder, so it should work even though the information is not in GstCaps.