ROC-SEND(1)
π ROC-SEND(1) β send real-time audio π
okay bestie, welcome to roc-send, a little icon from the Roc Toolkit family (section 1 of the manual, for all you pedants keeping score π ). she reads audio and yeets it across the network to a receiver. let's get into it.
β¨ NAME β¨
roc-send β send real-time audio π
πΈ SYNOPSIS πΈ
roc-send OPTIONS
π¦ DESCRIPTION π¦
Read an audio stream from an audio device or a file, and send it to a remote receiver. that's the whole gig. no cap.
π Options π
-h,--helpβ print help and dip. bye bestie π-V,--versionβ print the version and dip.-v,--verboseβ bump the verbosity level. yes you can use it multiple times, stack that vibe π₯-L,--list-supportedβ list the supported schemes and formats.-i,--input=IO_URIβ the input file or device URI. where the audio comes from, your origin story β¨--input-format=FILE_FORMATβ force the input file format, no guessing.-s,--source=ENDPOINT_URIβ the remote source endpoint.-r,--repair=ENDPOINT_URIβ the remote repair endpoint.-c,--control=ENDPOINT_URIβ the remote control endpoint.--reuseaddrβ enableSO_REUSEADDRwhen binding sockets.--target-latency=STRINGβ target latency, inTIMEunits.--io-latency=STRINGβ recording target latency, inTIMEunits.--latency-tolerance=STRINGβ maximum deviation from target latency, inTIMEunits.--nbsrc=INTβ number of source packets in the FEC block.--nbrpr=INTβ number of repair packets in FEC block.--packet-len=STRINGβ outgoing packet length, inTIMEunits.--frame-len=TIMEβ duration of the internal frames, inTIMEunits.--max-packet-size=SIZEβ maximum packet size, inSIZEunits.--max-frame-size=SIZEβ maximum internal frame size, inSIZEunits.--rate=INTβ override the input sample rate, in Hz.--latency-backend=ENUMβ which latency to use in the latency tuner (possible values"niq", defaultniq).--latency-profile=ENUMβ latency tuning profile (possible values"responsive","gradual","intact", defaultintact).--resampler-backend=ENUMβ resampler backend (possible values"default","builtin","speex","speexdec", defaultdefault).--resampler-profile=ENUMβ resampler profile (possible values"low","medium","high", defaultmedium).--interleavingβ enable packet interleaving (default = off).--profilingβ enable self profiling (default = off).--color=ENUMβ set colored logging mode for stderr output (possible values"auto","always","never", defaultauto).
π Endpoint URI π
the --source, --repair, and --control options define the network endpoints that the traffic gets sent to. it's giving "where are we going" energy.
ENDPOINT_URI should have the following form:
protocol://host[:port][/path][?query]
Examples:
rtsp://localhost:123/path?queryrtp+rs8m://localhost:123rtp://127.0.0.1:123rtp://[::1]:123rtcp://10.9.8.3:123
the list of supported protocols can be retrieved using the --list-supported option. slay.
the host field should be either an FQDN (domain name), or an IPv4 address, or an IPv6 address in square brackets.
the port field can be omitted if the protocol defines a standard port. otherwise, it is mandatory β no skipping, bestie π
the path and query fields are allowed only for protocols that support them, e.g. for RTSP.
if FEC is enabled, a pair of a source and repair endpoints should be provided. the two endpoints should use compatible protocols, e.g. rtp+rs8m:// for the source endpoint, and rs8m:// for the repair endpoint. if FEC is disabled, a single source endpoint should be provided.
supported source and repair protocols:
- source
rtp://, repair none (bare RTP without FEC) - source
rtp+rs8m://, repairrs8m://(RTP with Reed-Solomon FEC) - source
rtp+ldpc://, repairldpc://(RTP with LDPC-Staircase FEC)
in addition, it is recommended to provide a control endpoint. it is used to exchange non-media information used to identify session, carry feedback, etc. if no control endpoint is provided, the session operates in reduced fallback mode, which may be less robust and may not support all features. lowkey important, don't skip it β¨
supported control protocols:
rtcp://
π IO URI π
the --input option requires a device or file URI in one of the following forms:
DEVICE_TYPE://DEVICE_NAMEβ audio deviceDEVICE_TYPE://defaultβ default audio device for given device typefile:///ABS/PATHβ absolute file pathfile://localhost/ABS/PATHβ absolute file path (alternative form; only"localhost"host is supported)file:/ABS/PATHβ absolute file path (alternative form)file:REL/PATHβ relative file pathfile://-β stdinfile:-β stdin (alternative form)
Examples:
pulse://defaultpulse://alsa_input.pci-0000_00_1f.3.analog-stereoalsa://hw:1,0file:///home/user/test.wavfile://localhost/home/user/test.wavfile:/home/user/test.wavfile:./test.wavfile:-
the list of supported schemes and file formats can be retrieved using the --list-supported option.
if the --input is omitted, the default driver and device are selected. main character energy, she just picks for you π
the --input-format option can be used to force the input file format. if it is omitted, the file format is auto-detected. this option is always required when the input is stdin. fr fr, don't forget it.
the path component of the provided URI is percent-decoded. for convenience, unencoded characters are allowed as well, except that % should be always encoded as %25.
for example, the file named /foo/bar%/[baz] may be specified using either of the following URIs: file:///foo%2Fbar%25%2F%5Bbaz%5D and file:///foo/bar%25/[baz].
π Multiple slots π
multiple sets of endpoints can be specified to send media to multiple addresses. yes, she can serve multiple looks at once.
such endpoint sets are called slots. all slots should have the same set of endpoint types (source, repair, etc) and should use the same protocols for them. consistency is the vibe check πΈ
π₯ SO_REUSEADDR π₯
if the --reuseaddr option is provided, the SO_REUSEADDR socket option will be enabled for all sockets.
for TCP, it allows immediately reusing a recently closed socket in TIME_WAIT state, which may be useful you want to be able to restart server quickly.
for UDP, it allows multiple processes to bind to the same address, which may be useful if you're using systemd socket activation.
regardless of the option, SO_REUSEADDR is always disabled when binding to ephemeral port.
β Time units β
TIME should have one of the following forms:
123ns; 1.23us; 1.23ms; 1.23s; 1.23m; 1.23h;
π Size units π
SIZE should have one of the following forms:
123; 1.23K; 1.23M; 1.23G;
π EXAMPLES π
π Endpoint examples π
send file to receiver with one bare RTP endpoint:
$ roc-send -vv -i file:./input.wav -s rtp://192.168.0.3:10001
send file to receiver with IPv4 source, repair, and control endpoints:
$ roc-send -vv -i file:./input.wav -s rtp+rs8m://192.168.0.3:10001 \
-r rs8m://192.168.0.3:10002 -c rtcp://192.168.0.3:10003
send file to receiver with IPv6 source, repair, and control endpoints:
$ roc-send -vv -i file:./input.wav -s rtp+rs8m://[2001:db8::]:10001 \
-r rs8m://[2001:db8::]:10002 -r rtcp://[2001:db8::]:10003
send file to two receivers, each with three endpoints:
$ roc-send -vv \
-i file:./input.wav \
-s rtp+rs8m://192.168.0.3:10001 -r rs8m://192.168.0.3:10002 \
-c rtcp://192.168.0.3:10003 \
-s rtp+rs8m://198.214.0.7:10001 -r rs8m://198.214.0.7:10002 \
-c rtcp://198.214.0.7:10003
π§ I/O examples π§
capture sound from the default device (omit -i):
$ roc-send -vv -s rtp://192.168.0.3:10001
capture sound from the default ALSA device:
$ roc-send -vv -s rtp://192.168.0.3:10001 -i alsa://default
capture sound from a specific PulseAudio device:
$ roc-send -vv -s rtp://192.168.0.3:10001 -i pulse://alsa_input.pci-0000_00_1f.3.analog-stereo
send WAV file (guess format by extension):
$ roc-send -vv -s rtp://192.168.0.3:10001 -i file:./input.wav
send WAV file (specify format manually):
$ roc-send -vv -s rtp://192.168.0.3:10001 -i file:./input.file --input-format wav
send WAV from stdin:
$ roc-send -vv -s rtp://192.168.0.3:10001 -i file:- --input-format wav <./input.wav
send WAV file (specify absolute path):
$ roc-send -vv -s rtp://192.168.0.3:10001 -i file:///home/user/input.wav
π§ Tuning examples π§
force a specific rate on the input device:
$ roc-send -vv -s rtp://192.168.0.3:10001 --rate=44100
select the LDPC-Staircase FEC scheme and a larger block size:
$ roc-send -vv -i file:./input.wav -s rtp+ldpc://192.168.0.3:10001 \
-r ldpc://192.168.0.3:10002 -c ldpc://192.168.0.3:10003 \
--nbsrc=1000 --nbrpr=500
select smaller packet length:
$ roc-send -vv -i file:./input.wav -s rtp+ldpc://192.168.0.3:10001 \
--packet-len 2500us
select lower I/O latency and frame length:
$ roc-send -vv -s rtp://192.168.0.3:10001 \
--io-latency=20ms --frame-len 4ms
manually specify resampling parameters:
$ roc-send -vv -s rtp://192.168.0.3:10001 \
--resampler-backend=speex --resampler-profile=high
perform latency tuning on sender instead of receiver:
$ roc-recv -vv -o pulse://default -s rtp+rs8m://0.0.0.0:10001 \
-r rs8m://0.0.0.0:10002 -c rtcp://0.0.0.0:10003 \
--latency-profile=intact --target-latency=200ms
$ roc-send -vv -i file:./input.wav -s rtp+rs8m://192.168.0.3:10001 \
-r rs8m://192.168.0.3:10002 -c rtcp://192.168.0.3:10003 \
--latency-profile=gradual --target-latency=200ms
π ENVIRONMENT VARIABLES π
the following environment variables are supported:
NO_COLORβ by default, terminal coloring is automatically detected. this environment variable can be set to a non-empty string to disable terminal coloring. it has lower precedence than the--coloroption.FORCE_COLORβ by default, terminal coloring is automatically detected. this environment variable can be set to a positive integer to enable/force terminal coloring. it has lower precedence than theNO_COLORvariable and the--coloroption.
π SEE ALSO π
roc-recv(1), and the Roc web site at https://roc-streaming.org/
π BUGS π
please report any bugs found via GitHub (https://github.com/roc-streaming/roc-toolkit/). she is not perfect, okay, be nice π
π«Ά AUTHORS π«Ά
see the authors page on the website for a list of maintainers and contributors (https://roc-streaming.org/toolkit/docs/about_project/authors.html).
π COPYRIGHT π
2024, Roc Streaming authors
and that's the whole page, bestie π this was Roc Toolkit 0.4, dated 2024 β sending real-time audio like the icon she is. periodt. πβ¨
π¦ where this page comes from
- alpine 3.24: roc-toolkit-doc 0.4.0-r1 Β· MPL-2.0
- arch rolling: roc-toolkit 0.4.0-3 Β· CC0-1.0 AND MPL-2.0
- debian trixie: roc-toolkit-tools 0.4.0+dfsg-5 Β· MPL-2.0
- nixos 26.05: roc-toolkit 0.4.0
- nixpkgs unstable: roc-toolkit 0.4.0
- ubuntu questing: roc-toolkit-tools 0.4.0+dfsg-5ubuntu1
- ubuntu resolute: roc-toolkit-tools 0.4.0+dfsg-5ubuntu3 Β· MPL-2.0
- ubuntu resolute: roc-toolkit-tools 0.4.0+dfsg-5ubuntu3.1 Β· MPL-2.0
- ubuntu stonking: roc-toolkit-tools 0.4.0+dfsg-6ubuntu1 Β· MPL-2.0
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash on : a language model's rewrite of the original, under its terms