Please provide complete information as applicable to your setup.
• Hardware Platform (Jetson / GPU) Jetson • DeepStream Version 6.0.1 • JetPack Version (valid for Jetson only) 4.6.1 • TensorRT Version 8.2.1+cuda10.2 • NVIDIA GPU Driver Version (valid for GPU only) • Issue Type( questions, new requirements, bugs) questions • How to reproduce the issue ? (This is for bugs. Including which sample app is using, the configuration files content, the command line used and other details for reproducing) • Requirement details( This is for new requirement. Including the module name-for which plugin or for which sample application, the function description)
I have a question about deepstream-app with rtsp stream input.
When I use an rtsp server and source an mp4 file, it takes some time for the stream to pass through the decoder bin in deepstream-app.
The amount of time varies run to run, sometimes over 20 sec.
Here is an example of the terminal output. out.txt (3.2 KB)
deepstream_source_bin.c is modifed to count and print the number of frames at rtsp_src and decodebin every 1 sec.
Because I use a video with 5 fps, the log shows there is about 17 sec delay.
Here is data to reproduce the issue. 240418_data.zip (19.7 MB)
Please note that rtsp server is built on another PC by mediamtx and that I use a sample video “sample_1080p_h264.mp4” with the fps converted to 5.
Is this an expected behavior of deepstream-app?
I would appreciate it if you could check.
It may be that data has not been consumed since then, resulting in no data from the decoderbin. But the rtsp can buffer data, so there will be a gap.
Could you try to adjust the value of the latency for source group and see if it makes a differece?
The solution is for the stream to be smooth. It will increase the latency. So you need to do the opposite to decrease the latency. But it will cause the stream to be unsmooth.
Sorry for the late reply.
Fakesink has been used throughout in my experiment.
Adjusting “latency” has been done also in the case of “drop-on-latency” set to TRUE.
Both. I use the ffplay with our sample_720.mp4 sample video and a real camera rtsp source. It both works well.
One reason I can think of for the delay in this place might be the I frame interval of your rtsp source is too big. When the source is connected, a large number of frames are not I-frames. The decoder needs to drop the Non-I frame.
I haven’t been able to reproduce your result for “sample_720p.mp4” on my side.
But I found that using “sample_1080p_h264.mp4” with the I frame interval set to be small results in almost no delay.
Your suggested reason seems to be correct! Thank you very much for your help!