Setting up mpd locally
Music Player Daemon (MPD) allows remote access for playing music (MP3, Ogg Vorbis, FLAC, AAC, Mod, and wave files) and managing playlists. MPD is designed for integrating a computer into a stereo system that provides control for music playback over a local network. It also makes a great desktop music player, especially if you are a console junkie, like frontend options, or restart X often.
This “how-to” will only handle on installing mpd for desktop use.
The “how-to” for playing over the network is coming later.
This is written for Ubuntu 8.04.
Open up a terminal and copy/paste this:
sudo apt-get install mpd mpc
Open up your file browser and make a new folder in your home directory called “.mpd”.
Don’t forget the point before mpd.
In that folder create a new folder called “playlists”.
Then make the following files in the .mpd folder:
Then again in a terminal:
sudo gedit /etc/mpd.conf
Change the first relevant block of text so it looks like this:
Then look for this line
Change mpd with your username.
Then in a terminal:
mpc add /
Note: it’s mpd – -create-db without the space between the two -.
Mpc is the command line music player for mpd.
How do you use Music Player Command?
mpc <command> [command args]…
mpc Displays status
mpc add <file> Add a song to the current playlist
mpc crop Remove all but the currently playing song
mpc del <position> Remove a song from the current playlist
mpc play [<position>] Start playing at <position> (default: 1)
mpc next Play the next song in the current playlist
mpc prev Play the previous song in the current playlist
mpc pause Pauses the currently playing song
mpc toggle Toggles Play/Pause, plays if stopped
mpc stop Stop the currently playing playlists
mpc seek [+-][HH:MM:SS]|<0-100>% Seeks to the specified position
mpc clear Clear the current playlist
mpc outputs Show the current outputs
mpc enable <output #> Enable a output
mpc disable <output #> Disable a output
mpc shuffle Shuffle the current playlist
mpc move <from> <to> Move song in playlist
mpc playlist Print the current playlist
mpc listall [<file>] List all songs in the music dir
mpc ls [<directory>] List the contents of <directory>
mpc lsplaylists Lists currently available playlists
mpc load <file> Load <file> as a playlist
mpc save <file> Saves a playlist as <file>
mpc rm <file> Removes a playlist
mpc volume [+-]<num> Sets volume to <num> or adjusts by [+-]<num>
mpc repeat <on|off> Toggle repeat mode, or specify state
mpc random <on|off> Toggle random mode, or specify state
mpc search <type> <query> Search for a song
mpc crossfade [<seconds>] Set and display crossfade settings
mpc update [<path>] Scans music directory for updates
mpc stats Displays statistics about MPD
mpc version Reports version of MPD
If you want a nice gui for mpd, I suggest using sonata.
sudo apt-get install sonata
Stop the mpd deamon by running
sudo mpd –kill
(that’s – -kill)
Get more info about mpd