As a longtime MPD user I was looking for a way to do synchronous multi-room audio with it. In comes Snapcast.

Installations

The AUR provides the Snapcast server application and client application in 1 package. The server accepts the output from the player - MPD in this case - and forwards it to the client. This means Snapcast needs to be installed on the device on which MPD runs as well as on all the devices you want to listen to the stream.

yaourt -S snapcast

Server configuration

1. MPD configuration

For MPD to output its stream to the Snapcast server we need to add an audio_output to mpd.conf.

audio_output {
type "fifo"
name "snapcast"
path "/tmp/snapfifo"
format "48000:16:2"
mixer_type "software"
}

As you can see at this time the audio output quality of Snapcast is limited to stereo at 48kHz in 16bit. So for surround sound and audiophile listening I use my regular MPD audio output. But for anything else Snapcast is a godsend.

2. Create the fifo file

touch /tmp/snapfifo

3. Start and enable the Snapcast server

sudo systemctl start snapserver
sudo systemctl enable snapserver

4. (Re)start MPD

When running MPD in Systemd user-mode

systemctl --user restart mpd.service

Or else

sudo systemctl restart mpd.service

Client configuration

At this point your can connect your clients to the stream with

snapclient -h IP_ADDRESS_OF_THE_SERVER

For further configuration of the Snapcast client, like daemon mode, checkout the options in /etc/default/snapclient.

To run the snapcast client as a daemon:

systemctl start snapclient.server
In daemon mode snapclient has issues playing simultaneously with other audio streams like Youtube, at least in Archlinux. This doesn't happen when we run snapclient from the commandline. It looks like this is caused by a permission problem related to PulseAudio. We can fix this by using a custom systemd script in ~/.config/systemd/user/snapclient.service .
[Unit]
Description=Snapcast client
After=network.target sound.target
Wants=avahi-daemon.service

[Service]
EnvironmentFile=-/etc/default/snapclient
Type=forking
ExecStart=/usr/bin/snapclient -h box --users YOUR_USERNAME:YOUR_USER_GROUP -d
PIDFile=/var/run/snapclient/pid
Restart=always

[Install]
WantedBy=multi-user.target

After this run:

systemctl --user daemon-reload

To start Snapclient in daemon mode with systemd:

systemctl --user start snapclient.service

Make sure you have pulseaudio-alsa installed. If not:

sudo pacman -S pulseaudio-alsa

Android Client

There’s an Android Snapcast Client available in the Play Store called Snapdroid. You can find it by searching for Snapcast. It allows you to control the volume of all the client streams when connected to the server as well as listening to the stream itself.