An understanding of the delay result produced by latency_measurement_buf_probe

Please provide complete information as applicable to your setup.

**• Hardware Platform (Jetson / GPU) Jetson
**• DeepStream Version 6.2
**• JetPack Version (valid for Jetson only) 5.0.2
**• TensorRT Version 8.4.1.5
**• CUDA 11.4.239
**• cuDNN 8.4.1.50
**• Issue Type( questions, new requirements, bugs) questions
**• How to reproduce the issue ?
Pull the camera RTSP stream in the pipeline of Deepstream test3 app (the camera is directly connected to the stream,12 channels of camera data), take the src pad in NVOSD, and add the latency probe to get the latency of each plug-in.
1.The results of the two latency tests differ considerably
first:
nvds_enable_latency_measurement is : 1

BATCH-NUM = 1750**
Comp name = nvv4l2decoder9 in_system_timestamp = 1733387226147.978027 out_system_timestamp = 1733387226149.187988 component latency= 1.209961
Comp name = nvstreammux-stream-muxer source_id = 3 pad_index = 3 frame_num = 1628 in_system_timestamp = 1733387226149.749023 out_system_timestamp = 1733387226158.260010 component_latency = 8.510986
Comp name = nvv4l2decoder10 in_system_timestamp = 1733387226148.643066 out_system_timestamp = 1733387226151.990967 component latency= 3.347900
Comp name = nvstreammux-stream-muxer source_id = 11 pad_index = 11 frame_num = 1590 in_system_timestamp = 1733387226152.617920 out_system_timestamp = 1733387226158.260986 component_latency = 5.643066
Comp name = nvv4l2decoder4 in_system_timestamp = 1733387226148.212891 out_system_timestamp = 1733387226152.275879 component latency= 4.062988
Comp name = nvstreammux-stream-muxer source_id = 0 pad_index = 0 frame_num = 1595 in_system_timestamp = 1733387226152.922119 out_system_timestamp = 1733387226158.260986 component_latency = 5.338867
Comp name = nvv4l2decoder11 in_system_timestamp = 1733387226148.572021 out_system_timestamp = 1733387226154.311035 component latency= 5.739014
Comp name = nvstreammux-stream-muxer source_id = 7 pad_index = 7 frame_num = 1103 in_system_timestamp = 1733387226154.790039 out_system_timestamp = 1733387226158.260986 component_latency = 3.470947
Comp name = nvv4l2decoder5 in_system_timestamp = 1733387226148.897949 out_system_timestamp = 1733387226155.172119 component latency= 6.274170
Comp name = nvstreammux-stream-muxer source_id = 5 pad_index = 5 frame_num = 1272 in_system_timestamp = 1733387226155.790039 out_system_timestamp = 1733387226158.260986 component_latency = 2.470947
Comp name = nvv4l2decoder6 in_system_timestamp = 1733387226148.169922 out_system_timestamp = 1733387226155.443115 component latency= 7.273193
Comp name = nvstreammux-stream-muxer source_id = 1 pad_index = 1 frame_num = 1145 in_system_timestamp = 1733387226156.075928 out_system_timestamp = 1733387226158.260986 component_latency = 2.185059
Comp name = nvv4l2decoder7 in_system_timestamp = 1733387226148.540039 out_system_timestamp = 1733387226155.376953 component latency= 6.836914
Comp name = nvstreammux-stream-muxer source_id = 6 pad_index = 6 frame_num = 1350 in_system_timestamp = 1733387226156.080078 out_system_timestamp = 1733387226158.260986 component_latency = 2.180908
Comp name = nvv4l2decoder2 in_system_timestamp = 1733387226149.070068 out_system_timestamp = 1733387226156.002930 component latency= 6.932861
Comp name = nvstreammux-stream-muxer source_id = 2 pad_index = 2 frame_num = 1587 in_system_timestamp = 1733387226156.531006 out_system_timestamp = 1733387226158.260986 component_latency = 1.729980
Comp name = nvv4l2decoder0 in_system_timestamp = 1733387226149.710938 out_system_timestamp = 1733387226156.559082 component latency= 6.848145
Comp name = nvstreammux-stream-muxer source_id = 9 pad_index = 9 frame_num = 1604 in_system_timestamp = 1733387226157.056885 out_system_timestamp = 1733387226158.260986 component_latency = 1.204102
Comp name = nvv4l2decoder1 in_system_timestamp = 1733387226148.687012 out_system_timestamp = 1733387226157.237061 component latency= 8.550049
Comp name = nvstreammux-stream-muxer source_id = 4 pad_index = 4 frame_num = 1181 in_system_timestamp = 1733387226157.840088 out_system_timestamp = 1733387226158.260986 component_latency = 0.420898
Comp name = nvv4l2decoder8 in_system_timestamp = 1733387226148.788086 out_system_timestamp = 1733387226157.368896 component latency= 8.580811
Comp name = nvstreammux-stream-muxer source_id = 8 pad_index = 8 frame_num = 1521 in_system_timestamp = 1733387226157.948975 out_system_timestamp = 1733387226158.260986 component_latency = 0.312012
Comp name = nvv4l2decoder3 in_system_timestamp = 1733387226150.058105 out_system_timestamp = 1733387226157.634033 component latency= 7.575928
Comp name = nvstreammux-stream-muxer source_id = 10 pad_index = 10 frame_num = 1606 in_system_timestamp = 1733387226158.221924 out_system_timestamp = 1733387226158.260986 component_latency = 0.039062
Comp name = primary-nvinference-engine in_system_timestamp = 1733387226175.099121 out_system_timestamp = 1733387226230.535889 component latency= 55.436768
Comp name = nvtiler in_system_timestamp = 1733387226230.677979 out_system_timestamp = 1733387226256.920898 component latency= 26.242920
Comp name = nvvideo-converter in_system_timestamp = 1733387226257.608887 out_system_timestamp = 1733387226259.896973 component latency= 2.288086
Comp name = nv-onscreendisplay in_system_timestamp = 1733387226260.055908 out_system_timestamp = 1733387226260.777100 component latency= 0.721191
Source id = 3 Frame_num = 1628 Frame latency = 112.908936 (ms)
Source id = 11 Frame_num = 1590 Frame latency = 112.243896 (ms)
Source id = 0 Frame_num = 1595 Frame latency = 112.674072 (ms)
Source id = 7 Frame_num = 1103 Frame latency = 112.314941 (ms)
Source id = 5 Frame_num = 1272 Frame latency = 111.989014 (ms)
Source id = 1 Frame_num = 1145 Frame latency = 112.717041 (ms)
Source id = 6 Frame_num = 1350 Frame latency = 112.346924 (ms)
Source id = 2 Frame_num = 1587 Frame latency = 111.816895 (ms)
Source id = 9 Frame_num = 1604 Frame latency = 111.176025 (ms)
Source id = 4 Frame_num = 1181 Frame latency = 112.199951 (ms)
Source id = 8 Frame_num = 1521 Frame latency = 112.098877 (ms)
Source id = 10 Frame_num = 1606 Frame latency = 110.828857 (ms)

second:
nvds_enable_latency_measurement is : 1

BATCH-NUM = 208**
Comp name = nvv4l2decoder10 in_system_timestamp = 1733480950090.382080 out_system_timestamp = 1733480950169.643066 component latency= 79.260986
Comp name = nvstreammux-stream-muxer source_id = 9 pad_index = 9 frame_num = 196 in_system_timestamp = 1733480950169.690918 out_system_timestamp = 1733480950246.047119 component_latency = 76.356201
Comp name = nvv4l2decoder6 in_system_timestamp = 1733480950155.756104 out_system_timestamp = 1733480950241.724121 component latency= 85.968018
Comp name = nvstreammux-stream-muxer source_id = 10 pad_index = 10 frame_num = 195 in_system_timestamp = 1733480950241.789062 out_system_timestamp = 1733480950246.047119 component_latency = 4.258057
Comp name = nvv4l2decoder11 in_system_timestamp = 1733480950142.701904 out_system_timestamp = 1733480950226.208984 component latency= 83.507080
Comp name = nvstreammux-stream-muxer source_id = 11 pad_index = 11 frame_num = 197 in_system_timestamp = 1733480950226.253906 out_system_timestamp = 1733480950246.047119 component_latency = 19.793213
Comp name = nvv4l2decoder8 in_system_timestamp = 1733480950122.854004 out_system_timestamp = 1733480950204.812012 component latency= 81.958008
Comp name = nvstreammux-stream-muxer source_id = 0 pad_index = 0 frame_num = 197 in_system_timestamp = 1733480950204.854980 out_system_timestamp = 1733480950246.047119 component_latency = 41.192139
Comp name = nvv4l2decoder3 in_system_timestamp = 1733480950102.836914 out_system_timestamp = 1733480950183.604004 component latency= 80.767090
Comp name = nvstreammux-stream-muxer source_id = 1 pad_index = 1 frame_num = 198 in_system_timestamp = 1733480950183.648926 out_system_timestamp = 1733480950246.048096 component_latency = 62.399170
Comp name = nvv4l2decoder4 in_system_timestamp = 1733480950109.802979 out_system_timestamp = 1733480950190.685059 component latency= 80.882080
Comp name = nvstreammux-stream-muxer source_id = 2 pad_index = 2 frame_num = 198 in_system_timestamp = 1733480950190.738037 out_system_timestamp = 1733480950246.048096 component_latency = 55.310059
Comp name = nvv4l2decoder7 in_system_timestamp = 1733480950115.645996 out_system_timestamp = 1733480950197.545898 component latency= 81.899902
Comp name = nvstreammux-stream-muxer source_id = 3 pad_index = 3 frame_num = 196 in_system_timestamp = 1733480950197.583008 out_system_timestamp = 1733480950246.048096 component_latency = 48.465088
Comp name = nvv4l2decoder2 in_system_timestamp = 1733480950064.618896 out_system_timestamp = 1733480950148.547119 component latency= 83.928223
Comp name = nvstreammux-stream-muxer source_id = 4 pad_index = 4 frame_num = 199 in_system_timestamp = 1733480950148.587891 out_system_timestamp = 1733480950246.048096 component_latency = 97.460205
Comp name = nvv4l2decoder1 in_system_timestamp = 1733480950083.827881 out_system_timestamp = 1733480950162.555908 component latency= 78.728027
Comp name = nvstreammux-stream-muxer source_id = 5 pad_index = 5 frame_num = 196 in_system_timestamp = 1733480950162.612061 out_system_timestamp = 1733480950246.048096 component_latency = 83.436035
Comp name = nvv4l2decoder9 in_system_timestamp = 1733480950135.039062 out_system_timestamp = 1733480950218.758057 component latency= 83.718994
Comp name = nvstreammux-stream-muxer source_id = 6 pad_index = 6 frame_num = 195 in_system_timestamp = 1733480950218.804932 out_system_timestamp = 1733480950246.048096 component_latency = 27.243164
Comp name = nvv4l2decoder5 in_system_timestamp = 1733480950098.093018 out_system_timestamp = 1733480950176.747070 component latency= 78.654053
Comp name = nvstreammux-stream-muxer source_id = 7 pad_index = 7 frame_num = 197 in_system_timestamp = 1733480950176.797119 out_system_timestamp = 1733480950246.048096 component_latency = 69.250977
Comp name = nvv4l2decoder0 in_system_timestamp = 1733480950129.199951 out_system_timestamp = 1733480950211.665039 component latency= 82.465088
Comp name = nvstreammux-stream-muxer source_id = 8 pad_index = 8 frame_num = 197 in_system_timestamp = 1733480950211.696045 out_system_timestamp = 1733480950246.048096 component_latency = 34.352051
Comp name = primary-nvinference-engine in_system_timestamp = 1733480950246.125000 out_system_timestamp = 1733480950275.512939 component latency= 29.387939
Comp name = nvtiler in_system_timestamp = 1733480950487.031006 out_system_timestamp = 1733480950511.468994 component latency= 24.437988
Comp name = nvvideo-converter in_system_timestamp = 1733480950752.245117 out_system_timestamp = 1733480950753.571045 component latency= 1.325928
Comp name = nv-onscreendisplay in_system_timestamp = 1733480950753.694092 out_system_timestamp = 1733480950753.708984 component latency= 0.014893
Source id = 9 Frame_num = 196 Frame latency = 663.382812 (ms)
Source id = 10 Frame_num = 195 Frame latency = 598.008789 (ms)
Source id = 11 Frame_num = 197 Frame latency = 611.062988 (ms)
Source id = 0 Frame_num = 197 Frame latency = 630.910889 (ms)
Source id = 1 Frame_num = 198 Frame latency = 650.927979 (ms)
Source id = 2 Frame_num = 198 Frame latency = 643.961914 (ms)
Source id = 3 Frame_num = 196 Frame latency = 638.118896 (ms)
Source id = 4 Frame_num = 199 Frame latency = 689.145996 (ms)
Source id = 5 Frame_num = 196 Frame latency = 669.937012 (ms)
Source id = 6 Frame_num = 195 Frame latency = 618.725830 (ms)
Source id = 7 Frame_num = 197 Frame latency = 655.671875 (ms)
Source id = 8 Frame_num = 197 Frame latency = 624.564941 (ms)

2.When we use

GST_TRACERS=“latency(flags=pipeline)” GST_DEBUG=GST_TRACER:7 ./deepstream-test3-app ./dstest3_config.yml

to measure the latency of the entire pipeline, Get the log below:

0:04:19.756296277 962157 0xaaaaf40b0b60 TRACE GST_TRACER :0:: latency, src-element-id=(string)0xfffe9800d0f0, src-element=(string)udpsrc6, src=(string)src, sink-element-id=(string)0xaaaaf4bd03c0, sink-element=(string)nv3d-sink, sink=(string)sink, time=(guint64)287784804, ts=(guint64)259756260437;

the “time=(guint64)287784804” is 287.784804(ms)?

above
Thanks

3.Taking test3 as an example, what plug-in time does this latency include?
Source id = 9 Frame_num = 196 Frame latency = 663.382812 (ms)
Source id = 10 Frame_num = 195 Frame latency = 598.008789 (ms)
Source id = 11 Frame_num = 197 Frame latency = 611.062988 (ms)
Source id = 0 Frame_num = 197 Frame latency = 630.910889 (ms)
Source id = 1 Frame_num = 198 Frame latency = 650.927979 (ms)
Source id = 2 Frame_num = 198 Frame latency = 643.961914 (ms)
Source id = 3 Frame_num = 196 Frame latency = 638.118896 (ms)
Source id = 4 Frame_num = 199 Frame latency = 689.145996 (ms)
Source id = 5 Frame_num = 196 Frame latency = 669.937012 (ms)
Source id = 6 Frame_num = 195 Frame latency = 618.725830 (ms)
Source id = 7 Frame_num = 197 Frame latency = 655.671875 (ms)
Source id = 8 Frame_num = 197 Frame latency = 624.564941 (ms)

I think that this latency is the time difference between video data entering the pipeline and leaving the pipeline.

Have you compared the latency of the local video files and fakesink?

Yes. The unit is ns. So it is 287.784804(ms)

The latency is calculated in nvv4l2decoder, nvinfer, nvstreammux, nvvideoconvert, nvdsosd.

1.The latency of a local file is the same as that of RTSP streaming.

2.The fakesink is constructed below:

sink = gst_element_factory_make(“fakesin”, NULL)

The resulting logs are as follows:

nvds_enable_latency_measurement is : 1
==========================================

BATCH-NUM = 2851**
Comp name = nvv4l2decoder7 in_system_timestamp = 1733740556235.198975 out_system_timestamp = 1733740556268.524902 component latency= 33.325928
Comp name = nvstreammux-stream-muxer source_id = 6 pad_index = 6 frame_num = 425 in_system_timestamp = 1733740556268.579102 out_system_timestamp = 1733740556272.816895 component_latency = 4.237793
Comp name = nvv4l2decoder10 in_system_timestamp = 1733740556242.208008 out_system_timestamp = 1733740556270.688965 component latency= 28.480957
Comp name = nvstreammux-stream-muxer source_id = 8 pad_index = 8 frame_num = 419 in_system_timestamp = 1733740556270.736084 out_system_timestamp = 1733740556272.816895 component_latency = 2.080811
Comp name = primary-nvinference-engine in_system_timestamp = 1733740556272.887939 out_system_timestamp = 1733740556286.547119 component latency= 13.659180
Comp name = nvtiler in_system_timestamp = 1733740556286.575928 out_system_timestamp = 1733740556290.059082 component latency= 3.483154
Comp name = nvvideo-converter in_system_timestamp = 1733740556290.347900 out_system_timestamp = 1733740556290.954102 component latency= 0.606201
Comp name = nv-onscreendisplay in_system_timestamp = 1733740556291.019043 out_system_timestamp = 1733740556291.032959 component latency= 0.013916
*Source id = 6 Frame_num = 425 Frame latency = 55.906006 (ms) *
*Source id = 8 Frame_num = 419 Frame latency = 48.896973 (ms) *
nvds_enable_latency_measurement is : 1
==========================================

BATCH-NUM = 2852**
Comp name = nvv4l2decoder0 in_system_timestamp = 1733740556246.794922 out_system_timestamp = 1733740556273.381104 component latency= 26.586182
Comp name = nvstreammux-stream-muxer source_id = 2 pad_index = 2 frame_num = 460 in_system_timestamp = 1733740556273.414062 out_system_timestamp = 1733740556277.525879 component_latency = 4.111816
Comp name = nvv4l2decoder4 in_system_timestamp = 1733740556252.571045 out_system_timestamp = 1733740556275.274902 component latency= 22.703857
Comp name = nvstreammux-stream-muxer source_id = 4 pad_index = 4 frame_num = 419 in_system_timestamp = 1733740556275.324951 out_system_timestamp = 1733740556277.525879 component_latency = 2.200928
Comp name = primary-nvinference-engine in_system_timestamp = 1733740556277.585938 out_system_timestamp = 1733740556287.617920 component latency= 10.031982
Comp name = nvtiler in_system_timestamp = 1733740556290.308105 out_system_timestamp = 1733740556293.822998 component latency= 3.514893
Comp name = nvvideo-converter in_system_timestamp = 1733740556294.687988 out_system_timestamp = 1733740556296.706055 component latency= 2.018066
Comp name = nv-onscreendisplay in_system_timestamp = 1733740556296.799072 out_system_timestamp = 1733740556296.810059 component latency= 0.010986
*Source id = 2 Frame_num = 460 Frame latency = 50.072021 (ms) *
*Source id = 4 Frame_num = 419 Frame latency = 44.295898 (ms) *
nvds_enable_latency_measurement is : 1
==========================================

BATCH-NUM = 2853**
Comp name = nvv4l2decoder3 in_system_timestamp = 1733740556254.900879 out_system_timestamp = 1733740556280.405029 component latency= 25.504150
Comp name = nvstreammux-stream-muxer source_id = 5 pad_index = 5 frame_num = 421 in_system_timestamp = 1733740556280.458008 out_system_timestamp = 1733740556282.108887 component_latency = 1.650879
Comp name = nvv4l2decoder8 in_system_timestamp = 1733740556244.547119 out_system_timestamp = 1733740556277.981934 component latency= 33.434814
Comp name = nvstreammux-stream-muxer source_id = 9 pad_index = 9 frame_num = 412 in_system_timestamp = 1733740556278.027100 out_system_timestamp = 1733740556282.108887 component_latency = 4.081787
Comp name = primary-nvinference-engine in_system_timestamp = 1733740556282.158936 out_system_timestamp = 1733740556290.014893 component latency= 7.855957
Comp name = nvtiler in_system_timestamp = 1733740556294.052002 out_system_timestamp = 1733740556297.881104 component latency= 3.829102
Comp name = nvvideo-converter in_system_timestamp = 1733740556298.114990 out_system_timestamp = 1733740556299.096924 component latency= 0.981934
Comp name = nv-onscreendisplay in_system_timestamp = 1733740556299.144043 out_system_timestamp = 1733740556299.154053 component latency= 0.010010
Source id = 5 Frame_num = 421 Frame latency = 44.291016 (ms)
Source id = 9 Frame_num = 412 Frame latency = 54.644775 (ms)

Question:Why is the number of frames included in each BATCH-NUM different?

2.When we use

> GST_TRACERS=“latency(flags=pipeline)” GST_DEBUG=GST_TRACER:7 ./deepstream-test3-app ./dstest3_config.yml

to measure the latency of the entire pipeline, Get the log below:

0:04:19.756296277 962157 0xaaaaf40b0b60 TRACE GST_TRACER :0:: latency, src-element-id=(string)0xfffe9800d0f0, src-element=(string)udpsrc6, src=(string)src, sink-element-id=(string)0xaaaaf4bd03c0, sink-element=(string)nv3d-sink, sink=(string)sink, time=(guint64)287784804, ts=(guint64)259756260437;

the “time=(guint64)287784804” is 287.784804(ms).

Is 287 the time difference between data entering the pipeline and data leaving the pipeline? Because we want to measure the time from the start of the multi-camera RTSP stream data into the pipeline to the end of NVV4L2Decoder decoding. Please also give suggestions for multi-camera latency tests that pull RTSP streams and decode them.

thanks

When you test with live sources, the DeepStream pipeline works as the video trasferring client. The sources servers do not guarantee when will the frame reach to the client. The Gst-nvstreammux — DeepStream documentation has introduced how the nvstreammux collects frames from different sources to form the batch. The nvstreammux tries to collect one frame from each stream to form the batch before the timeout while try to align the frames from different streams according to their timestamps. So the batch may not be full if some frames can’t reach before timeout or some frames reach too late to be aligned to the other frames from other streams.

Please refer to the explanation in Latency

From your description, seems you want to measure the RTSP transfering and video decoder latency together?
The video payload is just a part of the RTSP stream. There are also a lot of control and communication data in the stream. How do you define “the start of the multi-camera RTSP stream data”?
If you want to measure the video frame latency, it is not convenient to measure it before video decoder. The video data in the video stream are compressed video data and the compressed data are transferred over the ethernet in packets. The RTSP client receives the packets in random order, the rtsp protocol latency is a part of the video transferring latency. The rtspsrc plugin does not output video data frame by frame but in NAL units. One NAL unit may not be one video frame, it may be a sps header, a null NAL unit or a video slice. So it is hard to figure out when the first complete compressed video frame reach to the rtspsrc.

Dear Foina.Chen
Thanks for you reply. regarding the Nvinfer latency in “FakeSink”. can I understand that Nvinfer infers how many frames are grouped in a batch at the moment in Nvstreammux, and the latency of Nvinfer is the latency of processing this batch.

nvds_enable_latency_measurement is : 1
==========================================

BATCH-NUM = 2852**
Comp name = nvv4l2decoder0 in_system_timestamp = 1733740556246.794922 out_system_timestamp = 1733740556273.381104 component latency= 26.586182
Comp name = nvstreammux-stream-muxer source_id = 2 pad_index = 2 frame_num = 460 in_system_timestamp = 1733740556273.414062 out_system_timestamp = 1733740556277.525879 component_latency = 4.111816
Comp name = nvv4l2decoder4 in_system_timestamp = 1733740556252.571045 out_system_timestamp = 1733740556275.274902 component latency= 22.703857
Comp name = nvstreammux-stream-muxer source_id = 4 pad_index = 4 frame_num = 419 in_system_timestamp = 1733740556275.324951 out_system_timestamp = 1733740556277.525879 component_latency = 2.200928
Comp name = primary-nvinference-engine in_system_timestamp = 1733740556277.585938 out_system_timestamp = 1733740556287.617920 component latency= 10.031982
Comp name = nvtiler in_system_timestamp = 1733740556290.308105 out_system_timestamp = 1733740556293.822998 component latency= 3.514893
Comp name = nvvideo-converter in_system_timestamp = 1733740556294.687988 out_system_timestamp = 1733740556296.706055 component latency= 2.018066
Comp name = nv-onscreendisplay in_system_timestamp = 1733740556296.799072 out_system_timestamp = 1733740556296.810059 component latency= 0.010986
*Source id = 2 Frame_num = 460 Frame latency = 50.072021 (ms) *
*Source id = 4 Frame_num = 419 Frame latency = 44.295898 (ms) *
nvds_enable_latency_measurement is : 1
==========================================

BATCH-NUM = 2853**

for example, in the BATCH-NUM = 2852, is the Nvinfer latency of 10.031982ms the latency of processing two frames?

Comp name = primary-nvinference-engine in_system_timestamp = 1733740556277.585938 out_system_timestamp = 1733740556287.617920 component latency= 10.031982

For “fakesink”. If we want to measure nvv4l2decoder latency/nvinfer latency/nvtracker latency of multi-cameras, how should we measure it?

It is the batch in and out latency.

The video data before nvstreammux is frames in separated streams. After nvstreammux the video data are combined into batches.

This is the video decoder latency of the frame 460 of stream 2

This is the decoder latency for the frame 419 of stream 4

This is the batch inferencing latency for batch 2852

There is no nvtracker in deepstream-test3 sample. You can see the corresponding log with the pipeline has nvtracker.

hi Fiona.Chen:
I read your reply above carefully, it is very helpful, and now we want to see the output frame rate of each camera after pipeline processing, similar to the following:
**PERF : FPS_0 (14.99) FPS_1 (14.99) FPS_2 (14.99) FPS_3 (14.96) FPS_4 (14.99) FPS_5 (14.99) FPS_6 (14.99) FPS_7 (14.99) FPS_8 (14.99) FPS_9 (14.99) FPS_10 (14.99) FPS_11 (14.99)
Question: How is this FPS_x printed in the pipeline? How to print this information if a new pipeline is created?

Please refer to DeepStream SDK FAQ - Intelligent Video Analytics / DeepStream SDK - NVIDIA Developer Forums

If the pipeline consists only of nvurisrcbin, nvstreammux, and fakesink, and the timeout setting in nvstreammux is 0.04(ms), can I understand that the data flow of the entire pipeline is basically unblocked?

thanks Fiona.Chen

What do you mean by “unblocked”?

 the pipeline consists only of nvurisrcbin, nvstreammux, and nv3dsink -->data block?
 the pipeline consists only of nvurisrcbin, nvstreammux, and fakesink-->data ubblock?

Taking the above pipeline as an example, I found that if the pipeline is last with nv3dsink, the latency of decode and mux will be longer, and if the pipeline is fakesink at the end, the latency of decode and mux will be very short, so I think the use of nv3dsink at the end of the pipeline will lead to data blocking in the pipeline, do I understand it this way?

nv3dsink will not block the pipeline if you set “sync=0” and “async=0” properties with it. The same case to fakesink.

Thanks to FIONA.CHEN, I understand this problem。
we are now encountering a new problem, is there a way to measure the latency of source, decodebin, rtph264depay, h264parse, capsfilter in nvurisrcbin?(The minimum unit of measurement data is the delay that passes through them)

They are all GStreamer plugins. You may refer to Tracing.