Step 1:
Install mpd. (Ubuntu specific: sudo aptitude install mpd, Fedora specific: #yum install mpd)
Step 2:
Now its time to set it up for our requirements, open /etc/mpd.conf in your favorite editor and change the following lines, it takes me quite a while to get everything working...
music_directory "/media/Entertainment/Music"
playlist_directory "/media/Entertainment/Music"
db_file "/home/shamail/.mpd/db"
log_file "/home/shamail/.mpd/log.log"
error_file "/home/shamail/.mpd/errors.log"
pid_file "/home/shamail/.mpd/pid"
state_file "/home/shamail/.mpd/state"
user "shamail"
Replace the settings accordingly, and make a directory in home directory
$ mkdir ~/.mpd
User is very important as this line specifies the user MPD will run as, leave all the options as such.
Step 3:
Now run the mpd as, if successful, following output (or similar) should appear.
# /etc/init.d/mpd start
shamail@busybox:~$ sudo /etc/init.d/mpd start
* Starting Music Player Daemon mpd No "audio_output" defined in config file
Attempt to detect audio output device
Attempting to detect a alsa audio device
Successfully detected a alsa audio device
We now have our music server running, but no method to play... For that we need a client for mpd to play. There are tons of clients for mpd (http://mpd.wikia.com/wiki/Clients), the native client is called as mpc(media player client). To begin we will use this, then move to some very equipped and advanced clients that resembles whole music player and have even more functionalities)
Imagine multiple clients, one in sys tray showing song change notification, one at gnome panel displaying the song being played, other access from web to do all the music surfing and even a vim client to change the music while coding! All accessing one unified media queue powered by MPD.
Step 4:
Next step of ours is to install a client. Install mpc in the same way mpd was installed.
Step 5:
Now we need to add some music to the playlist, but what to?
$ mpc listall #list all the music in music dir.
$ mpc add
$ mpc listall | mpc add #add all music
$ mpc play|pause #play/pause/resume play
$ mpc stop #stop playing
$ mpc status #show current status
$ mpc volume 80|+1|-5 #increase/decrease volume.
This is conventional way to access mpd, while doing work on shell these comes handy though, but this ain't give media player benefits, for this install gnome-musicplayer-client (a very beautiful media player, backed by mpd) or Sonata (a fast light way to do things quickly) or both.
Then you can install music-panel to give you notifications and panel display of the playing tracks. This has a nice UI indeed.
(This is what music-panel comes at notification and quick control)
(Gnome Music Player Client)For programmers and geeks install client for vim to change and navigate in songs while working!!
For web freaks you can additionally install one of web based client from 10s of available web clients.
Enjoy with it... :)
For web freaks you can additionally install one of web based client from 10s of available web clients.
Enjoy with it... :)