Music Player Daemon


Music Player Daemon is a free and open music player server. It plays audio files, organizes playlists and maintains a music database. In order to interact with it, a client program is needed. The MPD distribution includes mpc, a simple command line client.
MPD is used in proprietary audio hardware. The MPD project maintains a list of vendors, some of which infringe the GPL.

Design

MPD simply runs in the background playing music from its playlist. Client programs communicate with MPD to manipulate playback, the playlist, and the database. It is not a full-featured music player program such as Amarok, but its clients can serve such role.
MPD uses a flat file database to maintain the basic music file information when it is not running. Once the daemon is started, the database is kept completely in-memory and no hard disk access is necessary to look up or search for local audio files. Usually, music files must be below the music root directory and are only added to the database when the update command is sent to the server. Playback of arbitrary files is only allowed for local clients which are connected to the server via Unix Domain Sockets. MPD does not provide a built-in tag editor; this functionality is handled by clients or external programs, though 3rd party patches do exist to add this functionality to the server.
The client–server model provides several advantages over all-inclusive music players. Clients may communicate with the server remotely over an intranet or over the Internet. The server can be a headless computer located anywhere on the network. Music playback can continue seamlessly when not using X or restarting X. Different clients can be used for different purposes – a lightweight client left open all the time for controlling playback with a more fully featured client used for intensive database searches. Several clients can use the same database, even running simultaneously – side-by-side, remotely or under different user accounts.

Features

MPD has a variety of front-ends which communicate with the server using a custom protocol over a TCP connection. Clients usually implement different types of interfaces.

Console

For a more complete list, see the Clients MPD Wiki.
Simple clients can script the mpc program to issue commands to the server. Some clients provide an HTML or AJAX user interface and can be located on the same computer as the server, requiring only a browser be installed on the client machine. There is a client implemented as a Firefox add-on, one as a Xfce panel plugin, and one as a Wii application, and one as a for Windows 8/Windows RT.
Libraries exist to interface with MPD from many programming languages, including C, Python, Ruby, Perl, Lua and Haskell. libmpdee is an Emacs Lisp library allowing MPD to be controlled from Emacs.