Project: Mo’ Music – MPD

Some quick info before starting out: i am using a Raspberry Pi with Raspbian (which is a debian build). If you are using another distro then the process might vary. This should not be seen directly as a tutorial but more to give you inspiration and ideas, use it however you see fit though.

Setting up MPD

I could use a lot of time writing how I set up MPD, but frankly, I just used this tutorial. The first part of the guide is just setting up Rasbian, which I’d already done, so I just skipped to the MPD installation part. I have all my music on a NAS, so i changed the config to use our NAS as the music folder (as the tutorial shows), but this was the only change to the config that i did based on that tutorial.
However later on i had some problems with MPD, because when other people were using our NAS the music would be a bit laggy. Our NAS is old and that is obviously the cause, but i needed a solution. I added the following line which basically means that it will download more of the song before playing, which means that the problem wont be AS big.
So i added the following two lines:

buffer_before_play “100%”
audio_buffer_size “4096”

The first line means that it completly fills the buffer before trying to play, and the second line makes the buffer twice as big (the default is 2048). Quote from manual: ”2048, large enough for nearly 12 seconds of CD-quality audio”. It wont fix my problem if a major download is in progress, but it will help.

And now MPD just worked.
I installed MPC and mpcccp on the server aswell, these are client programs which means you can actually use MPD, which gave me some command line control. However to use the server “in production”, i installed GMPC (Gnome Music Player Client) on my computers, and installed MPDroid on my android phone. Other products are obviously available, and others might be better – these suited my needs so I used these.
However, I ended up creating my own client, which is browser based – but that’s a story for another post.