This is usually not related to OSD, but is usually caused by RTSP camera. You also need to check the timing of nvinfer and the GPU load.
You can use local file to measure latency. Refer to this FAQ
The latency of rtsp camera is usually 1-2s. Lower latency requires smaller I frame intervals and UDP transmission, which requires high network quality, otherwise it will cause packet loss, screen distortion and other problems.
In addition, if you only use gst-play-1.0
to play the rtsp stream, what is the latency?
Try setting the value of the live-source property of nvstreammux to true.
We have discussed too many topics in this topic. Please open a new topic for other questions.