How to monitor status of RTSP stream?

• Hardware Platform Jetson
• DeepStream Version 6.3
• JetPack Version 5.1
• TensorRT Version 5.1

Hi, are there any examples (in Python) of monitoring status of RTSP stream? My goal is to get notification when one or more RTSP streams disconnect. I’m working with deepstream_test_3 example.

1 Like

Hi @nikola2,

The RTSP source element will post an error in the GStreamer bus if it disconnects. You only need to monitor the bus and filter the error.

Here is how to do it on python:

def on_error(bus, msg):
    print('Error {}: {}, {}'.format(, *msg.parse_error()))


bus = pipeline.get_bus()
bus.connect('message::error', on_error)
1 Like
  1. please refer to rtspsrc_monitor_probe_func in DeepStream SDK, you can add a probe function to monitor data receiving.
  2. nvurisrcbin has RTSP reconnecting function, please find rtsp-reconnect-interval in the doc.
1 Like

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