The frame rate of rtsp source becomes 0.2 when use deepstream python app

Please provide complete information as applicable to your setup.

• Hardware Platform (Jetson / GPU) GPU(1050ti)
• DeepStream Version 5.1
• Cuda Version 11.1
• TensorRT Version 7.2.3
• NVIDIA GPU Driver Version (valid for GPU only) 455.32
• Issue Type( questions, new requirements, bugs) questions

• How to reproduce the issue
Every once in a while, one of the rtsp streams gets stuck and the frame rate of the others becomes 0.2 when I use deepstream_imagedata_multistream.py with Multiple rtsp sources.I tried it on both GPU and jetson nano, and the result is still the same.

I was looking for answers in the forum and saw some people with the same problem I was having.One of the posts said that turning up the interval and decreasing the value of batched-push-timeout solved the problem.But I tried it and it just delayed the problem.

There are also some posts saying that this is a problem with rtsp streams, and I think there is some truth in this view. But when there is a problem with a stream how do we find out in time that the stream has an error and reload this stream?

I tried to borrow the code for adding and removing sources from deepstream_rt_src_add_del.py. When detecting a source blocking delete and re-add it, but I don’t know how to determine the one that went wrong, so I’m using a very clumsy method that is to detect fps.But maybe I was too low and re-adding the source led to some other errors, which frustrated me.

So ,in general, my questions are as follows

1. How to solve the problem of frame rate dropping to 0.2 using rtsp stream?

2. If it is indeed due to a problem with the rtsp stream, how do I know in time which stream is having problems when there are multiple sources?

3. Is the idea of reloading the stream dynamically correct? If not how do I handle an exception stream?

Can someone give me some advice? thanks.

1. How to solve the problem of frame rate dropping to 0.2 using rtsp stream?
[amycao] I try to mimic your test case, but it’s not easy to set the stream into stuck, i set one rtsp camera video codec H264 frame rate to 10, while others two set to 30, so that the time frames arriving streammux have a big difference, but i can not repro your issue. this is the perf output using deepstream-app:

**PERF: FPS 0 (Avg) FPS 1 (Avg) FPS 2 (Avg)
**PERF: 29.73 (29.48) 10.71 (10.29) 29.56 (29.32)
**PERF: 30.23 (29.85) 10.03 (10.08) 30.23 (29.81)
**PERF: 29.90 (30.00) 9.98 (10.05) 29.90 (29.97)

not sure if it’s enough to demonstrate your schenario.
can you try your rtsp streams using deepstream-app to see the issue you mentioned exist?
2. If it is indeed due to a problem with the rtsp stream, how do I know in time which stream is having problems when there are multiple sources?
[amycao] One way you can refer is get the time arriving decoder and leaving the decoder, you can monitor the difference some time, let’s say 10 minutes, if the time difference between the two deviated a lot from the stream framerate, that means network large latency. refer Troubleshooting — DeepStream 5.1 Release documentation The DeepStream application is running slowly, by enabling components latency measurement, you can get frame arriving and leaving time for components.
3. Is the idea of reloading the stream dynamically correct? If not how do I handle an exception stream?