Encountering Decoding Issues with 4K RTSP Video Streams in DeepStream Pipelines

Hello,

We’re currently working on decoding 4K RTSP video streams within our Deepstream pipelines. The pipeline produces an error and fails to start with 4K RTSP video streams. However, the same pipeline works when the RTSP stream is 1080p or a 4K video file file:///video/my_video.mp4

nvbufsurftransform.cpp:3827: => Transformation Failed -1

0:00:02.801638574   122 0x7f002c005c00 ERROR         nvvideoconvert gstnvvideoconvert.c:4208:gst_nvvideoconvert_transform: buffer transform failed
ERROR: from element /GstPipeline:pipeline0/GstURIDecodeBin:uridecodebin0/GstRTSPSrc:source/GstUDPSrc:udpsrc0: Internal data stream error.
Additional debug info:
../libs/gst/base/gstbasesrc.c(3127): gst_base_src_loop (): /GstPipeline:pipeline0/GstURIDecodeBin:uridecodebin0/GstRTSPSrc:source/GstUDPSrc:udpsrc0:
streaming stopped, reason error (-5)
Execution ended after 0:00:02.296867815
Setting pipeline to NULL ...
ERROR: from element /GstPipeline:pipeline0/GstURIDecodeBin:uridecodebin0/GstRTSPSrc:source: Could not write to resource.
Additional debug info:
../gst/rtsp/gstrtspsrc.c(6607): gst_rtspsrc_try_send (): /GstPipeline:pipeline0/GstURIDecodeBin:uridecodebin0/GstRTSPSrc:source:
Could not send message. (Received end-of-file)
ERROR: from element /GstPipeline:pipeline0/GstURIDecodeBin:uridecodebin0/GstRTSPSrc:source: Could not write to resource.
Additional debug info:
../gst/rtsp/gstrtspsrc.c(9034): gst_rtspsrc_pause (): /GstPipeline:pipeline0/GstURIDecodeBin:uridecodebin0/GstRTSPSrc:source:
Could not send message. (Received end-of-file)
Freeing pipeline ...

• Hardware Platform ( GPU)

  • GPU: A100
  • GPU: RTX3060
  • GPU: RTX3070

• DeepStream Version

  • Deepstream 6.3
  • Deepstream 6.4

• NVIDIA GPU Driver Version (valid for GPU only)

  • GPU A100: 535.161.08
  • GPU RTX3060: 545.29.06
  • GPU RTX3070: 545.23.08

• Issue Type(bugs)

• How to reproduce the issue ?

Below, I’ve provided a sample pipeline to stream RTSP video and decode it back using separate pipelines for two use cases: one that works and another that fails. For decoding, I have provided 3 alternatives that use different source elements; however, they all seem to encounter the same issue.

  • Works (1080p):

When the source streams 1080p RTSP video:

RTSP Source:

gst-launch-1.0 -v videotestsrc ! nvvideoconvert ! 'video/x-raw(memory:NVMM),width=1920,height=1080' ! nvrtspoutsinkbin port=8554

RTSP Clients:

Sample pipelines used to receive the video:

gst-launch-1.0 -v uridecodebin uri=rtsp://127.0.0.1:8554/ds-test ! nvvideoconvert ! 'video/x-raw(memory:NVMM),width=1920,height=1080' ! fakesink

gst-launch-1.0 -v nvurisrcbin uri=rtsp://127.0.0.1:8554/ds-test ! nvvideoconvert ! 'video/x-raw(memory:NVMM),width=1920,height=1080' ! fakesink

gst-launch-1.0 -v nvmultiurisrcbin uri-list=rtsp://127.0.0.1:8554/ds-test width=1920 height=1080  ! nvvideoconvert ! fakesink
  • Doesn’t Work (4K):

When the RTSP source streams 4K video, clients are unable to receive it.

RTSP Source:

gst-launch-1.0 -v videotestsrc ! nvvideoconvert ! 'video/x-raw(memory:NVMM),width=4096,height=2160' ! nvrtspoutsinkbin port=8554

RTSP Client:

gst-launch-1.0 -v uridecodebin uri=rtsp://127.0.0.1:8554/ds-test ! nvvideoconvert ! 'video/x-raw(memory:NVMM),width=1920,height=1080' ! fakesink

gst-launch-1.0 -v nvurisrcbin uri=rtsp://127.0.0.1:8554/ds-test ! nvvideoconvert ! 'video/x-raw(memory:NVMM),width=1920,height=1080' ! fakesink

gst-launch-1.0 -v nvmultiurisrcbin uri-list=rtsp://127.0.0.1:8554/ds-test width=1920 height=1080  ! nvvideoconvert ! fakesink
  1. A100 does not support hardware encoder, the source pipeline you listed may fail. Video Encode and Decode GPU Support Matrix | NVIDIA Developer
  2. The 4k pipelines work well in my RTX 3070 machine with driver 535.171.04

Hi Fiona,

Thanks for the response,

  1. A100 does not support hardware encoder, the source pipeline you listed may fail. Video Encode and Decode GPU Support Matrix | NVIDIA Developer

Sorry, I should have specified, the RTSP source pipeline was never ran on the A100 itself, it was ran on the RTX 3070 and RTX 3060 workstations.

  1. The 4k pipelines work well in my RTX 3070 machine with driver 535.171.04

In our experiments we were testing using the deepstream:6.4-gc-triton-devel and deepstream:6.3-gc-triton-devel docker images.

From further testing, we noticed the issue seems to happen when we run the RTSP server pipeline on the deepstream:6.3-gc-triton-devel image if it is run on the deepstream:6.4-gc-triton-devel image we do not see the issue and the pipelines work well.

To clarify we were always able to view the stream using VLC/MPV player, regardless of where the rtsp server was running but when its running in deepstream:6.3-gc-triton-devel, all our attempts to decode the stream with gstreamer/deepstream failed with the following error:

nvbufsurftransform.cpp:3827: => Transformation Failed -1

regardless of where the client was running.

What is the host OS when you run “6.3-gc-triton-devel” docker?

What is the host OS when you run “6.3-gc-triton-devel” docker?

We tested on Ubuntu 23.10 and Ubuntu 20.04.6 LTS

DeepStream 6.4 is the latest version which fixes some bugs in DeepStream 6.3. You may use DeepStream 6.4.

This was the original plan, to use Deepstream 6.4 however, we had an issue with multiurisrcbin which is still not solved and had to switch to 6.3.

So you need to wait for the issue be fixed in future release.

The new DeepStream release will come soon. The Dynamic sensor removal in gst-nvmultiurisrcbin resulting in hanging of pipeline - Intelligent Video Analytics / DeepStream SDK - NVIDIA Developer Forums has been resolved with the upcoming release.

DeepStream 7.0 GA is available now. Wish the issues are resolved with the new release.

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