An audiophile media centre on Raspberry Pi

I was looking for a way to play media from a NAS in a simple way, controlled from an iPad. Ideally I wanted a player that would run high quality sound straight to my HiFi (via a DAC), and video files straight to the TV (via HDMI, inc. sound). I don’t always have the Hifi on to watch TV, and I also want to be able to play music while the children watch TV. There are a number of excellent options out there for audiophile music playback, and there are also great media servers for video files, but it seemed like there was not one solution that would allow me to do what I wanted to do in the quality I wanted to do it.

So I started tinkering a little, and thanks to the efforts of a number of people posting their advice on blogs and fora I’ve ended up with a setup I’m happy with. A few minor compromises were necessary for me, but I’m sure somebody with a little more knowledge of Linux would be able to fix those. As it stands, I have very little experience with using a Raspberry Pi and the operating systems that make it all work, so I completely relied on the power of Google and the willingness of people to help me with my beginner’s questions.

Hardware

  1. Raspberry Pi 2 Model B
  2. 5V 2A power supply
  3. 8GB Micro SD card (I used SanDisk ultra)
  4. IQaudIO Pi-DAC+
  5. Pibow Audio case


Assembling the above is pretty straightforward. At a later point I also added heat sinks to the Pi, just in case Kodi would cause it to run too hot. Not sure if that is necessary.

Once that’s done, it’s time for the software. To flash an operating system onto the SD card I used ApplePi Baker, which works a treat.

My main priority is audio, so I decided to use an audiophile player and add Kodi for video onto it afterwards. I don’t know exactly what optimisations the audio player incorporates and how many of those are undone by later adding Kodi onto the operating system, but I’m happy with the sound I’m getting now, so it works for me.

At first I decided to go with Moode audio player. This is a brilliant piece of software written by Tim Curtis based on the mpd media server, so it can be remote controlled with Mpad or its iPhone equivalent MPod. Unfortunately I encountered a strange crashing problem (before I even installed Kodi), that despite my best efforts, and  Tim’s unbelievably brilliant and forthcoming help, led me to switch to Volumio. I just couldn’t work out why Moode wasn’t working, and to see whether the issue lay with the software or the hardware I decided to try out Volumio, and the crashing problem disappeared. I still like the look and feel of Moode better, but Volumio is also based on mpd server, so when using Mpad to remote control it, there is very little outward difference between the two. I feel the volume control works better with Moode, but I have not explored all of Volumio’s settings to see if I can make it work better for me.

At the time of writing Volumio is on version 1.55. This uses Raspbian Wheezy at its core, which affects the version of Kodi that can be installed. If video was my main priority I would probably install something like OSMC, which works better than my current setup, but I prefer to compromise on the video side and I don’t have the expertise to make Kodi work as well as it does in a distribution like OSMC in my setup. I can’t for example connect to my NAS using nfs, only samba seems to work. Also, video AirPlay does not work for me, but audio AirPlay through Volumio does work well. There are no doubt ways to make this work, but when I tried, I ended up with a system that didn’t function at all anymore. I just don’t know how the steps I took to fix it affected the other pieces of software.

So here is a step by step rundown of what I did, with thanks to all the various websites I assembled this information from.

  1. flash Volumio 1.55 img onto 8GB micro SD card
  2. set static IP
  3. set IQaudIO DAC+
  4. mount NAS network drive (SMB/CIFS)
  5. check Raspbian version from Terminal (just to check which instructions to follow in step 7 below)
    • cat /etc/os-release
  6. run this command from Terminal (I don’t think this does anything other than download latest packages)
    • sudo apt-get update
  7. follow instructions for Wheezy from this website (thank you gkreidl for putting that together):
  8. increase ram to 256
    • sudo nano /boot/config.txt
    • edit gpu_mem to 256
    • save and exit
  9. reboot
    • sudo reboot
  10. make Kodi start up automatically
    • sudo nano /etc/rc.local
    • add the following two lines before the last line (“exit 0”)
      #run Kodi as user pi
      su – pi -c startkodi&
    • save and exit
  11. reboot

That’s it, Kodi should now start up automatically, with Volumio running in the background. Setting Kodi to automatically update the library at startup causes it to crash, so I do that manually every now and then. Also, scrubbing video results in a still image with the audio continuing to play. Switching OMX player on under hardware accelerator settings fixes this but causes some choppiness in the playback. I’ve not worked out how to fix that yet, increasing the RAM and overclocking the Pi did not make a difference.

One thought on “An audiophile media centre on Raspberry Pi

  1. If you want to have the Raspberry Pi send the audio of the music files always and only to the DAC and the audio of the video files always and only to the HDMI you can use Kodi and an add-on named Automatic Audio Switcher.
    I recently bought a DAC product similar to the one that you have, and I was able to configure it that way. See here: https://support.hifiberry.com/hc/en-us/community/posts/115000457089-DAC-on-XBIAN-with-Automatic-Audio-Switcher
    I used XBIAN as an operating system, but the setup would work on any other Kodi-based Raspberry Pi distribution and probably on your DAC as well..
    The advantage is that you only have one application running (Kodi) instead of two (Kodi and Volumio), so less charge on the hardware; the disadvantage is that the Raspberry Pi would not be able to play a video and an audio file at the same time (Kodi can play only one thing at a time, as far as I know), if it is what you want to do.

    Like

Leave a comment