The deepstream-test3 demo using rtsp webcam delayed

Why is the deepstream-test3 demo using rtsp webcam delayed so much?
It originally used the nveglglessink plugin, which was replaced with nvoverlaysink as mentioned in another topic, but this plugin doesn’t support the latest version of ds anymore.
Like this:

-  sink = gst_element_factory_make ("nveglglessink", "nvvideo-renderer");
+  sink = gst_element_factory_make ("nvoverlaysink", "nvxiamian video-renderer");

I use deepstream-test3 demo to load rtsp cameras in how should I reduce the delay? Replace the nveglglessink->nvdrmvideosink plugin ?

How did you measure the delay? Did you change any code inside deepstream-test3? Have you read the REDAME file under /opt/nvidia/deepstream/deepstream/sources/apps/sample_apps/deepstream-test3 before running your case?
Can you post your command line to run deepstream-test3-app?

It is a noticeable delay that can be observed.
I did not modify any code, just the configuration file dstest3_config.yml.
The location of the modified configuration file is as follows:

source-list:
  #semicolon separated uri. For ex- uri1;uri2;uriN;
  #list: file:///opt/nvidia/deepstream/deepstream/samples/streams/sample_1080p_h264.mp4;
  #list: file://sample_1080p_h264.mp4;
  list: rtsp://192.168.1.123:554/user=admin&password=&channel=1&stream=0.sdp?;

In my annotated tuned offline file test everything is fine, but the RTSP stream has a delay, I guess, is it the reason why the plugin on pipeline is not adapted?

Please provide complete information as applicable to your setup.

• Hardware Platform (Jetson / GPU)

• DeepStream Version

• JetPack Version (valid for Jetson only)

• TensorRT Version

• NVIDIA GPU Driver Version (valid for GPU only)

• Issue Type( questions, new requirements, bugs)

• 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)

deepstream-app version 6.1.0
DeepStreamSDK 6.1.0
CUDA Driver Version: 11.4
CUDA Runtime Version: 11.0
TensorRT Version: 8.2
cuDNN Version: 8.4
libNVWarp360 Version: 2.0.1d3
Device on:A6000

if you developed your own DS C++ code, you could also refer to DeepStream SDK FAQ - #12 by bcao 4 to measure the latency of the pipeline comonents

I have modified the deepstream-test3 program, and after running it,
no box is displayed and printed out the results like this:

************BATCH-NUM = 41**************
Comp name = nvv4l2decoder0 in_system_timestamp = 1666856167763.085938 out_system_timestamp = 1666856167763.748047               component latency= 0.662109
Comp name = nvstreammux-stream-muxer source_id = 0 pad_index = 0 frame_num = 41               in_system_timestamp = 1666856167763.829102 out_system_timestamp = 1666856167763.986084               component_latency = 0.156982
Comp name = primary-nvinference-engine in_system_timestamp = 1666856167764.033936 out_system_timestamp = 1666856167764.889893               component latency= 0.855957
Comp name = nvtiler in_system_timestamp = 1666856167764.944092 out_system_timestamp = 1666856167765.343018               component latency= 0.398926
Comp name = nvvideo-converter in_system_timestamp = 1666856167765.561035 out_system_timestamp = 1666856167765.716064               component latency= 0.155029
Comp name = nv-onscreendisplay in_system_timestamp = 1666856167765.833008 out_system_timestamp = 1666856167765.847900               component latency= 0.014893
Source id = 0 Frame_num = 41 Frame latency = 2.807129 (ms) 

************BATCH-NUM = 42**************
Comp name = nvv4l2decoder0 in_system_timestamp = 1666856167842.747070 out_system_timestamp = 1666856167846.197998               component latency= 3.450928
Comp name = nvstreammux-stream-muxer source_id = 0 pad_index = 0 frame_num = 42               in_system_timestamp = 1666856167846.235107 out_system_timestamp = 1666856167846.388916               component_latency = 0.153809
Comp name = primary-nvinference-engine in_system_timestamp = 1666856167846.506104 out_system_timestamp = 1666856167853.613037               component latency= 7.106934
Comp name = nvtiler in_system_timestamp = 1666856167853.754883 out_system_timestamp = 1666856167857.861084               component latency= 4.106201
Comp name = nvvideo-converter in_system_timestamp = 1666856167858.092041 out_system_timestamp = 1666856167860.152100               component latency= 2.060059
Comp name = nv-onscreendisplay in_system_timestamp = 1666856167860.270996 out_system_timestamp = 1666856167860.284912               component latency= 0.013916
Source id = 0 Frame_num = 42 Frame latency = 17.585938 (ms) 

************BATCH-NUM = 43**************
Comp name = nvv4l2decoder0 in_system_timestamp = 1666856167924.729004 out_system_timestamp = 1666856167929.532959               component latency= 4.803955
Comp name = nvstreammux-stream-muxer source_id = 0 pad_index = 0 frame_num = 43               in_system_timestamp = 1666856167929.616943 out_system_timestamp = 1666856167929.775879               component_latency = 0.158936
Comp name = primary-nvinference-engine in_system_timestamp = 1666856167929.823975 out_system_timestamp = 1666856167936.742920               component latency= 6.918945
Comp name = nvtiler in_system_timestamp = 1666856167936.896973 out_system_timestamp = 1666856167941.375977               component latency= 4.479004
Comp name = nvvideo-converter in_system_timestamp = 1666856167941.607910 out_system_timestamp = 1666856167943.681885               component latency= 2.073975
Comp name = nv-onscreendisplay in_system_timestamp = 1666856167943.801025 out_system_timestamp = 1666856167943.815918               component latency= 0.014893
Source id = 0 Frame_num = 43 Frame latency = 19.133057 (ms) 

************BATCH-NUM = 44**************
Comp name = nvv4l2decoder0 in_system_timestamp = 1666856168013.827881 out_system_timestamp = 1666856168014.311035               component latency= 0.483154
Comp name = nvstreammux-stream-muxer source_id = 0 pad_index = 0 frame_num = 44               in_system_timestamp = 1666856168014.347900 out_system_timestamp = 1666856168014.500977               component_latency = 0.153076
Comp name = primary-nvinference-engine in_system_timestamp = 1666856168014.614990 out_system_timestamp = 1666856168015.392090               component latency= 0.777100
Comp name = nvtiler in_system_timestamp = 1666856168015.520020 out_system_timestamp = 1666856168015.728027               component latency= 0.208008
Comp name = nvvideo-converter in_system_timestamp = 1666856168015.934082 out_system_timestamp = 1666856168016.008057               component latency= 0.073975
Comp name = nv-onscreendisplay in_system_timestamp = 1666856168016.129883 out_system_timestamp = 1666856168016.144043               component latency= 0.014160
Source id = 0 Frame_num = 44 Frame latency = 2.363037 (ms) 

************BATCH-NUM = 45**************
Comp name = nvv4l2decoder0 in_system_timestamp = 1666856168092.749023 out_system_timestamp = 1666856168096.949951               component latency= 4.200928
Comp name = nvstreammux-stream-muxer source_id = 0 pad_index = 0 frame_num = 45               in_system_timestamp = 1666856168097.033936 out_system_timestamp = 1666856168097.187012               component_latency = 0.153076
Comp name = primary-nvinference-engine in_system_timestamp = 1666856168097.233887 out_system_timestamp = 1666856168104.199951               component latency= 6.966064
Comp name = nvtiler in_system_timestamp = 1666856168104.336914 out_system_timestamp = 1666856168108.649902               component latency= 4.312988
Comp name = nvvideo-converter in_system_timestamp = 1666856168108.876953 out_system_timestamp = 1666856168110.936035               component latency= 2.059082
Comp name = nv-onscreendisplay in_system_timestamp = 1666856168111.058105 out_system_timestamp = 1666856168111.072998               component latency= 0.014893
Source id = 0 Frame_num = 45 Frame latency = 18.369873 (ms) 
  1. what is your RTSP media info? dose the delay occur at the beginning or after a while?
  2. from this short logs, there is no noticeable delay, please provide more logs, especially when you can see noticeable delay.

After modifying the code, there is no video display to show, so the delay cannot be observed.
The latency before the code was modified is very obvious, from the video opened after the card, there is a significant dragging delay.

According to https://forums.developer.nvidia.com/t/deepstream-sdk-faq/80236/11 to modify, After modifying the code, there is no video display to show.
So after modifying fakesink->nveglglessink, a video was shown, and then the following log was printed out.
The video is accompanied by an obvious dragging delay

************BATCH-NUM = 316**************
Comp name = nvv4l2decoder0 in_system_timestamp = 1666863508953.153076 out_system_timestamp = 1666863509019.662109               component latency= 66.509033
Comp name = nvstreammux-stream-muxer source_id = 0 pad_index = 0 frame_num = 316               in_system_timestamp = 1666863509019.737061 out_system_timestamp = 1666863509019.789062               component_latency = 0.052002
Comp name = primary-nvinference-engine in_system_timestamp = 1666863509019.829102 out_system_timestamp = 1666863509020.563965               component latency= 0.734863
Comp name = nvtiler in_system_timestamp = 1666863509324.022949 out_system_timestamp = 1666863509336.000977               component latency= 11.978027
Comp name = nvvideo-converter in_system_timestamp = 1666863509554.471924 out_system_timestamp = 1666863509554.993896               component latency= 0.521973
Comp name = nv-onscreendisplay in_system_timestamp = 1666863509555.146973 out_system_timestamp = 1666863509555.160889               component latency= 0.013916
Source id = 0 Frame_num = 316 Frame latency = 602.048828 (ms) 

************BATCH-NUM = 317**************
Comp name = nvv4l2decoder0 in_system_timestamp = 1666863509019.840088 out_system_timestamp = 1666863509102.961914               component latency= 83.121826
Comp name = nvstreammux-stream-muxer source_id = 0 pad_index = 0 frame_num = 317               in_system_timestamp = 1666863509102.993896 out_system_timestamp = 1666863509103.042969               component_latency = 0.049072
Comp name = primary-nvinference-engine in_system_timestamp = 1666863509103.097900 out_system_timestamp = 1666863509103.907959               component latency= 0.810059
Comp name = nvtiler in_system_timestamp = 1666863509400.905029 out_system_timestamp = 1666863509402.572021               component latency= 1.666992
Comp name = nvvideo-converter in_system_timestamp = 1666863509631.334961 out_system_timestamp = 1666863509632.297119               component latency= 0.962158
Comp name = nv-onscreendisplay in_system_timestamp = 1666863509632.437012 out_system_timestamp = 1666863509632.451904               component latency= 0.014893
Source id = 0 Frame_num = 317 Frame latency = 612.652832 (ms) 

************BATCH-NUM = 318**************
Comp name = nvv4l2decoder0 in_system_timestamp = 1666863509103.253906 out_system_timestamp = 1666863509186.898926               component latency= 83.645020
Comp name = nvstreammux-stream-muxer source_id = 0 pad_index = 0 frame_num = 318               in_system_timestamp = 1666863509186.947998 out_system_timestamp = 1666863509186.993896               component_latency = 0.045898
Comp name = primary-nvinference-engine in_system_timestamp = 1666863509187.055908 out_system_timestamp = 1666863509187.915039               component latency= 0.859131
Comp name = nvtiler in_system_timestamp = 1666863509477.867920 out_system_timestamp = 1666863509486.017090               component latency= 8.149170
Comp name = nvvideo-converter in_system_timestamp = 1666863509708.282959 out_system_timestamp = 1666863509708.433105               component latency= 0.150146
Comp name = nv-onscreendisplay in_system_timestamp = 1666863509708.602051 out_system_timestamp = 1666863509708.617920               component latency= 0.015869
Source id = 0 Frame_num = 318 Frame latency = 605.405029 (ms) 

************BATCH-NUM = 319**************
Comp name = nvv4l2decoder0 in_system_timestamp = 1666863509187.032959 out_system_timestamp = 1666863509253.128906               component latency= 66.095947
Comp name = nvstreammux-stream-muxer source_id = 0 pad_index = 0 frame_num = 319               in_system_timestamp = 1666863509253.176025 out_system_timestamp = 1666863509253.230957               component_latency = 0.054932
Comp name = primary-nvinference-engine in_system_timestamp = 1666863509253.333008 out_system_timestamp = 1666863509254.127930               component latency= 0.794922
Comp name = nvtiler in_system_timestamp = 1666863509555.117920 out_system_timestamp = 1666863509569.340088               component latency= 14.222168
Comp name = nvvideo-converter in_system_timestamp = 1666863509785.250000 out_system_timestamp = 1666863509785.395996               component latency= 0.145996
Comp name = nv-onscreendisplay in_system_timestamp = 1666863509785.550049 out_system_timestamp = 1666863509785.563965               component latency= 0.013916
Source id = 0 Frame_num = 319 Frame latency = 598.572998 (ms) 

************BATCH-NUM = 320**************
Comp name = nvv4l2decoder0 in_system_timestamp = 1666863509253.245117 out_system_timestamp = 1666863509336.481934               component latency= 83.236816
Comp name = nvstreammux-stream-muxer source_id = 0 pad_index = 0 frame_num = 320               in_system_timestamp = 1666863509336.540039 out_system_timestamp = 1666863509336.587891               component_latency = 0.047852
Comp name = primary-nvinference-engine in_system_timestamp = 1666863509336.641113 out_system_timestamp = 1666863509337.422119               component latency= 0.781006
Comp name = nvtiler in_system_timestamp = 1666863509632.371094 out_system_timestamp = 1666863509639.982910               component latency= 7.611816
Comp name = nvvideo-converter in_system_timestamp = 1666863509862.174072 out_system_timestamp = 1666863509862.322998               component latency= 0.148926
Comp name = nv-onscreendisplay in_system_timestamp = 1666863509862.468994 out_system_timestamp = 1666863509862.486084               component latency= 0.017090
Source id = 0 Frame_num = 320 Frame latency = 609.287842 (ms) 

************BATCH-NUM = 321**************
Comp name = nvv4l2decoder0 in_system_timestamp = 1666863509336.576904 out_system_timestamp = 1666863509403.062012               component latency= 66.485107
Comp name = nvstreammux-stream-muxer source_id = 0 pad_index = 0 frame_num = 321               in_system_timestamp = 1666863509403.152100 out_system_timestamp = 1666863509403.196045               component_latency = 0.043945
Comp name = primary-nvinference-engine in_system_timestamp = 1666863509403.233887 out_system_timestamp = 1666863509404.027100               component latency= 0.793213
Comp name = nvtiler in_system_timestamp = 1666863509708.603027 out_system_timestamp = 1666863509719.379883               component latency= 10.776855
Comp name = nvvideo-converter in_system_timestamp = 1666863509939.093994 out_system_timestamp = 1666863509939.614990               component latency= 0.520996
Comp name = nv-onscreendisplay in_system_timestamp = 1666863509939.700928 out_system_timestamp = 1666863509939.715088               component latency= 0.014160
Source id = 0 Frame_num = 321 Frame latency = 603.177002 (ms) 

g_object_set (G_OBJECT (sink), “sync”, FALSE, NULL);
please add this code, it means “how fast the stream is to be rendered”, please find sink in this link: DeepStream Reference Application - deepstream-app — DeepStream 6.1.1 Release documentation

 g_object_set (G_OBJECT(sink), "sync", FALSE, NULL);

Thank you very much, I also added this code before, but after double checking it turned out to be added in the wrong place.
Solved!

Glad to know you fixed it, thanks for the update! 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.