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@” ! 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@" <b>latency=100</b> ! rtph264depay ! h264parse ! omxh264dec ! nveglglessink -e

Thank HoneyP’s quick suggestion.
Please also refer to