If any camera goes down I need to reconnect with out playing the pipeline state playing again

Please provide complete information as applicable to your setup.

**• Hardware Platform ------------> GPU
**• DeepStream Version -----------------> 6.2
**• TensorRT Version ----------------> 8.5
**• NVIDIA GPU Driver Version ---------------> 535

So My concern is I have some cameras added and after certain time one goes down I able to understand which camera is goes down but I don’t want my pipeline to 1st null state and then play state again … coz If I do that my all model is loading again I don’t want to do that …
If there any approach to avoid this and re-added the camera with out pipeline null state and playing state …
please help me with this !

@yuichi.motohashi @Amelie @DaneLLL @DaveYYY @fauzi140794
please replay into it …

@spolisetty @yuweiw

If there is no EOS or error message received in the bus, you can add/remove sources as the sample deepstream_reference_apps/runtime_source_add_delete at master · NVIDIA-AI-IOT/deepstream_reference_apps (github.com)

If there is EOS or error message received in the bus, you must change the pipeline state to NULL and restart the pipeline.

I’m not getting any error or EOS message … How I able to know any camera is get down or not I make timer thread which keep calculating total frame count, if any camera is get down I able to understand by that which camera is goes down. I’m using python as a language and I am using parallel pipeline , where I have different branches different model is running … My problem is I pause the pipeline and re-start it IT will load entire pipeline again whole model will be load and every camera will be goes down. I don’t want to disturb other branches as well as same branch multiple camera also … What my end goal is to delete particular stream from the pipeline and re-add it into pipeline but It’s not happen.

For python you may refer to deepstream_python_apps/apps/runtime_source_add_delete at master · NVIDIA-AI-IOT/deepstream_python_apps (github.com)

for me each camera is not a pipeline … I am using streammux to use multiple stream in same branch but in runtime_source_add_delete is each camera is a pipeline … if that was my case I was not query here … I know that , But I have simple question while pipeline in playing state If any camera is goes down , I’m removing from pipeline that particular camera source , and when It’s up re-adding that into streammux with the source … But I’m not getting the feed for that camera …

give a specific solution where my problem can be solved.

Each source is an element in runtime_source_add_delete sample. Your camera is also an element.

Hey @Fiona.Chen I have implemented kind of same thing But while re-connect that camera It’s giving me ‘’‘[ERROR push 333] push failed [-3]’‘’
error and not adding that camera
How I can solve this problem

While re-connect that camera (“STATE CHANGE NO PREROLL\n”)
This is printing
The feed is not coming for that camera,
If you can help me with this I can do it ASAP …

What is your camera? USB camera, CSI camera, ip camera, …?

IP camera @Fiona.Chen

I am using python as a language , and parallel pipeline I think you aware of that in parallel 1st we have streammux main and after Tee demux and individual model streammux , I’m using new streammux. I added two camera for same model pipeline (uri-decodebin—>streammux_main —> Tee —> nvstreamdemux —> streammux —> face —> tracker —> side_faces —> face_embeddings —> nvstreamdemux —> nvvideoconvert —> capsfilter —> metamux —> appsink )

I have two camera on same model , while running 1st It’s giving 25 FPS for each camera, and when I disconnected one camera for testing it’s disconnected (cam 1) but It’s impact on other camera(cam 2) fps this time it’s giving 7 FPS , while re-connection it’s re-connected sometime If It’s re-connected also here very high FPS drop is happening like 6-7 FPS …

sometime It’s not even reconnecting and giving me “[ERROR push 333] push failed [-3] "
is coming , and re-connection is not happening,
“””“”set state of source bin to playing
state_return = self.g_source_bin_list[source_id].set_state(Gst.State.PLAYING)

    if state_return == Gst.StateChangeReturn.SUCCESS:
        print("STATE CHANGE SUCCESS\n")


Print state change success but not able to pick up frame sometime …
If able to pick also It’s running very slow 5 FPS and time by time it’s very lag like 30 min …
I want to understand how I can do it more prominent way and no FPS drop while disconnected camera as well after re-connect camera .
Can you tell me why FPS drop is happening or improvement ?

The deepstream_python_apps/apps/runtime_source_add_delete at master · NVIDIA-AI-IOT/deepstream_python_apps (github.com) sample supports RTSP source. Please try the sample with your IP camera first.

It’s running for this

@Fiona.Chen Can you answer my above question It’s impotent for me to know and slove the problem.

The sample has shown you the method to remove/add source dynamically. For the FPS drop issue. You may refer to the nvstreammux setting. DeepStream SDK FAQ - Intelligent Video Analytics / DeepStream SDK - NVIDIA Developer Forums

Now I’m using new streammux " export USE_NEW_NVSTREAMMUX=yes"
let me explain what I’m trying to do and where I got issue you can help me …
I have a dictionary where I am storing the frame count from that I able to understand If any camera is get down or not, If any camera is get down then I’m calling “delete_sources”
which internally calling “stop_release_source” function … it’s perfect … not impacting other camera, other are live.

when I re-connect that camera again sometime it’s connecting and everything working fine, sometime it gives me “[error push 333] push failed [-3]” and that camera is not adding …
other camera are working.
‘’‘’’ [error push 333] push failed [-3] ‘’‘’’ continuous coming for that particular camera which I want to add

Please help me out with this