UDP to RTP delay

Hi, I’m prety new to this, so I’m hoping someone can give me a few pointers.
I’m getting a UDP stream from an Ip camera and want to see it with vlc. I found out I can do it by redirecting it, in this case to localhost just for testing.

.\gst-launch-1.0.exe -v udpsrc port=5004 ! jpegparse ! rtpjpegpay ! rtpjitterbuffer latency=10 ! queue max-size-buffers=10 max-size-bytes=0 ! udpsink host=127.0.0.1 port=5000

From here, I can open it with a .sdp file, but this of course introduces a delay. So I’d love to know how to lower it or if you’d face this problem differently.
Thanks in advance

I’d suggest that you use the following pipeline for RTP/JPG packetizing :

gst-launch-1.0 udpsrc address=127.0.0.1 port=5004 ! queue ! jpegparse ! rtpjpegpay ! udpsink host=127.0.0.1 port=5000 auto-multicast=0

and receive with:

gst-launch-1.0 udpsrc address=127.0.0.1 port=5000 ! application/x-rtp,encoding-name=JPG ! rtpjitterbuffer latency=0 ! rtpjpegdepay ! decodebin ! autovideoconvert ! autovideosink

VLC may add its own latency, you may lower it by setting some VLC parameters in receiver, but I personnaly didn’t acheived low latency as gstreamer from VLC, I couldn’t further advise for VLC case.

Thanks a lot! I worked a bit on it and also realized it was probably not the best solution, as I had a delay of up to 5s, which is too much even from a newbie’s standard like me