h264 decoder delay about 2-4s when using gstreamer

I connect a haikang Ip camera with tx2, and using commond
“gst-launch-1.0 rtspsrc location=“rtsp://admin:admin123@10.5.2.62:554” ! rtph264depay ! h264parse ! omxh264dec ! nveglglessink -e”
and I am sure what the video i can see in screen from ipcamera is delay about 2-4S, so it is bad for me
if anyone else has such problem? can anyone help me to solve this problem

The delay may come from rtspsrc rather than h264dec. The default latency is 2 s, but you may try to set it to 100ms:

gst-launch-1.0 rtspsrc location="rtsp://admin:admin123@10.5.2.62:554" <b>latency=100</b> ! rtph264depay ! h264parse ! omxh264dec ! nveglglessink -e

Thank HoneyP’s quick suggestion.
Please also refer to
[url]https://devtalk.nvidia.com/default/topic/1043770/jetson-tx2/problems-minimizing-latency-and-maximizing-quality-for-rtsp-and-mpeg-ts-/post/5295828/#5295828[/url]