Trying to stream uncompressed video file via udpsink, receiver output is too slow

Tim-Philipp Müller t.i.m at zen.co.uk
Sat Dec 10 11:55:01 UTC 2022


On Fri, 2022-12-09 at 12:47 +0100, Chris Gerdener via gstreamer-devel
wrote:

Hi Chris,

> For a university project, I am trying to use gstreamer to stream
> uncompressed video. But while doing local testing, my receiver is too
> slow, the video output from that is like half-speed or quarter-
> speed  slow motion. Here are my pipelines for send and receive.
> 
> sender:
> 
> gst-launch-1.0 -v  filesrc
> location=/Users/chris/Desktop/folder/test_uncompressed.mov ! qtdemux
> ! queue ! videoconvert ! videorate ! rtpvrawpay ! identity silent=0 !
> udpsink host=127.0.0.1 port=5678 sync=false async=false

- you don't really need the videorate here, but it also doesn't hurt of
course.

- remove the identity element between the payloader and the udpsink, as
it will prevent use of "buffer lists" between the two elements (makes
things less efficient)

- could try rtpvrawpay chunks-per-frame=20 (play with values)

- most importantly, set udpsink sync=true, otherwise you'll flood the
udp send buffer with data faster than realtime (since you're reading
from a file) and data will just get dropped/overwritten before the
kernal had a chance to send it out

- make sure to configure large kernel send/receive buffer sizes with
e.g. sudo sysctl net.core.wmem_max=8388608 net.core.rmem_max=8388608
and then also set udpsink buffer-size=8388608 and udpsrc buffer-
size=8388608


> receiver:
> 
> gst-launch-1.0 udpsrc port=5678 caps = "application/x-rtp,
> media=(string)video, clock-rate=(int)90000, encoding-
> name=(string)RAW, sampling=(string)YCbCr-4:2:2, depth=(string)10,
> width=(string)1920, height=(string)1080, colorimetry=(string)BT709-2,
> payload=(int)96, framerate=(fraction)50/1" ! rtpjitterbuffer ! queue
> ! rtpvrawdepay ! queue ! videoconvert !  queue ! glimagesink  -v

- make sure to configure large kernel send/receive buffer sizes with
e.g. sudo sysctl net.core.wmem_max=8388608 net.core.rmem_max=8388608
and then also set udpsrc buffer-size=8388608

Cheers
 Tim



More information about the gstreamer-devel mailing list