Nvmultiurisrcbin not working when one the cameras is unreachable

Please provide complete information as applicable to your setup.

• Hardware Platform (Jetson / GPU)
GPU NVIDIA GeForce RTX 2080 Ti
• DeepStream Version
7.1
• JetPack Version (valid for Jetson only)
• TensorRT Version
• NVIDIA GPU Driver Version (valid for GPU only)
| NVIDIA-SMI 560.35.03 Driver Version: 560.35.03 CUDA Version: 12.6 |
• Issue Type( questions, new requirements, bugs)
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)

this is the pipeline, but if one of the cameras is not reachable at the time the pipeline starts, the other camera doesn’t receive frames as well and the pipeline won’t start

nvmultiurisrcbin rtsp-reconnect-interval=10 rtsp-reconnect-attempts=-1 port=9000 
ip-address=localhost sync-inputs=0 live-source=1 attach-sys-ts=TRUE nvbuf-memory-type=3 
name=mux drop-pipeline-eos=1 enable-padding=true max-batch-size=2 batched-push-timeout=33333 
width=1282 height=722 uri-list=rtsp://admin:*********@192.168.10.220:8554/ppe_basic.mp4,rtsp://admin:***********@192.168.10.185/h264Preview_01_sub 

! nvinfer  interval=0 name="primary_inference" config-file-path=config.txt batch-size=2 model-engine-file="model_b2_gpu0_fp16.engine"  
! nvtracker tracker-width=1280 tracker-height=704 gpu-id=0  ll-lib-file=/opt/nvidia/deepstream/deepstream/lib/libnvds_nvmultiobjecttracker.so ll-config-file=tracker_config.yml  
! nvstreamdemux name=demux 

 demux.src_0 ! queue max-size-buffers=10000 leaky=2 ! nvvideoconvert nvbuf-memory-type=3 ! video/x-raw(memory:NVMM),format=RGB ! fakesink async=false name=jpeg0 
 demux.src_1 ! queue max-size-buffers=10000 leaky=2 ! nvvideoconvert nvbuf-memory-type=3 ! video/x-raw(memory:NVMM),format=RGB ! fakesink async=false name=jpeg1

i have tried by substituting

uri-list=rtsp://admin:*********@192.168.10.220:8554/ppe_basic.mp4,rtsp://admin:***********@192.168.10.185/h264Preview_01_sub 

with

uri-list=rtsp://admin:*********@192.168.10.220:8554/ppe_basicWRONGURL.mp4,rtsp://admin:***********@192.168.10.185/h264Preview_01_sub 

instead if

  1. both of the cameras are reachable when the pipeline is starting
  2. while the pipeline is in execution one of the camera became unreachable
  3. then it goes back online

the reconnection attempt works well, i have tried with

to break the camera
sudo iptables -I FORWARD -d 192.168.10.185 -j DROP

to restore the camera
sudo iptables -D FORWARD -d 192.168.10.185 -j DROP
sudo iptables -D FORWARD -d 192.168.10.185 -j ACCEPT

I think this is an issue caused by nvstreamdemux, but it doesn’t make sense.
I tried not using nvstreamdemux, and this situation does not cause any problems, such as

gst-launch-1.0 nvmultiurisrcbin port=9000 ip-address=localhost batched-push-timeout=33333 max-batch-size=10 drop-pipeline-eos=1 live-source=1 width=1920 height=1080 \
 uri-list=rtsp://“avilable rtsp", rtsp://"unavailable rtsp"  !  nvmultistreamtiler  !  fakesink

But If one of the rtsp camera does not work , the nvstreamdemux cannot start branch 0 or branch 1 etc. pipeline will get stuck. We will discuss this internally.

i found a workaround, starting the pipeline with local videos only (rtsp://mediaserver:8554/mystream)

nvmultiurisrcbin rtsp-reconnect-interval=10 rtsp-reconnect-attempts=-1 
port=9000 ip-address=localhost sync-inputs=0 live-source=1 attach-sys-ts=TRUE 
nvbuf-memory-type=3 name=mux drop-pipeline-eos=1 enable-padding=true 
max-batch-size=2 batched-push-timeout=33333 width=1282 height=722 
uri-list=rtsp://mediaserver:8554/mystream,rtsp://mediaserver:8554/mystream 
sensor-id-list=0,1 sensor-name-list=mono_0,mono_1 

! nvinfer  interval=0 name="primary_inference" config-file-path=config.txt batch-size=2 model-engine-file="model_b2_gpu0_fp16.engine"   
! nvtracker tracker-width=1280 tracker-height=704 gpu-id=0  ll-lib-file=/opt/nvidia/deepstream/deepstream/lib/libnvds_nvmultiobjecttracker.so ll-config-file=tracker_config.yml  
! nvstreamdemux name=demux 

demux.src_0 ! queue max-size-buffers=10000 leaky=2 ! nvvideoconvert nvbuf-memory-type=3 ! video/x-raw(memory:NVMM),format=RGB ! fakesink async=true name=jpeg0 
demux.src_1 ! queue max-size-buffers=10000 leaky=2 ! nvvideoconvert nvbuf-memory-type=3 ! video/x-raw(memory:NVMM),format=RGB ! fakesink async=true name=jpeg1 

then removing and readding every camera with

curl -XPOST 'http://localhost:9000/api/v1/stream/remove' -d '{
    "key": "sensor",
    "value": {
        "camera_id": "1",
        "camera_name": "mono_1",
        "camera_url": "rtsp://mediaserver:8554/mystream",
        "change": "camera_remove",
    }
}'

curl -XPOST 'http://localhost:9000/api/v1/stream/add' -d '{
    "key": "sensor",
    "value": {
        "camera_id": "1",
        "camera_name": "mono_1",
        "camera_url": "rtsp://admin:***********@192.168.10.220:8554/ppe_basic.mp4",
        "change": "camera_add",
    }
}'