NX just play one rtsp video

Hello, I need to dynamically add and reduce video sources. In 2060, there is no problem, but in NX, only the first video can be run, and the second one will never trigger “pad added”

  1. My program will first run the following pipeline

nvstreammux->nvmultistreamtiler->nvvideoconvert->nveglglessink

  1. Then use another thread to add a video source every 5 seconds

uridecodebin src → nvstreammux sink

  1. If another thread is used, multiple videos can be played at one time

Did you run our demo or your own code?

yes,runtime_source_add_delete python

deepstream_gpu.zip (8.8 KB)

Hello, this is an example I wrote. Please help me analyze it. It has not been solved for a week. There is no problem on 2060 and 3090. The video can be played normally. You can only play one video on nx.

Nx version: JP 5.0.2

Did you use the Deepstream 6.1.1?Could you attach your log
when it failed?

yes,Deepstream6.1.1,After the first video connection is successful, there is no feedback from the last two videos. The same is true for the example of “runtime_source_add_delete”

max_fps_dur 8.33333e+06 min_fps_dur 2e+08
Creating H264 Encoder
Creating H264 rtppay
Opening in BLOCKING MODE
add video source rtsp://localhost:8555/live/101 0
STATE CHANGE NO PREROLL
Error: gst-resource-error-quark: Could not get/set settings from/on resource. (13): gstmultiudpsink.c(1285): gst_multiudpsink_configure_client (): /GstPipeline:pipeline0/GstURIDecodeBin:uridecodebin-0/GstRTSPSrc:source/GstUDPSink:udpsink0:
Invalid address family (got 10)
Error: gst-core-error-quark: GStreamer error: state change failed and some element failed to post a proper error message with the reason for the failure. (4): gstbasesink.c(5367): gst_base_sink_change_state (): /GstPipeline:pipeline0/GstURIDecodeBin:uridecodebin-0/GstRTSPSrc:source/GstUDPSink:udpsink0:
Failed to start
Error: gst-resource-error-quark: Could not get/set settings from/on resource. (13): gstmultiudpsink.c(1285): gst_multiudpsink_configure_client (): /GstPipeline:pipeline0/GstURIDecodeBin:uridecodebin-0/GstRTSPSrc:source/GstUDPSink:udpsink2:
Invalid address family (got 10)
Error: gst-core-error-quark: GStreamer error: state change failed and some element failed to post a proper error message with the reason for the failure. (4): gstbasesink.c(5367): gst_base_sink_change_state (): /GstPipeline:pipeline0/GstURIDecodeBin:uridecodebin-0/GstRTSPSrc:source/GstUDPSink:udpsink2:
Failed to start
Warning: gst-resource-error-quark: Could not read from resource. (9): gstrtspsrc.c(5769): gst_rtspsrc_reconnect (): /GstPipeline:pipeline0/GstURIDecodeBin:uridecodebin-0/GstRTSPSrc:source:
Could not receive any UDP packets for 5.0000 seconds, maybe your firewall is blocking it. Retrying using a tcp connection.
Opening in BLOCKING MODE
NvMMLiteOpen : Block : BlockType = 261
NVMEDIA: Reading vendor.tegra.display-size : status: 6
NvMMLiteBlockCreate : Block : BlockType = 261
video connect success ********************** 0
max_fps_dur 8.33333e+06 min_fps_dur 2e+08
NvMMLiteOpen : Block : BlockType = 4
===== NVMEDIA: NVENC =====
NvMMLiteBlockCreate : Block : BlockType = 4
reference in DPB was never decoded
NVDEC_COMMON: NvDecGetSurfPinHandle : Surface not registered
NVDEC_COMMON: NvDecGetSurfPinHandle : Surface not registered
NVDEC_COMMON: NvDecGetSurfPinHandle : Surface not registered
NVDEC_COMMON: NvDecGetSurfPinHandle : Surface not registered
NVDEC_COMMON: NvDecGetSurfPinHandle : Surface not registered
NVDEC_COMMON: NvDecGetSurfPinHandle : Surface not registered
NVDEC_COMMON: NvDecGetSurfPinHandle : Surface not registered
NVDEC_COMMON: NvDecGetSurfPinHandle : Surface not registered
NVDEC_COMMON: NvDecGetSurfPinHandle : Surface not registered
NVDEC_COMMON: NvDecGetSurfPinHandle : Surface not registered
NVDEC_COMMON: NvDecGetSurfPinHandle : Surface not registered
NVDEC_COMMON: NvDecGetSurfPinHandle : Surface not registered
NVDEC_COMMON: NvDecGetSurfPinHandle : Surface not registered
NVDEC_COMMON: NvDecGetSurfPinHandle : Surface not registered
NVDEC_COMMON: NvDecGetSurfPinHandle : Surface not registered
NVDEC_COMMON: NvDecGetSurfPinHandle : Surface not registered
NVDEC_COMMON: NvDecGetSurfPinHandle : Surface not registered
NVDEC_COMMON: NvDecGetSurfPinHandle : Surface not registered
NVDEC_COMMON: NvDecGetSurfPinHandle : Surface not registered
NVDEC_COMMON: NvDecGetSurfPinHandle : Surface not registered
NVDEC_COMMON: NvDecGetSurfPinHandle : Surface not registered
NVDEC_COMMON: NvDecGetSurfPinHandle : Surface not registered
NVDEC_COMMON: NvDecGetSurfPinHandle : Surface not registered
NVDEC_COMMON: NvDecGetSurfPinHandle : Surface not registered
NVDEC_COMMON: NvDecGetSurfPinHandle : Surface not registered
NVDEC_COMMON: NvDecGetSurfPinHandle : Surface not registered
NVDEC_COMMON: NvDecGetSurfPinHandle : Surface not registered
NVDEC_COMMON: NvDecGetSurfPinHandle : Surface not registered
NVDEC_COMMON: NvDecGetSurfPinHandle : Surface not registered
NVDEC_COMMON: NvDecGetSurfPinHandle : Surface not registered
NVDEC_COMMON: NvDecGetSurfPinHandle : Surface not registered
NVDEC_COMMON: NvDecGetSurfPinHandle : Surface not registered
H264: Profile = 66, Level = 0
NVMEDIA: Need to set EMC bandwidth : 705000
NVMEDIA: Need to set EMC bandwidth : 705000
NVMEDIA_ENC: bBlitMode is set to TRUE
add video source rtsp://localhost:8555/live/201 1
STATE CHANGE NO PREROLL
add video source rtsp://localhost:8555/live/301 2
STATE CHANGE NO PREROLL

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

There are some peoblems with the h264enc from the log attached. Could you try to run the demo below in your NX env first and make sure the demo code runs well in your env? Then you can add your code on this base.
https://github.com/NVIDIA-AI-IOT/deepstream_python_apps/tree/master/apps/runtime_source_add_delete

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