Music Player Daemon (MPD) is a music player which allows remote access for playing music and managing playlists. Together with Icecast, it integrates perfectly within a 'headless'-type computer (without a monitor), allowing control and providing playback over a network or over the Internet. Basically, it allows you to listen to your favorite music from anywhere, as long as you have a client that controls MPD (changes the song, volume etc) and a player that supports the Ogg format, like Amarok, XMMS, Winamp and so on. MPD also makes a great music player, especially if you're a console junkie or you restart the X server often.
INSTALLING MPD
Open a terminal and type the following (skip the first command if already logged-in as root):
Enter root passwd:
# yum install mpd
Open the /etc/mpd.conf file using your favorite text editor and change the required paths. Use your regular user's home directory:
playlist_directory "/home/USER/music/playlists"
db_file "/home/USER/.mpd/mpd.db"
log_file "/home/USER/.mpd/mpd.log"
error_file "/home/USER/.mpd/mpd.error"
bind_to_address "127.0.0.1"
port "6600"
audio_output {
type "shout"
name "Stream short description"
host "localhost"
port "8000"
mount "/mpd.ogg"
password "hackme"
quality "5.0"
# bitrate "128"
format "44100:16:2"
# user "source" # optional
# description "My Stream Description" # optional
# genre "jazz" # optional
# public "no" # optional
}
$ mkdir -p music/playlists
$ mkdir .mpd
INSTALLING AND CONFIGURING ICECAST
Open a root terminal and type:
INSTALLING A WEB-BASED MPD CLIENT
Pitchfork is a modern webinterface to MPD as it supports many features such as volume adjusting, managing playlist, modify server settings, album art, lyrics fetching and so on. You can also listen to your Icecast server through Pitchfork.
Before installing Pitchfork, make sure you have a webserver installed, as well as PHP and PHP-Pear by opening a root terminal and typing:
# tar xfj /where/you/downloaded/pitchfork-0.5.1.tar.bz2
# mv pitchfork-0.5.1 pitchfork
Open Firefox (or other DOM2 capable browser: konqueror, opera but NOT iexplore) and go to http://hostname.or.ip.address.of.the.server/pitchfork. Here, set the configuration options based on the mpd.conf file and click Save.
RUNNING MPD AND ICECAST
Before starting, remember to put some mp3 or ogg files in the /home/USER/music directory.
Finally, from a root terminal, type:
# service icecast start
# service mpd start
Enjoy!