Starting an empty pipeline and then add camera with RTSP fails - Gst-nvmultiurisrcbin

Hello, I’m setting up a dynamic pipeline to use Gst-nvmultiurisrcbin with the REST API. The problem is that I start it empty and when I add a camera to the API with camera_add or camera_streaming I get an error and it can’t connect at all. When doing the same thing with a local .h264 file in the Deepstream image, everything works without problems. Curiously, in the RTSP use case, if I start the pipeline with at least one camera and then start adding others via the API, everything works fine. Can someone please guide me? I’ve been trying for a week and can’t find what’s going on. There are no examples of Python pipelines in a similar situation.

I attach the code here.

CODE.pdf (65.1 KB)

And this the error after i add the first RTSP to the empty pipeline:

Creating Pipeline

Starting pipeline without any RTSP source. Waiting for API POST to add streams.
Creating multiurisrcbin

Creating Pgie

Creating nvtracker

Creating nvvidconv1

Creating filter1

Creating tiler

Creating nvvidconv

Creating nvosd

Creating nvvidconv_postosd

Creating filter2

Creating sink

WARNING: Overriding infer-config batch-size 2 with number of sources 32

Adding elements to Pipeline

Is it Integrated GPU? : 0
Starting pipeline

Civetweb version: v1.16
Server running at port: 9014
gstnvtracker: Loading low-level lib at /opt/nvidia/deepstream/deepstream/lib/libnvds_nvmultiobjecttracker.so
[NvMultiObjectTracker] Initialized
0:00:01.025952848 1214 0x5c004589e930 INFO nvinfer gstnvinfer.cpp:684:gst_nvinfer_logger: NvDsInferContext[UID 1]: Info from NvDsInferContextImpl::deserializeEngineAndBackend() <nvdsinfer_context_impl.cpp:2092> [UID = 1]: deserialized trt engine from :/models/deepstream/7.1/A100/32/peoplenet/model_int8.plan
INFO: ../nvdsinfer/nvdsinfer_model_builder.cpp:327 [FullDims Engine Info]: layers num: 3
0 INPUT kFLOAT input_1:0 3x544x960 min: 1x3x544x960 opt: 32x3x544x960 Max: 32x3x544x960
1 OUTPUT kFLOAT output_cov/Sigmoid:0 3x34x60 min: 0 opt: 0 Max: 0
2 OUTPUT kFLOAT output_bbox/BiasAdd:0 12x34x60 min: 0 opt: 0 Max: 0

0:00:01.026055133 1214 0x5c004589e930 INFO nvinfer gstnvinfer.cpp:684:gst_nvinfer_logger: NvDsInferContext[UID 1]: Info from NvDsInferContextImpl::generateBackendContext() <nvdsinfer_context_impl.cpp:2195> [UID = 1]: Use deserialized engine model: /models/deepstream/7.1/A100/32/peoplenet/model_int8.plan
0:00:01.042540615 1214 0x5c004589e930 INFO nvinfer gstnvinfer_impl.cpp:343:notifyLoadModelStatus: [UID 1]: Load new model:config_peoplenet.txt sucessfully
uri:/api/v1/stream/add
method:POST
Resetting source 0, attempts: 1
Warning: gst-stream-error-quark: No data from source since last 30 sec. Trying reconnection (1): gstdsnvurisrcbin.cpp(1529): watch_source_status (): /GstPipeline:pipeline0/GstDsNvMultiUriBin:nvmultiurisrcbin/GstBin:nvmultiurisrcbin_creator/GstDsNvUriSrcBin:dsnvurisrcbin0

Please, is there any update with this bug? yuweiw