Can't get accelerated GStreamer-Pipeline (rtspsrc ! rtph264depay ! h264parse ! nvv4l2decoder ) to wo...

Hi,

a quick overview before I go into details.

I’m trying to receive and decode a rtsp-h264 stream from my IP-camera on a Jetson Nano connected to the same network.
Jetson Nano (OS is Ubuntu) provides some platform-specific hardware-accelerated GStreamer elements (e.g.: nvv4l2decoder, omxh264dec, nv3dsink, etc.).

At this point, I’m evaluating the desirable GStreamer-pipline which fullfills my intention stated above by using the gst-launch-1.0 tool.
I was able to succesfully receive, decode and display the ip-camera stream by using the platform-specific hardware-accelerated omxh264dec element as video-decoder.

Unfortunately the omxh264dec element is deprecated in Linux for Tegra (L4T) and its recomended to use nvv4l2decoder for new projects instead.
Problem is, if I use nvv4l2decoder instead of omxh264dec within my working pipeline, the pipeline does’t work any more.

My working-command (deprecated omxh264dec is used as video-decoder) is:
gst-launch-1.0 rtspsrc location=rtsp://192.168.188.112:554/user=admin_password=tlJwpbo6_channel=1_stream=0.sdp?real_stream caps = “application/x-rtp, media=(string)video, encoding-name=(string)H264, payload=(int)96” ! rtph264depay ! h264parse ! omxh264dec ! nvvidconv ! nv3dsink

I created a pipeline-graph which looks as follows (just the area of interest / end of pipeline is shown):
https://www.tritec-solutions.de/downloads/01_omxh264dec_working_but_deprecated.png

My desired-but-not-working-command (recomended nvv4l2decoder is used as video-decoder) is:
gst-launch-1.0 rtspsrc location=rtsp://192.168.188.112:554/user=admin_password=tlJwpbo6_channel=1_stream=0.sdp?real_stream caps = “application/x-rtp, media=(string)video, encoding-name=(string)H264, payload=(int)96” ! rtph264depay ! h264parse ! nvv4l2decoder ! nvvidconv ! nv3dsink

It’s pipeline-graph looks as follows (just the area of interest / end of pipeline is shown):
https://www.tritec-solutions.de/downloads/02_nvv4l2decoder_recomended_but_not_working.png

The graph suggests, that the decoder’s format-changed-event on the output side is never called.

Unwilling to give up, I tried to conquer GStreamer by splitting my NOT working command into two commands.

First, receive the ip-camera stream and write it to a file with:
gst-launch-1.0 rtspsrc location=rtsp://192.168.188.112:554/user=admin_password=tlJwpbo6_channel=1_stream=0.sdp?real_stream ! queue ! “application/x-rtp,media=video” ! rtph264depay ! h264parse ! video/x-h264, stream-format=“byte-stream” ! filesink location=“test.264”

Second, read from file, decode (with priviously not working video-decoder) and display with:
gst-launch-1.0 filesrc location=test.264 ! h264parse ! nvv4l2decoder ! nv3dsink

To my amazement this splitted approach was successfull.
My question is: why is my desired-but-not-working-command not working while the altenative splitted commands are working just fine?

If you’ve got an idea what I could try please give me a hint.

Thank You!

Hi,
We will fix it in next release. On r32.1, please use omxh264dec/omxh265dec.

success:
gst-launch-1.0 rtspsrc location=rtsp://admin:admin@192.168.0.123/media/video ! rtph264depay ! h264parse ! omxh264dec ! nvvidconv ! nv3dsink

success:
gst-launch-1.0 rtspsrc location=rtsp://admin:admin@192.168.0.123/media/video caps=“application/x-rtp, media=(string)video” ! rtph264depay ! h264parse ! omxh264dec ! nvvidconv ! nv3dsink

nv3dsink is a key and omxh264dec decoder speed up

failed:
gst-launch-1.0 rtspsrc location=rtsp://admin:admin@192.168.0.123/media/video caps=“application/x-rtp, media=(string)video” ! rtph264depay ! h264parse ! omxh264dec ! nvvidconv ! nvvideosink

gstbasesink.c(5265): gst_base_sink_change_state (): /GstPipeline:pipeline0/GstNvVideoSink:nvvideosink0:
Failed to start

failed:
gst-launch-1.0 rtspsrc location=rtsp://admin:admin@192.168.0.123/media/video caps=“application/x-rtp, media=(string)video” ! rtph264depay ! h264parse ! omxh264dec ! nvvidconv ! autovideosink

~red screen

Hi fatalfeel,
Please make a new post for your usecase so that we can suggest accordingly.