Latency with tcpclientsink/tcpserversrc

Stefan Persson johli392 at student.liu.se
Thu Jun 20 18:28:02 UTC 2019


Hi!

I have video streaming from a server to a smaller client, sending graphics
via H.264 over wifi.
I'm testing two pipelines on both devices, one for TCP and one for UDP. Both
are included at the bottom of this mail.
UDP streaming works quite well. There's a delay before the stream is
displayed but not that severe.
The problem is TCP. There's often a noticeable delay, sometimes up to 400
milliseconds, when using this.
There's no difference between the pipelines besides one having
udpsink/udpsrc and one having tcpclientsink/tcpserversrc.

What can I add to decrease the latency? Any parameter to tcpclientsink? A
leaky queue somewhere? 
An unstable frame rate and dropped frames are acceptable; it's the latency I
want gone.

Best Regards
Stefan


UDP: 

----------------------------------------------
Server:

appsrc is-live=true !
video/x-raw, format=RGB, framerate=30/1, width=640, height=480 !
videoconvert !
x264enc speed-preset=ultrafast tune=zerolatency bitrate=1000 !
rtph264pay !
udpsink host=192.168.1.15 port=12345 !

Client:

udpsrc port=0 ! 
application/x-rtp, payload=96 ! 
rtph264depay ! 
h264parse disable-passthrough=true ! 
avdec_h264 output-corrupt=false ! 
videoconvert ! 
queue !
autovideosink


TCP:

----------------------------------------------
Server:

appsrc is-live=true !
video/x-raw, format=RGB, framerate=30/1, width=640, height=480 !
videoconvert !
x264enc speed-preset=ultrafast tune=zerolatency bitrate=1000  !
mpegtsmux !
tcpclientsink host=192.168.1.15 port=12345 !

Devicer:

tcpserversrc port=12345 host=192.168.1.15 ! 
tsdemux ! 
h264parse disable-passthrough=true ! 
avdec_h264 output-corrupt=false ! 
videoconvert ! 
queue !
autovideosink

-------------------------------------------





--
Sent from: http://gstreamer-devel.966125.n4.nabble.com/


More information about the gstreamer-devel mailing list