SNDIORTP(1)

NAME
sndiortp - play RTP streams or send recorded audio over RTP

SYNOPSIS
sndiortp [-hvx] [-b size] [-c channels] [-f device] [-l rtp://[address][:port]] [-p bits] [-r rate] [-v volume] [-z size] [[rtp://host[:port] ...]]

DESCRIPTION
The sndiortp utility records audio from the sndio(7) audio device and sends it over the Real-time Transport Protocol (RTP) to the given network addresses. Similarly it may receive any number of audio streams (-l) over RTP and play the resulting mix on the local audio device. Only 16-bit and 24-bit PCM payloads are supported, making sndiortp suitable for local network areas only. By default sndiortp uses UDP port 5004.

As the remote and local device clocks are not synchronized, the inbound RTP stream sample rate is slightly adjusted by resampling it. This ensures that the time between a sample is received and the time it is played stays constant. If an inbound network packet is lost, playback of the stream restarts: a reliable network with reserved bandwidth is thus recommended.

The options are as follows:

-b size
    The RTP receive buffer size in frames. Default is 50ms, i.e. 2400 frames at the default sample rate.

-c channels
    The RTP channels count. The default is 2, i.e. stereo.

-f device
    Use this sndio(7) audio device. Default is default.

-l rtp://[address][:port]
    Accept RTP streams on the given local network address. If no address is provided, then sndiortp will accept packets from any address.

-p bits
    The RTP bits per sample. Only 16 and 24 are supported. Default is 24.

-r rate
    Sample rate in Hertz of the RTP stream. The default is 48000.

-v  Increase log verbosity.

-x  Do not adjust the RTP source sample rate to the local audio device sample rate. Unless the local and remote clocks are synchronized, the receive buffer will overrun or underrun, causing sndiortp to reset periodically.

-z size
    The audio device block size in frames. Default is 10ms, i.e. 480 frames at the default sample rate.

If sndiortp is sent SIGINT, it drains the play buffer and exits.

EXAMPLES
Receive RTP streams on port 5120 and play the resulting mix:

    $ sndiortp -l rtp://:5120

Send recorded data to 192.168.0.1 and 192.168.0.2 port 5120:

    $ sndiortp rtp://192.168.0.1:5120 rtp://192.168.0.2:5120

SEE ALSO
sndio(7)

BUGS
Resampling is low quality.

Playback is limited to 64 streams.