Snapcast Server Setup
Notes for setting up Snapcast (https://github.com/badaix/snapcast) for multi-device audio playback.
PipeWire as Player
To configure PipeWire as a player for Snapcast, create the file 10-snapcast-pipe-sink.conf
in /etc/pipewire/pipewire.conf.d/
(or in ~/.config/pipewire/pipewire.conf.d/
):
context.modules = [ { name = libpipewire-module-pipe-tunnel args = { tunnel.mode = sink pipe.filename = "/tmp/snapfifo" audio.format = S16LE audio.rate = 48000 audio.channels = 2 audio.position = [ FL FR ] stream.props = { node.name = Snapcast } } } ]
Then, restart PipeWire: systemctl --user status wireplumber pipewire pipewire-pulse
.
Resources
- PipeWire wiki on virtual devices: https://gitlab.freedesktop.org/pipewire/pipewire/-/wikis/Virtual-Devices#pipe-devices
- PipeWire documentation on pipe tunnel module: https://docs.pipewire.org/page_module_pipe_tunnel.html
- Snapcast docs on player setup: https://github.com/badaix/snapcast/blob/develop/doc/player_setup.md#pulseaudio