Stream HiFi Music From the Raspberry Pi

If you are a true audiophile, you’d scoff at the suggestion of using the Raspberry Pi to listen to music. But that’s because you haven’t yet tried the RaspyFi distro. It’s designed for music lovers and is fully equipped to work with your HiFi gear.

With RaspyFi, you get a headless media server that can play music, in all the popular audio formats, from a connected USB or a NAS device as well as stream Internet radio. Furthermore, the distro supports a large number of USB DACs so you can plug in your amplifiers and other equipment to enhance your listening experience.

RaspyFi also includes support for AirPlay devices out of the box, which means you can use the RaspyFi as a remote speaker for your Apple devices as well as Android devices with apps such as AirAudio that are available for free from the Google PlayStore. Best of all, you can control RaspyFi from any other remote computer or device attached to your local network.

The secret sauce that powers the distro is the venerable Music Player Daemon (MPD) music player server. The distro also has a wonderful browser-based user interface to control playback and configure other aspects of the distro.

Setup RasyFi

Once RaspyFi is all setup, you’ll be able to access it from anywhere on the local network. You can then select and queue music that’ll play on the locally attached speakers. Furthermore, if you have AirPlay devices, you can also stream music from the RaspyFi distro to the AirPlay speakers.

To install the distro, all you need to do is download the compressed image and extract it. Once you have the .img file you can use the Win32DiskImager tool to transfer it to an empty SDCARD with at least 2GB of space. Now insert the card into the Raspberry Pi, attach your speakers or your USB DAC and power it up.

Using the distro

Now head over to another computer on your network and enter the IP address of the Raspberry Pi. You can find it from your router’s admin interface that lists the assigned IP addresses of all the machines.

The RaspyFi’s web interface looks very appealing and the controls are very intuitive. Before you can use it to play music, you’ll need to point it to your library. Connect the USB or NAS device loaded with your music to the Raspberry Pi, and head to “Setting -> Database”. When you click on the “Update MPD Database” button, MPD will scan for music on all attached devices.

Once it’s done, you can switch to the “Browse” tab at the bottom of the RaspyFi web interface. From here you can play any tracks and queue them to playlists. Switch to the “Playback” tab to control playback of the currently playing track.

Extend RaspyFi

Like I mentioned earlier, RaspyFi has built-in support for AirPlay devices. But AirPlay isn’t the only wireless audio streaming protocol out there. The other popular protocol for streaming audio is DLNA.

Although RaspyFi doesn’t yet support DLNA devices, you can make the RaspyFi show up on any DLNA controller with a little command-line magic. To get to the command-line on RaspyFi, you’ll have to SSH into it from another box. Assuming the IP address of your Raspberry Pi is 192.168.3.102, enter this command from another Linux machine on the same network:

ssh pi@192.168.3.102

When prompted for a password, enter “raspberry” without the quotes. Once logged in follow the commands in this forum post to make the RaspyFi distro appear as a DLNA renderer that you can wirelessly stream music to.