Please provide complete information as applicable to your setup.
• Hardware Platform (Jetson / GPU) GPU • DeepStream Version 6.4 • JetPack Version (valid for Jetson only) • TensorRT Version 8.6.1 • NVIDIA GPU Driver Version (valid for GPU only) 535
So I was facing some stability issues on the rtsp end, due to which the rtsp tends to disconnect sometimes for for time frame ranging between 10 secs-2 mins. To counter this issue I used the nvurisrcbin in my python app. Please find the code snippet below
This tends to work well, but with this I’m facing two issues, first being that, if the rtsp gets back up in 10 secs then I’m losing the important data and if takes more than 60 secs, then the pipeline ends. Is there any to way tackle this issue. I saw the rtsp-reconnect-attempts property in the source group documentation for the deepstream-app.
Property:
rtsp-reconnect-attempts
Meaning:
Maximum number of times a reconnection is attempted. Setting it to -1 means reconnection will be attempted infinitely. Valid when type of source is 4 and rtsp-reconnect-interval-sec is a non-zero positive value.
Type:
Integer, ≥-1
Example:
rtsp-reconnect-attempts=2
Is there any way to implement this in python pipeline as there is no specific documentation related to this available.
gst-inspect-1.0 nvurisrcbin|grep rtsp
rtsp-reconnect-attempts: Set rtsp reconnect attempt value
rtsp-reconnect-interval: Timeout in seconds to wait since last data was received from an RTSP source before forcing a reconnection. 0=disable timeout
As the log shown above, nvurisrcbin supports rtsp-reconnect-attempts. you can set the property in Python code.
Traceback (most recent call last):
File "/home/ubuntu/eci/deepstream_app/deepstream_app/test1/deepstream-nvdsanalytics/app2/deepstream_prominance.py", line 728, in <module>
sys.exit(main(config))
File "/home/ubuntu/eci/deepstream_app/deepstream_app/test1/deepstream-nvdsanalytics/app2/deepstream_prominance.py", line 386, in main
source_bin=create_source_bin(i, uri_name)
File "/home/ubuntu/eci/deepstream_app/deepstream_app/test1/deepstream-nvdsanalytics/app2/deepstream_prominance.py", line 317, in create_source_bin
uri_decode_bin.set_property("rtsp-reconnect-attempts",6)
TypeError: object of type `GstDsNvUriSrcBin' does not have property `rtsp-reconnect-attempts'
Also I got this response on running the following command:
gst-inspect-1.0 nvurisrcbin|grep rtsp
rtsp-reconnect-interval: Timeout in seconds to wait since last data was received from an RTSP source before forcing a reconnection. 0=disable timeout
smart-rec-container : Container format of recorded video. MP4 and MKV containers are supported. Sources must be of type source-type-rtsp
smart-record : Enable Smart Record and choose the type of events to respond to. Sources must be of type source-type-rtsp
type : Set the type of source. Use source-type-rtsp to use smart record features
(2): rtsp - Customize for RTSP, supports smart recording
uri : URI of the file or rtsp source