My simple multi-room solution

I’ve just set-up a very simple multi-room solution. It’s not perfect, it uses MPD’s vorbis http stream, which means that it it won’t be in exact sync, and there will be some quality loss, but it’s a good start!

Because it’s using WiFi, I can move this to any room in the house easily. The client devices are configured to auto-play the stream when they boot up. The whole set-up is very simple, see below.

I’d love to hear suggestions on how to improve it, specifically how to get synchronised audio without quality loss. And also, how to avoid manual edits of /etc/mpd.conf from conflicting with edits made via the Volumio web UI.

Music server (volumio)
This is a Pi model B with the awesome Hifiberry Dac. Available on my network at music. Added the following additional streaming audio output /etc/mpd.cong

audio_output { type "httpd" name "Zefer Radio" encoder "vorbis" port "8000" quality "9" format "44100:16:2" }

Music clients

The following script at /home/pi/play/sh

#!/bin/bash

host=music
port=8000

mpc volume 90
mpc clear
mpc add "http://$host:$port"
mpc play

With the following crontab entry so it auto-plays when it boots up:

@reboot /bin/bash /home/pi/play.sh

Your basic idea is just great!

I thought already about a similar idea: how to split audio signals, assign left audio channel to “left speaker”, left and right audio channel for “center speaker” and right audio channel ro “right speaker”. This method is adaptable i.e. playing dolby surround 5.1 or other related playback on several Rasp. PI in the same room. This leads to clustering several units into one group or room.

Furthermore i’m interested using this thing with an additional input source like a TV, XBMC or anything… ok stop dreaming

raspberrypi.org/forums/viewt … 38&t=25684
With RTP and multicast is this guy is able to play synchronized music.

Another improvement would be a wake on lan concept and shutdown (or sleep) after x seconds of inactivity concept.
Here’s a manual way to carry out both concepts: jeremyblum.com/2013/07/14/rpi-wol-server/

I’d love to get this in sync! I tried using multicast RTP with PulseAudio, I don’t remember the symptoms, but my Volumio Pi didn’t work. I think that PulseAudio somehow conflicted with MPD, maybe Volumio builds a version of mpd that doesn’t like PulseAudio?

This has led me to consider stopping using Volumio. I love this project, but it couples tightly with MPD, and my preference would be to configure & install MPD, plugins, etc separately, and then have a web UI like Volumo that only controls playback. However, Volumio just works out of the box, and it’s great, so I’ve stuck with that for now!

hi!

this is exactly what i’m looking to do–i want to be able to play music on my pc (from a network attached drive), and have the speakers connected to my pc sync with speakers connected to a raspberry pi receiving the same stream. i am very new to this, and so hopefully these questions aren’t too off mark:

  • i haven’t actually received the rpi yet; i’m planning on using it with a hifiberry dac. the first thing to do is install volumio following this: hifiberry.com/guides/setting … eat-audio/ right?

  • once i get that on, i should be able to configure volumio to look at the nas. from there, can i use what you first posted to stream music to both the pi-connected speakers and my laptop (using, say, gmpc)? can i stream any type of music file, or do i need to use .ogg? volumio can act as both a server and a client at once?

that would get me to about where you are now, right? have you found a way to get the syncing better?

thanks!

I’ve been tinkering with pulseaudio for synchronised music between 2 raspberry pis, and it’s a bit tricky. I think the main problem is the Pi’s low CPU power, mainly on the client side. Also, I would recommend using a wired network. I have had this working over wireless, but I found that sync drifted. Prepare to do some experimenting if you do try to achieve this, and to be perfectly honest, I think it’s going to be hard to achieve.

As far as I can remember, all you need to do is install volumio and then enable the DAC in the volumio settings UI. It’s quite straightforward.