Skip to content

Instantly share code, notes, and snippets.

@astoeckel
Last active October 12, 2021 06:05
Show Gist options
  • Star 5 You must be signed in to star a gist
  • Fork 1 You must be signed in to fork a gist
  • Save astoeckel/0291d54fd47ce95450163aae1f02475a to your computer and use it in GitHub Desktop.
Save astoeckel/0291d54fd47ce95450163aae1f02475a to your computer and use it in GitHub Desktop.
Stream audio from pulse audio as opus stream via UDP/RTP
#!/bin/sh
pacat \
--device=alsa_output.pci-0000_00_1b.0.analog-stereo.monitor \
--rate=48000 \
--record | \
opusenc \
--expect-loss=25 \
--max-delay=0 \
--framesize=2.5 \
--bitrate=256 \
--raw - - | \
cvlc \
- \
--file-caching=500 \
--quiet \
--intf dummy \
--aout dummy \
--vout dummy \
':sout=#rtp{late=100,raw,caching=50,sdp=rtsp://:8554/test}' ':rtsp-caching=50' ':sout-all' ':sout-keep'
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment