Skip to content


jeanlf edited this page Dec 6, 2019 · 10 revisions

HOME » Filters » UDP/TCP output

UDP/TCP output

Register name used to load filter: sockout

This filter handles generic output sockets (mono-directionnal) in blocking mode only.
The filter can work in server mode, waiting for source connections, or or in client mode, directly connecting.
In server mode, the filter can be instructed to keep running at the end of the stream.
In server mode, the default behaviour is to keep input packets when no more clients are connected; this can be adjusted though the kp option, however there is no realtime regulation of how fast packets are droped.
If your sources are not real time, consider adding a real-time scheduler in the chain (cf reframer filter), or set the send rate option.

  • UDP sockets are used for destinations URLs formatted as udp://NAME
  • TCP sockets are used for destinations URLs formatted as tcp://NAME
  • UDP unix domain sockets are used for destinations URLs formatted as udpu://NAME
  • TCP unix domain sockets are used for destinations URLs formatted as tcpu://NAME

The socket output can be configured to drop or revert packet order for test purposes.
For both mode, a window size in packets is specified as the drop/revert fraction denominator, and the index of the packet to drop/revert is given as the numerator/
If the numerator is 0, a packet is randomly chosen in that window.


This drops every 4th packet of each 10 packet window.


This reverts the send order of one random packet in each 100 packet window.


dst (string): location of destination file
sockbuf (unsigned int, default: 65536): block size used to read file
port (unsigned int, default: 1234): default port if not specified
ifce (string): default multicast interface
ext (string): file extension of pipe data - see filter help
mime (string): mime type of pipe data - see filter help
listen (boolean, default: false): indicate the output socket works in server mode
maxc (unsigned int, default: +I): max number of concurrent connections
ka (boolean, default: false): keep socket alive if no more connections
kp (boolean, default: true): keep packets in queue if no more clients
start (number, default: 0.0): set playback start offset. Negative value means percent of media dur with -1 <=> dur
speed (number, default: 1.0): set playback speed. If speed is negative and start is 0, start is set to -1
rate (unsigned int, default: 0): set send rate in bps, disabled by default (as fast as possible)
pckr (fraction, default: 0/0): reverse packet every N - see filter help
pckd (fraction, default: 0/0): drop packet every N - see filter help

HOME » Filters

GPAC Configuration

Configuration File
Global Options

Filters Overview

General Filters Concepts
gpac General Usage
Built-in Properties

Filters Help

Inspect packets (inspect)
Probe source (probe)
Compositor (compositor)
ISOBMFF/QT demuxer (mp4dmx)
MPEG-4 BIFS decoder (bifsdec)
MPEG-4 OD decoder (odfdec)
File input (fin)
BT/XMT/X3D loader (btplay)
HTTP input (httpin)
SVG loader (svgplay)
JPG/J2K/PNG/BMP reframer (rfimg)
PNG/JPG decoder (imgdec)
ADTS reframer (rfadts)
LATM reframer (rflatm)
MP3 reframer (rfmp3)
FAAD decoder (faad)
MAD decoder (maddec)
XVid decoder (xviddec)
OpenJPEG2000 decoder (j2kdec)
AC3 reframer (rfac3)
A52 decoder (a52dec)
AMR/EVRC reframer (rfamr)
OGG demuxer (oggdmx)
Vorbis decoder (vorbisdec)
Theora decoder (theoradec)
MPEG-2 TS demuxer (m2tsdmx)
UDP/TCP input (sockin)
OpenSVC decoder (osvcdec)
VideoToolBox decoder (vtbdec)
MPEG-4 LASeR decoder (lsrdec)
SAF demuxer (safdmx)
MPEG-DASH and HLS client (dashin)
CENC decryptor (cdcrypt)
CENC encryptor (cecrypt)
ISOBMFF/QT muxer (mp4mx)
QCP reframer (rfqcp)
H263 reframer (rfh263)
M1V/M2V/M4V reframer (rfmpgvid)
NHNT reader (nhntr)
NHML parser (nhmlr)
AVC/HEVC reframer (rfnalu)
MPEG PS demuxer (m2psdmx)
AVI demuxer (avidmx)
Subtitle loader (txtin)
TTXT/TX3G decoder (ttxtdec)
WebVTT decoder (vttdec)
RTP/RTSP/SDP input (rtpin)
File output (fout)
Raw AAC to LATM writer (uflatm)
ADTS writer (ufadts)
Media Reframer (reframer)
Stream to file (writegen)
AVC/HEVC to AnnexB writer (ufnalu)
QCP writer (writeqcp)
WebVTT writer (writevtt)
NHNT writer (nhntw)
NHML writer (nhmlw)
VobSub demuxer (vobsubdmx)
AVI muxer (avimx)
Audio output (aout)
M4V writer (ufm4v)
Audio resampler (resample)
Video output (vout)
Video crop (vcrop)
Video flip (vflip)
RAW video reframer (rfrawvid)
PCM reframer (rfpcm)
JPG encoder (jpgenc)
PNG encoder (pngenc)
Audio/Video rewinder (rewind)
Sources concatenator (flist)
MPEG-2 TS muxer (m2tsmx)
DASH and HLS segmenter (dasher)
HEVC tile aggregator (tileagg)
pipe input (pin)
pipe output (pout)
GSF Muxer (gsfmx)
GSF Demuxer (gsfdmx)
UDP/TCP output (sockout)
AV1/IVF/VP9 reframer (rfav1)
IVF/OBU/annexB writer (ufobu)
ATSC input (atscin)
RTP Streamer (rtpout)
RTSP Server (rtspout)
HTTP Server (httpout)
HEVC tile spliter (hevcsplit)
HEVC Tile merger (hevcmerge)
FLAC reframer (rfflac)
ProRes reframer (rfprores)
MPEG Transport Stream splitter (tssplit)
FFMPEG demuxer (ffdmx)
FFMPEG decoder (ffdec)
FFMPEG AV Capture (ffavin)
FFMPEG video rescaler (ffsws)
FFMPEG encoder (ffenc)
FFMPEG muxer (ffmx)
FFMPEG AVFilter (ffavf)
JavaScript filter (jsf)
OpenHEVC decoder (ohevcdec)

Clone this wiki locally
You can’t perform that action at this time.