OS X, udpsink, is there a way to reduce messagesize / split UDP messages into smaller ones?

Tim Müller tim at centricular.com
Tue Jun 17 03:39:43 PDT 2014

On Tue, 2014-06-17 at 11:42 +0200, Ralf Stoye wrote:

Hi Ralf,

> for the record:
> osx (10.6, 10.7, 10.8) limits udp message size to 9216 Bytes, so one
> has to use chopmydata max-size=9000 like this:
> /opt/local/bin/gst-launch-1.0 -vvv -m videotestsrc is-live=true  !
> video/x-raw, format=I420, width=1280, height=720, framerate=5/1,
> pixel-aspect-ratio=1/1, interlace-mode=progressive \
> ! queue ! x264enc tune=zerolatency speed-preset=ultrafast
> bitrate=1000 ! queue ! mpegtsmux ! queue ! chopmydata max-size=9000 !
> udpsink host= port=1234

As Peter mentioned, usually people send 1316 bytes (= 7 MPEG-TS packets)
per UDP packet, that way you stay below the MTU and your UDP packets
don't get fragmented. If a small part of a fragmented UDP packet is
dropped somewhere, the whole UDP packet will be discarded. If you keep
the size below the fragmentation threshold any packet loss is limited to
just that one small packet.


Tim Müller, Centricular Ltd - http://www.centricular.com

More information about the gstreamer-devel mailing list