Lagging video on Jetson nano

Hello everyone,
I have a Jetson Nano which like to count people passing a line.
I’m using DeepStream 5.0, RTSP video stream on High Definition (2MP).
My problem is that the video is lagging on this resolution and if I reduce the resolution, the video works fine but the counting doesn’t work…

Please advise,

Please try to set sync=0 in nvoverlaysink or nveglglessink and try again. May refer to:
[Nano] Deepstream-test3-app not working as expected for multiple video source - #4 by DaneLLL

And please execute sudo nvpmodel -m 0 and sudo jetson_clocks, to have max performance throughput on Jetson Nano.