2

I would like to be able to stream audio from a raspberry pi to multiple wireless speakers in the same room (synchronized). I would also like to be able to control the raspberry pi with a computer or smartphone. My first instinct is to use MPD, but I am not sure if this is even possible. How would I go about implementing such a setup?

  • What kind wireless speakers you have? i'm using MPD and SqueezeBox (Logitech Media Server) – gurcanozturk Oct 27 '14 at 15:35
  • I have not bought any speakers yet since I am not sure if this setup would work. – affinehat Oct 28 '14 at 21:36
  • I've done this using a Raspberry Pi 2 Model B and a set of Sonos speakers, see how here: raspberrypi.stackexchange.com/questions/41349/… Did you buy your speakers and does it work as expected? – jgivoni Jan 30 '16 at 21:15
2

There are probably several alternatives to accomplish what you want, but one possibility is to use MPD running in a "server" raspberry pi (which may or may not have its own speaker) with audio output through pulseaudio, and then use pulseaudio to broadcast synchronized audio to your LAN over RTP to client machines connected to speakers, wirelessly or not.

Such a setup would require three independent but interacting pieces:

  • MPD running on the "server" rpi, with audio output through pulseaudio. This implies adding and configuring the "pulse" audio output in your mpd.conf file:

    audio_output {
        type                    "pulse"
        name                    "MPD PulseAudio Output"
        sink                    "rtp"
    }
    
  • A pulseaudio instance running on the "server" rpi, either as user or system session, with an RTP sink via the "module-rtp-send" module:

    load-module module-null-sink sink_name=rtp
    load-module module-rtp-send source=rtp.monitor
    set-default-sink rtp
    
  • Instances of pulseaudio running on "client" machines (raspberry pis?) with the "module-rtp-recv" module:

    load-module module-rtp-recv
    

Configuration details are beyond the scope of an answer here, but you can find a decent how-to guide for MPD on the rpi here. An exhaustive guide on setting up RTP broadcast, specifically using raspberrys as both senders and receivers can be found here, and in the pulseaudio documentation.

I can confirm that this setup works, as I have done it. However, RTP is extremely demanding on wireless links so YMMV.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.