Deepstream crashes when rtsp fails

I can’t comment much on the nvidia solution above, because on one hand my C skills are not that good and on the other, the app is not specifically designed to handle rtsp (network) errors but merely to add / remove error-free sources.

I somehow managed to handle reconnect in python using some hacks:

  • On the bus call, check message.src and if it’s from rtspsrc, don’t quit the loop
  • Upon detecting rtsp error, set the uridecodebin bin to NULL state, then call sync_state_with_parent() on this bin. This will discard previous state and start the connection process from scratch. Don’t forget to place your callbacks again for linking to nvstreammux. I’m not sure if it’ll work with a manually constructed decoding chain (instead of uridecodbin) but I’m pretty sure all elements in the chain (including the nvidia decoder) must be set to NULL.
1 Like

Hello @dorin.clisu.ntt , i am facing the similar error and i am using python , i want to understand how to implement the mentioned solution . i am a newbie in deepstream , so can you guide me or can you provide a example for the following mentioned solution .
thanks

Hi @beefshepherd do you find a way to fix this problem?

Thanks!

i applied this patch to deepstream_test5 version 4.0.2
but facing problem . whenever a source get off the subsequent sources in the pipleline also stops collecting frame in nvstreammux.
which forbids in collecting meta in analytics module.
Please provide the solution as i am in betweeen my project completion.

@shamsher1995

 $ gst-inspect-1.0 nvstreammux
...
  batched-push-timeout: Timeout in microseconds to wait after the first buffer is available
                        to push the batch even if the complete batch is not formed.
                        Set to -1 to wait infinitely
                        flags: readable, writable

Try that. I set the timeout to the frame rate.

i am gettting Error :-

Debug info: gstqueue.c(988): gst_queue_handle_sink_event (): /GstPipeline:pipeline/GstBin:processing_bin_0/GstBin:sink_bin/GstQueue:sink_bin_queue:
streaming stopped, reason not-linked (-1)

Please help me out.