Deepstream_test1_rtsp_in_rtsp_out.py not working

Please provide complete information as applicable to your setup.

• Hardware Platform (Jetson / GPU) : NVIDIA Corporation GA106 [Geforce RTX 3050]
• DeepStream Version: 6.2
• JetPack Version (valid for Jetson only)
• TensorRT Version: with SDK
• NVIDIA GPU Driver Version (valid for GPU only): 525.85.12
*• Cuda Version: 11.8
• Issue Type( questions, new requirements, bugs)
• How to reproduce the issue ? (This is for bugs. Including which sample app is using, the configuration files content, the command line used and other details for reproducing)

Try to use deepstream_test1_rtsp_in_rtsp_out.py -i -g nvinfer

I am getting below error:

Creating Pipeline

Creating streamux

Creating source_bin 0

Creating source bin
source-bin-00
Creating Pgie

Creating tiler

Creating nvvidconv

Creating nvosd

Creating H264 Encoder
Creating H264 rtppay
Adding elements to Pipeline

*** DeepStream: Launched RTSP Streaming at rtsp://localhost:8554/ds-test ***

Starting pipeline

0:00:00.192157251 48228 0x28eec10 WARN nvinfer gstnvinfer.cpp:677:gst_nvinfer_logger: NvDsInferContext[UID 1]: Warning from NvDsInferContextImpl::initialize() <nvdsinfer_context_impl.cpp:1170> [UID = 1]: Warning, OpenCV has been deprecated. Using NMS for clustering instead of cv::groupRectangles with topK = 20 and NMS Threshold = 0.5
WARNING: [TRT]: CUDA lazy loading is not enabled. Enabling it can significantly reduce device memory usage. See CUDA_MODULE_LOADING in CUDA C++ Programming Guide
WARNING: [TRT]: CUDA lazy loading is not enabled. Enabling it can significantly reduce device memory usage. See CUDA_MODULE_LOADING in CUDA C++ Programming Guide
0:00:01.868566523 48228 0x28eec10 INFO nvinfer gstnvinfer.cpp:680:gst_nvinfer_logger: NvDsInferContext[UID 1]: Info from NvDsInferContextImpl::deserializeEngineAndBackend() <nvdsinfer_context_impl.cpp:1909> [UID = 1]: deserialized trt engine from :/opt/nvidia/deepstream/deepstream-6.2/samples/models/Primary_Detector/resnet10.caffemodel_b1_gpu0_int8.engine
INFO: …/nvdsinfer/nvdsinfer_model_builder.cpp:610 [Implicit Engine Info]: layers num: 3
0 INPUT kFLOAT input_1 3x368x640
1 OUTPUT kFLOAT conv2d_bbox 16x23x40
2 OUTPUT kFLOAT conv2d_cov/Sigmoid 4x23x40

0:00:01.935360793 48228 0x28eec10 INFO nvinfer gstnvinfer.cpp:680:gst_nvinfer_logger: NvDsInferContext[UID 1]: Info from NvDsInferContextImpl::generateBackendContext() <nvdsinfer_context_impl.cpp:2012> [UID = 1]: Use deserialized engine model: /opt/nvidia/deepstream/deepstream-6.2/samples/models/Primary_Detector/resnet10.caffemodel_b1_gpu0_int8.engine
0:00:01.937373465 48228 0x28eec10 INFO nvinfer gstnvinfer_impl.cpp:328:notifyLoadModelStatus: [UID 1]: Load new model:dstest1_pgie_config.txt sucessfully
Decodebin child added: source

Decodebin child added: decodebin0

Decodebin child added: rtph264depay0

Decodebin child added: h264parse0

Decodebin child added: capsfilter0

DtsGetHWFeatures: Create File Failed
DtsGetHWFeatures: Create File Failed
Decodebin child added: bcmdec0

Running DIL (3.22.0) Version
DtsDeviceOpen: Opening HW in mode 0
DtsDeviceOpen: Create File Failed
Decodebin child added: avdec_h264-0

In cb_newpad

gstname= video/x-raw
features= <Gst.CapsFeatures object at 0x7fb85067dd00 (GstCapsFeatures at 0x7fb790057060)>
Error: Decodebin did not pick nvidia decoder plugin.
sys:1: Warning: g_object_get_is_valid_property: object class ‘GstUDPSrc’ has no property named ‘pt’

• Requirement details( This is for new requirement. Including the module name-for which plugin or for which sample application, the function description)

  1. it is because Decodebin chose software decoding finally, please install the components by this link dgpu-setup-for-ubuntu.
  2. if still run failed, could you share the result of “gst-inspect-1.0 |grep nvv4l2decoder”?

Hi Fanzh,

Thanks for your response.

  1. I have installed the components by following the steps mentioned in the dgpu-setup-for-ubuntu

  2. The result of “gst-inspect-1.0 |grep nvv4l2decoder” is as below:

nvvideo4linux2: nvv4l2decoder: NVIDIA v4l2 video decoder.

I am able to run the code via deepstream-test1 with h264 input. However, my usecase involves rtsp in and out.

please use this command to test rtsp source, gst-launch-1.0 uridecodebin uri=rtsp:/xxx ! nvvideoconvert ! autovideosink, please share the log, can you see the video?

I can see the video with the command. Please find the logs.

Setting pipeline to PAUSED …
Pipeline is live and does not need PREROLL …
Progress: (open) Opening Stream
Progress: (connect) Connecting to rtsp://XXXX
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
DtsGetHWFeatures: Create File Failed
DtsGetHWFeatures: Create File Failed
Running DIL (3.22.0) Version
DtsDeviceOpen: Opening HW in mode 0
DtsDeviceOpen: Create File Failed
Redistribute latency…
Redistribute latency…

  1. could you share the media info of rtspsource? you might use gst-discoverer-1.0 rtsp://xxx or ffprobe rtsp://xxx.
  2. I suppose HW decoder can’t decode the video, could you try this pipeline, is there any error? gst-launch-1.0 rtspsrc location=rtsp://xxx ! queue! rtph264depay ! h264parse ! nvv4l2decoder ! fakesink

Result for above:

  1. Analyzing rtsp://XXX
    DtsGetHWFeatures: Create File Failed
    DtsGetHWFeatures: Create File Failed
    Running DIL (3.22.0) Version
    DtsDeviceOpen: Opening HW in mode 0
    DtsDeviceOpen: Create File Failed
    Done discovering rtsp://XXX

Topology:
unknown: application/x-rtp
video: H.264 (Main Profile)

Properties:
Duration: 99:99:99.999999999
Seekable: no
Live: yes
Tags:
video codec: H.264 (Main Profile)

Result for 2:

Setting pipeline to PAUSED …
Pipeline is live and does not need PREROLL …
Progress: (open) Opening Stream
Progress: (connect) Connecting to rtsp://XXX
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
^Chandling interrupt.
Interrupt: Stopping pipeline …
Execution ended after 0:00:06.409885848
Setting pipeline to NULL …
Freeing pipeline …

thanks for you update, from the logs, video codec of rtsp source is h264, need to check why nvv4l2decoder is not selected.
could your run deepstream_test1_rtsp_in_rtsp_out.py again and share more logs? please do “export GST_DEBUG=6” first to modify Gstreamer’s log level, then run again, you can redirect the logs to a file.

Please find the logs as below:

Creating Pipeline

Creating streamux

Creating source_bin 0

Creating source bin
source-bin-00
Creating Pgie

Creating tiler

Creating nvvidconv

Creating nvosd

Creating H264 Encoder
Creating H264 rtppay
Adding elements to Pipeline

*** DeepStream: Launched RTSP Streaming at rtsp://localhost:8554/ds-test ***

Starting pipeline

0:00:00.139404525 7355 0x3721810 WARN nvinfer gstnvinfer.cpp:677:gst_nvinfer_logger: NvDsInferContext[UID 1]: Warning from NvDsInferContextImpl::initialize() <nvdsinfer_context_impl.cpp:1170> [UID = 1]: Warning, OpenCV has been deprecated. Using NMS for clustering instead of cv::groupRectangles with topK = 20 and NMS Threshold = 0.5
WARNING: [TRT]: CUDA lazy loading is not enabled. Enabling it can significantly reduce device memory usage. See CUDA_MODULE_LOADING in CUDA C++ Programming Guide
WARNING: [TRT]: CUDA lazy loading is not enabled. Enabling it can significantly reduce device memory usage. See CUDA_MODULE_LOADING in CUDA C++ Programming Guide
0:00:01.609177432 7355 0x3721810 INFO nvinfer gstnvinfer.cpp:680:gst_nvinfer_logger: NvDsInferContext[UID 1]: Info from NvDsInferContextImpl::deserializeEngineAndBackend() <nvdsinfer_context_impl.cpp:1909> [UID = 1]: deserialized trt engine from :/opt/nvidia/deepstream/deepstream-6.2/samples/models/Primary_Detector/resnet10.caffemodel_b1_gpu0_int8.engine
INFO: …/nvdsinfer/nvdsinfer_model_builder.cpp:610 [Implicit Engine Info]: layers num: 3
0 INPUT kFLOAT input_1 3x368x640
1 OUTPUT kFLOAT conv2d_bbox 16x23x40
2 OUTPUT kFLOAT conv2d_cov/Sigmoid 4x23x40

0:00:01.658554739 7355 0x3721810 INFO nvinfer gstnvinfer.cpp:680:gst_nvinfer_logger: NvDsInferContext[UID 1]: Info from NvDsInferContextImpl::generateBackendContext() <nvdsinfer_context_impl.cpp:2012> [UID = 1]: Use deserialized engine model: /opt/nvidia/deepstream/deepstream-6.2/samples/models/Primary_Detector/resnet10.caffemodel_b1_gpu0_int8.engine
0:00:01.660065826 7355 0x3721810 INFO nvinfer gstnvinfer_impl.cpp:328:notifyLoadModelStatus: [UID 1]: Load new model:dstest1_pgie_config.txt sucessfully
Decodebin child added: source

Decodebin child added: decodebin0

Decodebin child added: rtph264depay0

Decodebin child added: h264parse0

Decodebin child added: capsfilter0

DtsGetHWFeatures: Create File Failed
DtsGetHWFeatures: Create File Failed
Decodebin child added: bcmdec0

Running DIL (3.22.0) Version
DtsDeviceOpen: Opening HW in mode 0
DtsDeviceOpen: Create File Failed
Decodebin child added: avdec_h264-0

In cb_newpad

gstname= video/x-raw
features= <Gst.CapsFeatures object at 0x7f32131cef40 (GstCapsFeatures at 0x28c4540)>
Error: Decodebin did not pick nvidia decoder plugin.

there is no debug log, in my last comment, I mean, firstly modify Gstreamer’s log level, then run again, you can redirect the logs to a file, the whole command looks like:
export GST_DEBUG=decodebin:6 && python3 deepstream_test1_rtsp_in_rtsp_out.py -i rtsp://10.19.225.227/media/video1 -g nvinfer >1.log 2>1.log
close the applcation after about 20 seconds, there should be debug logs like
“:00:03.064203451 75641 0xfffefc01b000 DEBUG decodebin xxx”, then please share 1.log, thanks!

1.log (138.1 KB)

Sorry My Bad. Please find the log file attached.

from the log, we can see software decoder is selected, but there is not enough information. could you try this command? it will directly use nvv4l2decoder to decode rtsp source,
export GST_DEBUG=3 && gst-launch-1.0 rtspsrc location=rtsp://xxx ! rtph264depay ! h264parse ! nvv4l2decoder ! fakesink -e >2.log 2>2.log
close the applcation after about 20 seconds, then please share 2.log, thanks!

Please find the log file attached.
2.log (11.8 KB)

thanks for your update.

  1. can you see the video by this command? if there is error, please share the log.
    export GST_DEBUG=1 && gst-launch-1.0 rtspsrc location=rtsp://xxx ! rtph264depay ! h264parse ! nvv4l2decoder ! nvvideoconvert ! video/x-raw\(memory:NVMM\),format=RGBA ! nveglglessink
  2. please share the output of “dpkg -l | grep gstreamer”, wondering the version of gstreamer.
  3. please share the output of “gst-inspect-1.0 nvv4l2decoder|grep Rank” and “gst-inspect-1.0 avdec_h264|grep Rank”, wondering the decoder’s priority.

Please find the updates:

Result for 1) No error I am able to play RTSP link.

Setting pipeline to PAUSED …
Pipeline is live and does not need PREROLL …
Got context from element ‘eglglessink0’: gst.egl.EGLDisplay=context, display=(GstEGLDisplay)NULL;
Progress: (open) Opening Stream
Progress: (connect) Connecting to rtsp://XXXXXX
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

Result for 2:
i gir1.2-gstreamer-1.0:amd64 1.16.3-0ubuntu1.1 amd64 GObject introspection data for the GStreamer library
ii gstreamer1.0-adapter-pulseeffects:amd64 4.7.1-2 amd64 GStreamer adapter plugin
ii gstreamer1.0-alsa:amd64 1.16.3-0ubuntu1.1 amd64 GStreamer plugin for ALSA
ii gstreamer1.0-autogain-pulseeffects:amd64 4.7.1-2 amd64 GStreamer autogain plugin
ii gstreamer1.0-clutter-3.0:amd64 3.0.27-1 amd64 Clutter PLugin for GStreamer 1.0
ii gstreamer1.0-convolver-pulseeffects:amd64 4.7.1-2 amd64 GStreamer convolver plugin
ii gstreamer1.0-crystalhd 1:0.0~git20110715.fdd2f19-13build1 amd64 Crystal HD Video Decoder (GStreamer plugin)
ii gstreamer1.0-crystalizer-pulseeffects:amd64 4.7.1-2 amd64 GStreamer crystalizer plugin
ii gstreamer1.0-doc 1.16.3-0ubuntu1.1 all GStreamer core documentation and manuals
ii gstreamer1.0-espeak:amd64 0.5.0-1 amd64 GStreamer plugin for eSpeak speech synthesis
ii gstreamer1.0-gl:amd64 1.16.3-0ubuntu1.1 amd64 GStreamer plugins for GL
ii gstreamer1.0-gtk3:amd64 1.16.3-0ubuntu1.1 amd64 GStreamer plugin for GTK+3
ii gstreamer1.0-libav:amd64 1.16.2-2 amd64 ffmpeg plugin for GStreamer
ii gstreamer1.0-libav-dbg:amd64 1.16.2-2 amd64 ffmpeg plugin for GStreamer (debug symbols)
ii gstreamer1.0-nice:amd64 0.1.16-1 amd64 ICE library (GStreamer plugin)
ii gstreamer1.0-omx-bellagio-config 1.16.2-1 amd64 OpenMax plugins for GStreamer
ii gstreamer1.0-omx-generic 1.16.2-1 amd64 OpenMax plugins for GStreamer
ii gstreamer1.0-omx-generic-config 1.16.2-1 amd64 OpenMax plugins for GStreamer
ii gstreamer1.0-opencv:amd64 1.16.3-0ubuntu1 amd64 GStreamer OpenCV plugins
ii gstreamer1.0-packagekit 1.1.13-2ubuntu1.1 amd64 GStreamer plugin to install codecs using PackageKit
ii gstreamer1.0-pipewire:amd64 0.2.7-1 amd64 GStreamer 1.0 plugin for the PipeWire multimedia server
ii gstreamer1.0-plugins-bad:amd64 1.16.3-0ubuntu1 amd64 GStreamer plugins from the “bad” set
ii gstreamer1.0-plugins-bad-dbg:amd64 1.16.3-0ubuntu1 amd64 GStreamer plugins from the “bad” set (debug symbols)
ii gstreamer1.0-plugins-bad-doc 1.16.3-0ubuntu1 all GStreamer documentation for plugins from the “bad” set
ii gstreamer1.0-plugins-base:amd64 1.16.3-0ubuntu1.1 amd64 GStreamer plugins from the “base” set
ii gstreamer1.0-plugins-base-apps 1.16.3-0ubuntu1.1 amd64 GStreamer helper programs from the “base” set
ii gstreamer1.0-plugins-base-dbg:amd64 1.16.3-0ubuntu1.1 amd64 GStreamer plugins from the “base” set
ii gstreamer1.0-plugins-base-doc 1.16.3-0ubuntu1.1 all GStreamer documentation for plugins from the “base” set
ii gstreamer1.0-plugins-good:amd64 1.16.3-0ubuntu1.1 amd64 GStreamer plugins from the “good” set
ii gstreamer1.0-plugins-good-dbg:amd64 1.16.3-0ubuntu1.1 amd64 GStreamer plugins from the “good” set
ii gstreamer1.0-plugins-good-doc 1.16.3-0ubuntu1.1 all GStreamer documentation for plugins from the “good” set
ii gstreamer1.0-plugins-rtp 1.14.4.1 amd64 GStreamer elements from the “rtp” set
ii gstreamer1.0-plugins-ugly:amd64 1.16.2-2build1 amd64 GStreamer plugins from the “ugly” set
ii gstreamer1.0-plugins-ugly-dbg:amd64 1.16.2-2build1 amd64 GStreamer plugins from the “ugly” set (debug symbols)
ii gstreamer1.0-plugins-ugly-doc 1.16.2-2build1 all GStreamer documentation for plugins from the “ugly” set
ii gstreamer1.0-pocketsphinx:amd64 0.8.0+real5prealpha+1-6ubuntu4 amd64 Speech recognition tool - GStreamer plugin
ii gstreamer1.0-pulseaudio:amd64 1.16.3-0ubuntu1.1 amd64 GStreamer plugin for PulseAudio
ii gstreamer1.0-python3-plugin-loader 1.16.2-2 amd64 GStreamer Loader for Python Plugin (Python 3)
ii gstreamer1.0-qt5:amd64 1.16.3-0ubuntu1.1 amd64 GStreamer plugin for Qt5
ii gstreamer1.0-rtsp:amd64 1.16.2-3 amd64 RTSP plugin for GStreamer
ii gstreamer1.0-rtsp-dbg:amd64 1.16.2-3 amd64 RTSP plugin for GStreamer
ii gstreamer1.0-tools 1.16.3-0ubuntu1.1 amd64 Tools for use with GStreamer
ii gstreamer1.0-vaapi:amd64 1.16.2-2 amd64 VA-API plugins for GStreamer
ii gstreamer1.0-vaapi-doc 1.16.2-2 all GStreamer VA-API documentation and manuals
ii gstreamer1.0-x:amd64 1.16.3-0ubuntu1.1 amd64 GStreamer plugins for X11 and Pango
ii libgstreamer-gl1.0-0:amd64 1.16.3-0ubuntu1.1 amd64 GStreamer GL libraries
ii libgstreamer-opencv1.0-0:amd64 1.16.3-0ubuntu1 amd64 GStreamer OpenCV libraries
ii libgstreamer-plugins-bad1.0-0:amd64 1.16.3-0ubuntu1 amd64 GStreamer libraries from the “bad” set
ii libgstreamer-plugins-bad1.0-dev:amd64 1.16.3-0ubuntu1 amd64 GStreamer development files for libraries from the “bad” set
ii libgstreamer-plugins-base1.0-0:amd64 1.16.3-0ubuntu1.1 amd64 GStreamer libraries from the “base” set
ii libgstreamer-plugins-base1.0-dev:amd64 1.16.3-0ubuntu1.1 amd64 GStreamer development files for libraries from the “base” set
ii libgstreamer-plugins-good1.0-0:amd64 1.16.3-0ubuntu1.1 amd64 GStreamer development files for libraries from the “good” set
ii libgstreamer-plugins-good1.0-dev 1.16.3-0ubuntu1.1 amd64 GStreamer development files for libraries from the “good” set
ii libgstreamer1.0-0:amd64 1.16.3-0ubuntu1.1 amd64 Core GStreamer libraries and elements
ii libgstreamer1.0-dev:amd64 1.16.3-0ubuntu1.1 amd64 GStreamer core development files

result for 3 :

$ gst-inspect-1.0 nvv4l2decoder|grep Rank
Rank primary + 11 (267)
$ gst-inspect-1.0 avdec_h264|grep Rank
Rank primary (256)

There is no update from you for a period, assuming this is not an issue anymore. Hence we are closing this topic. If need further support, please open a new one. Thanks

I can’t reproduce this issue in DeepStream docker DeepStream6.2 docker, here is the log, log.txt (2.7 KB), you can see Gstreamer selected HW decoder nvv4l2decoder0. did you modify the python code? can you use DeepStream 6.2 docker? which has already installed all deepstream components.

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