4

I would like to build some "connected speakers" with a Raspberry Pi and an amplifier attached to standard hi-fi speakers (the ones I have have 4 ohms of impedance, about 50W, but I don't need the full power).

Since I would like to have one of these assemblies in each room of the apartment, the goal would be to have a media server connected to the WiFi network. Each Pi wouldn't have any drive (aside from the OS card) attached to them but instead they would use the content on the server.

Here are my questions:

  1. Is it possible to have a media player software on the raspberry which use the content on a media server on a network?
  2. If yes, what kine of media server would be needed for this purpose (Raspberry? Commercial products?)
  3. What should I look for in an audio amplifier for this kind of project? I cannot plug the speaker directly into the audio output; I need to amplify the signal, since I want to use non-powered speakers.
  • I tried to setup something similar. One network device client (RPI) in each room connected to single music server. The problem is you can't get real synchronicity in all rooms. There is always an noticeable (and very annoying) delay between single clients. An absolute no-go. Instead I now setup one client and distribute an amplified analogue signal directly to a speaker in each room. This works perfectly for me. – sparkie May 27 '13 at 8:08
  • Hello, I don't need to synchronize the clients. I would rather be able not to play the same music in each room, so that would work! What software did you use for your setup? Did you used an audio amplifier? Or active speakers? – Giomsen May 27 '13 at 9:03
  • I just use my homemade command line orientated scripts mainly based on sox(1) for replay. I hate GUIs :-) It does not need much interaction anyway since it operates on plain playlists. Surely I use several hardware audio amplifiers. Each of my 11 speakers has a distict one. For individual volume control. The model I use: kemo-electronic.de/en/Light-Sound/Amplifier-Splitter/… – sparkie May 27 '13 at 10:34
  • Thank you for the link! This is definitely what I am looking for. I just ordered two Pi and will try out with small active speakers prior ordering amplifier! – Giomsen May 28 '13 at 11:35
4

So you want to recreate Apple's AirPlay using Raspberry Pi ;)

For a ready solution supporting AirPlay playback, lifehacker has a solution: http://lifehacker.com/5978594/turn-a-raspberry-pi-into-an-airplay-receiver-for-streaming-music-in-your-living-room but then you will need iTunes to serve the music stream.

If you want to build your own....

  • For multi-room audio playback:

The keyword here is synchronisation, which can be achieved only if you have a central media server that sends out audio packets to multiple replay clients together with instructions on which precise moment in time to play each audio packet. I do not mean just a hard disk packet server, I mean the equivalent of an orchestra conductor to ensure that each client does exactly the same thing at the same time with everyone else. It would also need to send perfect clock (time) synchronisation signals, down to the millisecond. Any variations in time synch between clients would result in eerie echo-sounding audio artefacts.

Unfortunately, as sparkie says in his comment, there is no off-the-shelf solution that supports perfectly synchronised audio replay through the network. So the next option is to create a single media player.

  • For single room audio playback:

This is much simpler. Here you do not need a "master conductor" as there is nothing requiring synchronisation. The audio can play back as soon as the packets arrive at the Pi. However, before you get into searching for suitable media software, have you considered who will start and stop the audio playback? Do you want a user interface on the speaker to control the music? Then it might be simpler to connect it to your tv with a wireless keyboard and mouse. OpenELEC is very nice: http://www.raspberrypi.org/archives/tag/media-centre and so is any XBMC implementation: http://lifehacker.com/5929913/build-a-xbmc-media-center-with-a-35-raspberry-pi

Or are you happy to use a full server in another room? Then you need to go to the other room to start and stop the music, select tracks, etc. Or use a phone or table maybe. Here is one suggestion: http://www.audiostream.com/content/raspberry-pi-half-baked-50-network-player and here is a discussion on a forum: http://forum.stmlabs.com/showthread.php?tid=4354

Also have a look at the RPi MPD (Raspberry Pi Music Player Daemon) http://elinux.org/Rpi_Music_Player_Daemon

  • 1
    Hi Vassilis. Thank you for the detailed answer! Yeah, in a way I would like to recreated an Apple Airplay, but that could be controlled by other devices than an iPhone or Apple computer. I do use Apple devices, but my girlfriend has a windows computer and an android phone. She would like to play her music too ;-) I will have a closer look to your links and recommendation! Thanks a lot. – Giomsen May 27 '13 at 11:42
  • 1
    +1 on the mpd solution. I use it (as well as shairport) for playing music and radio streams. There are nice clients (MPoD for iOS, Theremin for OS X and several others for Android, Linux, Windows). – Arne May 29 '13 at 13:59
  • 1
    I am still investigating it. I installed the XBMC and found it a bit frustrating to use via the web interface (although the installation was very easy!). I am now installing SqueezePlug (squeezeplug.de) which also look interesting. Thank you for the comment on mpd, I did not see the clients at the first look! This is definitely worth a try! – Giomsen May 31 '13 at 21:00
  • 1
    Little update. I managed finally to make XBMC work (yeah, it might sound pretty easy but as first "project" with Pi's, it was a challenge). Here some mistakes I made. Buy an USB keyboard... I have only wireless devices at home and first tried over the web server remote... It takes ages for the setup. Then, change the ID tags of the audio files with a software like MusicBrainz Picard... Then I created a "Music" and "Video" folder in the /home/pi folder, so I can directly upload my files over ethernet. Then I added the "music" folder as source. I am now looking for client with the iPhone. – Giomsen Jun 4 '13 at 21:55

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.