DeepStream doesn't reconnect to RTSP stream

Please provide complete information as applicable to your setup.

• Hardware Platform (Jetson / GPU)
GPU
• DeepStream Version
DeepStream 6.2
• JetPack Version (valid for Jetson only)
• TensorRT Version
• NVIDIA GPU Driver Version (valid for GPU only)
525
• Issue Type( questions, new requirements, bugs)
Bug

I have DeepStream reading some RTSP streams and for example when I try reading one frame from some RTSP stream by running this command - ffmpeg -y -i rtsp://admin:@192.168.0.101:554:network-caching=1000 -vframes 1 test.jpg DeepStream crashes and doesn’t reconnect to the stream, even though I these settings for each source group:

select-rtp-protocol=4
rtsp-reconnect-interval-sec=60
rtsp-reconnect-attempts=-1

Here are the logs for when it crashes:

**PERF:  20.00 (20.00)  20.02 (20.00)   20.00 (20.00)   20.03 (20.00)   20.02 (20.00)   20.00 (20.00)   20.02 (20.00)   20.03 (19.99)   20.00 (20.00)   20.02 (20.00)
** ERROR: <cb_newpad3:517>: Failed to link depay loader to rtsp src
** ERROR: <cb_newpad3:517>: Failed to link depay loader to rtsp src
ERROR from src_elem7: Internal data stream error.
Debug info: gstrtspsrc.c(6057): gst_rtspsrc_loop (): /GstPipeline:pipeline/GstBin:multi_src_bin/GstBin:src_sub_bin7/GstRTSPSrc:src_elem7:
streaming stopped, reason not-linked (-1)
** INFO: <reset_source_pipeline:1774>: Resetting source 7

(deepstream-app:1): GStreamer-CRITICAL **: 09:50:21.454: Padname recv_rtp_src_1_2_8 is not unique in element src_elem7, not adding

(deepstream-app:1): GStreamer-CRITICAL **: 09:50:21.607: Padname recv_rtp_src_0_2_98 is not unique in element src_elem7, not adding
ERROR from src_elem7: Internal data stream error.
Debug info: gstrtspsrc.c(6057): gst_rtspsrc_loop (): /GstPipeline:pipeline/GstBin:multi_src_bin/GstBin:src_sub_bin7/GstRTSPSrc:src_elem7:
streaming stopped, reason not-linked (-1)

(deepstream-app:1): GStreamer-CRITICAL **: 09:50:31.055: gst_pad_set_active: assertion 'GST_IS_PAD (pad)' failed

(deepstream-app:1): GStreamer-CRITICAL **: 09:50:31.055: gst_element_remove_pad: assertion 'GST_IS_PAD (pad)' failed

(deepstream-app:1): GStreamer-CRITICAL **: 09:50:31.055: gst_pad_set_active: assertion 'GST_IS_PAD (pad)' failed

(deepstream-app:1): GStreamer-CRITICAL **: 09:50:31.055: gst_element_remove_pad: assertion 'GST_IS_PAD (pad)' failed
** INFO: <reset_source_pipeline:1774>: Resetting source 7
ERROR from src_elem7: Could not read from resource.
Debug info: gstrtspsrc.c(6421): gst_rtspsrc_try_send (): /GstPipeline:pipeline/GstBin:multi_src_bin/GstBin:src_sub_bin7/GstRTSPSrc:src_elem7:
Could not receive message. (Received end-of-file)
ERROR from src_elem7: Could not write to resource.
Debug info: gstrtspsrc.c(8096): gst_rtspsrc_close (): /GstPipeline:pipeline/GstBin:multi_src_bin/GstBin:src_sub_bin7/GstRTSPSrc:src_elem7:
Could not send message. (Received end-of-file)

(deepstream-app:1): GStreamer-CRITICAL **: 09:50:31.156: Padname recv_rtp_src_1_2_8 is not unique in element src_elem7, not adding

(deepstream-app:1): GStreamer-CRITICAL **: 09:50:31.296: Padname recv_rtp_src_0_2_98 is not unique in element src_elem7, not adding
ERROR from src_elem7: Internal data stream error.
Debug info: gstrtspsrc.c(6057): gst_rtspsrc_loop (): /GstPipeline:pipeline/GstBin:multi_src_bin/GstBin:src_sub_bin7/GstRTSPSrc:src_elem7:
streaming stopped, reason not-linked (-1)

**PERF:  FPS 0 (Avg)    FPS 1 (Avg)     FPS 2 (Avg)     FPS 3 (Avg)     FPS 4 (Avg)     FPS 5 (Avg)     FPS 6 (Avg)     FPS 7 (Avg)     FPS 8 (Avg)     FPS 9 (Avg)
**PERF:  20.00 (20.00)  19.98 (20.00)   20.00 (20.00)   20.00 (20.00)   20.00 (20.00)   20.00 (20.00)   19.98 (20.00)   19.89 (19.64)   20.00 (20.00)   20.00 (20.00)
**PERF:  20.00 (20.00)  20.00 (20.00)   20.00 (20.00)   20.00 (20.00)   19.98 (20.00)   20.00 (20.00)   20.00 (20.00)   0.00 (19.17)    19.97 (20.00)   19.98 (20.00)

(deepstream-app:1): GStreamer-CRITICAL **: 09:51:31.305: gst_pad_set_active: assertion 'GST_IS_PAD (pad)' failed

(deepstream-app:1): GStreamer-CRITICAL **: 09:51:31.305: gst_element_remove_pad: assertion 'GST_IS_PAD (pad)' failed

(deepstream-app:1): GStreamer-CRITICAL **: 09:51:31.305: gst_pad_set_active: assertion 'GST_IS_PAD (pad)' failed

(deepstream-app:1): GStreamer-CRITICAL **: 09:51:31.305: gst_element_remove_pad: assertion 'GST_IS_PAD (pad)' failed
** INFO: <reset_source_pipeline:1774>: Resetting source 7
ERROR from src_elem7: Could not read from resource.
Debug info: gstrtspsrc.c(6323): gst_rtsp_src_receive_response (): /GstPipeline:pipeline/GstBin:multi_src_bin/GstBin:src_sub_bin7/GstRTSPSrc:src_elem7:
Could not receive message. (System error)
ERROR from src_elem7: Could not read from resource.
Debug info: gstrtspsrc.c(6421): gst_rtspsrc_try_send (): /GstPipeline:pipeline/GstBin:multi_src_bin/GstBin:src_sub_bin7/GstRTSPSrc:src_elem7:
Could not receive message. (System error)
ERROR from src_elem7: Could not write to resource.
Debug info: gstrtspsrc.c(8096): gst_rtspsrc_close (): /GstPipeline:pipeline/GstBin:multi_src_bin/GstBin:src_sub_bin7/GstRTSPSrc:src_elem7:
Could not send message. (System error)

(deepstream-app:1): GStreamer-CRITICAL **: 09:51:31.401: Padname recv_rtp_src_1_2_8 is not unique in element src_elem7, not adding

(deepstream-app:1): GStreamer-CRITICAL **: 09:51:31.518: Padname recv_rtp_src_0_2_98 is not unique in element src_elem7, not adding
ERROR from src_elem7: Internal data stream error.
Debug info: gstrtspsrc.c(6057): gst_rtspsrc_loop (): /GstPipeline:pipeline/GstBin:multi_src_bin/GstBin:src_sub_bin7/GstRTSPSrc:src_elem7:
streaming stopped, reason not-linked (-1)
**PERF:  19.99 (20.00)  20.03 (20.00)   20.02 (20.00)   19.99 (20.00)   20.03 (20.00)   19.99 (20.00)   20.03 (20.00)   0.00 (18.72)    20.02 (20.00)   20.02 (20.00)
**PERF:  20.01 (20.00)  19.98 (20.00)   19.99 (20.00)   20.01 (20.00)   19.98 (20.00)   20.01 (20.00)   19.98 (20.00)   0.00 (18.29)    19.99 (20.00)   19.99 (20.00)

(deepstream-app:1): GStreamer-CRITICAL **: 09:52:31.344: gst_pad_set_active: assertion 'GST_IS_PAD (pad)' failed

(deepstream-app:1): GStreamer-CRITICAL **: 09:52:31.344: gst_element_remove_pad: assertion 'GST_IS_PAD (pad)' failed

(deepstream-app:1): GStreamer-CRITICAL **: 09:52:31.344: gst_pad_set_active: assertion 'GST_IS_PAD (pad)' failed

(deepstream-app:1): GStreamer-CRITICAL **: 09:52:31.344: gst_element_remove_pad: assertion 'GST_IS_PAD (pad)' failed
** INFO: <reset_source_pipeline:1774>: Resetting source 7
ERROR from src_elem7: Could not read from resource.
Debug info: gstrtspsrc.c(6323): gst_rtsp_src_receive_response (): /GstPipeline:pipeline/GstBin:multi_src_bin/GstBin:src_sub_bin7/GstRTSPSrc:src_elem7:
Could not receive message. (System error)
ERROR from src_elem7: Could not read from resource.
Debug info: gstrtspsrc.c(6421): gst_rtspsrc_try_send (): /GstPipeline:pipeline/GstBin:multi_src_bin/GstBin:src_sub_bin7/GstRTSPSrc:src_elem7:
Could not receive message. (System error)
ERROR from src_elem7: Could not write to resource.
Debug info: gstrtspsrc.c(8096): gst_rtspsrc_close (): /GstPipeline:pipeline/GstBin:multi_src_bin/GstBin:src_sub_bin7/GstRTSPSrc:src_elem7:
Could not send message. (System error)

(deepstream-app:1): GStreamer-CRITICAL **: 09:52:31.450: Padname recv_rtp_src_1_2_8 is not unique in element src_elem7, not adding

(deepstream-app:1): GStreamer-CRITICAL **: 09:52:31.567: Padname recv_rtp_src_0_2_98 is not unique in element src_elem7, not adding
ERROR from src_elem7: Internal data stream error.
Debug info: gstrtspsrc.c(6057): gst_rtspsrc_loop (): /GstPipeline:pipeline/GstBin:multi_src_bin/GstBin:src_sub_bin7/GstRTSPSrc:src_elem7:
streaming stopped, reason not-linked (-1)
**PERF:  19.99 (20.00)  20.02 (20.00)   19.99 (20.00)   19.99 (20.00)   20.02 (20.00)   19.99 (20.00)   20.02 (20.00)   0.00 (17.89)    19.99 (20.00)   20.02 (20.00)
**PERF:  20.01 (20.00)  19.98 (20.00)   20.01 (20.00)   20.01 (20.00)   20.00 (20.00)   20.01 (20.00)   19.98 (20.00)   0.00 (17.50)    20.01 (20.00)   19.98 (20.00)

I can then read this stream and record it using for example this command - ffmpeg -i rtsp://admin:@192.168.0.101:554:network-caching=1000 -t 60 1.mp4

However if I restart DeepStream it starts working again.

  1. about “doesn’t reconnect” issue, from the “INFO: <reset_source_pipeline:1774>: Resetting source 7”, the application already reconnected, but failed to connect because of “Could not receive message. (Received end-of-file)”, you can find reset_source_pipeline in the deepstream-app code which is opensource. you can use some thirparty tools check if the rtsp can be played on the machine where you can testing Deepstream when this issue happened.
  2. about “DeepStream crashes”, could you share a whole log? can you use gdb to get a crash stack?

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

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