So what is MPD?
Well, MPD Stands for Music Player Daemon. This is a Daemon for Linux, Windows or Mac which allows you to play music. Sounds pretty basic right? Wrong! It has full database support, supports anything FFMPEG can play, (mp3, ogg, wma, flac, etc) runs quietly in the background, and supports administration over IP from multiple clients at the same time! It’s quite simple to get setupÂ and with the same ease and features of say iTunes or Windows Media Player (play lists, shuffle, full search functions) All in all its an amazing powerful little tool.
Lets install it
installing and Configuring (ubuntu based system)
apt-get install mpd
It is going to download 10MB of archives, so you just got to give it a sec to let it complete…(Just be thankful you are not on my university internet…. Yea, a full 4KB/s!)
After that finishes, it will start the daemon with it’s default settings, so we need to edit the config file.
First off, change the “music_directory” to your actual music directory.
Next, go to “bind_to_address” and enter in “127.0.0.1″. For some reason or another, MPD does not like localhost even though it is the default. Probably an Ubuntu thing…
Continue scrolling down until you get to audio_output. If you plan on using default alsa then it’s all good, it should already be configured. Now, if you want to stream your music over a network and not use alsa, comment out the alsa part by putting # in front of each line of configuration for it, there are a few! Next, pick the protocol that you wish to use and un-comment it. For example, I wanted to use the HTTP streaming server, so mine looks like this:
name "My HTTP Stream"
encoder "vorbis" # optional, vorbis or lame
# quality "5.0" # do not define if bitrate is defined
bitrate "128" # do not define if quality is defined
Under encoder, select vorbis to use ogg vorbis format, or lame for MP3. Unfortunately, due to patent issues, you are going to have to download and compile MPDÂ directly from their site for it to work.Â The last step is to restart the daemon.
sudo service mpd restart
And that’s it! If you don’t get any error messages, then it should be working!