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

Chris Gerdener chris.gerdener at googlemail.com
Wed Dec 14 15:32:16 UTC 2022


So I got rid of the identity element in the sender, set the udpsink to sync
and increased the send and receive kernel buffers, but that only helps for
about 25 to 30 seconds. For those first seconds the playback is the correct
speed at 50 frames, after which it seems to slow down to half speed again.
I also observed that the framerate for the video after depayload is set to
0/1, which means it is not constant. Could there be a connection to the
slowdown?

Am Sa., 10. Dez. 2022 um 12:55 Uhr schrieb Tim-Philipp Müller via
gstreamer-devel <gstreamer-devel at lists.freedesktop.org>:

> 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
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.freedesktop.org/archives/gstreamer-devel/attachments/20221214/d38f87a1/attachment.htm>


More information about the gstreamer-devel mailing list