Skip to content

Instantly share code, notes, and snippets.

@rechner
Created February 19, 2023 00:13
Show Gist options
  • Save rechner/7d29c0e1ac98c53930dc8070d7e49dfd to your computer and use it in GitHub Desktop.
Save rechner/7d29c0e1ac98c53930dc8070d7e49dfd to your computer and use it in GitHub Desktop.
# ~/.config/systemd/user/turntable-stream.service
# Systemd user unit for streaming audio from a soundcard to a snapcast TCP server source
[Unit]
Description=Stream turntable input to snapserver
Wants=avahi-daemon.service
After=network-online.target time-sync.target sound.target avahi-daemon.service
[Service]
ExecStart=/usr/bin/gst-launch-1.0 -v pulsesrc ! audioresample ! audioconvert ! audio/x-raw,rate=44100,channels=2,format=S16LE ! wavenc ! tcpclientsink host=snapserver.local port=4953
Restart=on-failure
[Install]
WantedBy=default.target
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment