Wild delay streaming

Ive got a simple pipeline that accumulates 5 min !!! of delay in 15 min.
This is on a 10core i7

pipeline = gst_parse_launch ("v4l2src name=source ! "
"video/x-h264,width=1920,height=1080,framerate=30/1 ! "
"h264parse ! "
"avdec_h264 ! "
"tee name=t ! "
"queue ! xvimagesink name=sink sync=false "
“t. ! queue ! jpegenc ! tcpserversink host= name=ipsink”, NULL);

gst-launch-1.0 -v tcpclientsrc host= port=5001 !
jpegdec !

If anyone can show the error of my ways, please do


Does using xvimagesink sync=false on the receiver make any difference ?

How about gst-launch-1.0 -v tcpclientsrc host= port=5001 do-timestamp=true ! jpegparse ! jpegdec ! videoconvert ! xvimagesink ?

That makes a big difference - thanks. We are down to 1 min in 5.
I’ll true the do-timestamp

I tried do-timestamp=true which causes the picture to show only the very first ‘line’ or so. ie 1st 5% of image, rest of page blank.

I want to stream to localhost. is there a better way?

ie user2 can watch what user1 is capturing (but user1 may be looking at another desktop) (user2 is using nomachine to view his desktop)

Not sure, it might just be a typo when posting, but tcpserversink default port might be 4953 if you don’t specify 5001 otherwise.

Thanks. In that version of C code the port is set by argv and name ipsink.
by putting a queue leaky=downstream on the client the time sync issue is gone replaced with a slightly annoying flash of image every few seconds,
(I assume this is syncing)
I now pass the complete pipeline as an argv - using execl, not system because of the hastles of formatting the pipeline ("s etc)


What version of GStreamer are you using? (e.g. gst-inspect-1.0 jpegparse | grep version)

That sounds like a bug in the jpeg parser perhaps.

Something else you could try is: jpegenc ! matroskamux ! tcpserversink on the sender side, and then tcpclientsrc ! matroskademux ! jpegdec (or avdec_mjpeg) on the client side. (This is also more flexible in case you want to try other codecs later.)

dvr@wind:~$ gst-inspect-1.0 --version
gst-inspect-1.0 version 1.24.2
GStreamer 1.24.2

I’ll try matroskamux, but the whole reason for the jpeg bit was to get 1080. As raw video I could get 768x5… only and Nicolas suggested.

Not sure, but if previous advice is not enough, you may try specifying I420 format after h264 decoder and see if it helps.
You might also try adding identity sync=1 after jpegparse if any.