The Music Player Daemon - User's Manual Introduction This document is work in progress. Most of it may be incomplete yet. Please help! Installation We recommend that you use the software installation routines of your distribution to install MPD. Most operating systems have a MPD package, which is very easy to install.
Installing on Debian/Ubuntu Install the package mpd: apt-get install mpd
Compiling from source Download the source tarball from the MPD home page and unpack it: tar xjf mpd-0.14.2.tar.bz cd mpd-0.14.2 Make sure that all the required libraries and build tools are installed. The INSTALL file has a list. Now configure the source tree: ./configure The --help argument shows a list of compile-time options. When everything is ready and configured, compile: make And install: make install
Configuration
Configuring the music directory When you play local files, you should organize them within a directory called the "music directory". This is configured in MPD with the music_directory setting. By default, MPD follows symbolic links in the music directory. This behavior can be switched off: follow_outside_symlinks controls whether MPD follows links pointing to files outside of the music directory, and follow_inside_symlinks lets you disable symlinks to files inside the music directory.
Configuring input plugins To configure an input plugin, add a input block to mpd.conf: input { plugin "lastfm" user "foo" password "bar" } The following table lists the input options valid for all plugins: Name Description plugin The name of the plugin. enabled yes|no Allows you to disable a input plugin without recompiling. By default, all plugins are enabled.
Configuring decoder plugins Most decoder plugins do not need any special configuration. To configure a decoder, add a decoder block to mpd.conf: decoder { plugin "wildmidi" config_file "/etc/timidity/timidity.cfg" } The following table lists the decoder options valid for all plugins: Name Description plugin The name of the plugin. enabled yes|no Allows you to disable a decoder plugin without recompiling. By default, all plugins are enabled.
Configuring audio outputs Audio outputs are devices which actually play the audio chunks produced by MPD. You can configure any number of audio output devices, but there must be at least one. If none is configured, MPD attempts to auto-detect. Usually, this works quite well with ALSA, OSS and on Mac OS X. To configure an audio output manually, add an audio_output block to mpd.conf: audio_output { type "alsa" name "my ALSA device" device "hw:0" } The following table lists the audio_output options valid for all plugins: Name Description type The name of the plugin. name The name of the audio output. It is visible to the client. Some plugins also use it internally, e.g. as a name registered in the PULSE server. format Always open the audio output with the specified audio format (samplerate:bits:channels), regardless of the format of the input file. This is optional for most plugins. enabled yes|no Specifies whether this audio output is enabled when MPD is started. By default, all audio outputs are enabled. mixer_enabled yes|no Specifies whether the hardware mixer of this audio output should be used. By default, all hardware mixers are enabled if available.
Plugin reference
Input plugins
<varname>curl</varname> Opens remote files or streams over HTTP. Setting Description proxy Sets the address of the HTTP proxy server. proxy_user, proxy_password Configures proxy authentication.
<varname>file</varname> Opens local files.
<varname>lastfm</varname> Plays last.fm radio. This plugin is experimental, and will be superseded by a better solution in MPD 0.16.
<varname>mms</varname> Plays streams with the MMS protocol.
Output plugins
<varname>alsa</varname> The "Advanced Linux Sound Architecture" plugin uses libasound. It is recommended if you are using Linux. Setting Description device NAME Sets the device which should be used. This can be any valid ALSA device name. The default value is "default", which makes libasound choose a device. It is recommended to use a "hw" or "plughw" device, because otherwise, libasound automatically enables "dmix", which has major disadvantages (fixed sample rate, poor resampler, ...). use_mmap yes|no If set to yes, then libasound will try to use memory mapped I/O. buffer_time US Sets the device's buffer time in microseconds. Don't change unless you know what you're doing. period_time US Sets the device's period time in microseconds. Don't change unless you really know what you're doing. auto_resample yes|no If set to no, then libasound will not attempt to resample, handing the responsibility over to MPD. It is recommended to let MPD resample (with libsamplerate), because ALSA is quite poor at doing so. auto_channels yes|no If set to no, then libasound will not attempt to convert between different channel numbers. auto_format yes|no If set to no, then libasound will not attempt to convert between different sample formats (16 bit, 24 bit, floating point, ...).
<varname>ao</varname> The ao plugin uses the portable libao library.
<varname>fifo</varname> The fifo plugin writes raw PCM data to a FIFO (First In, First Out) file. The data can be read by another program.
<varname>jack</varname> The jack plugin connects to a JACK server.
<varname>mvp</varname> The mvp plugin uses the proprietary Hauppauge Media MVP interface. We do not know any user of this plugin, and we do not know if it actually works.
<varname>httpd</varname> The httpd plugin creates a HTTP server, similar to ShoutCast / IceCast. HTTP streaming clients like mplayer can connect to it. You must configure either quality or bitrate. It is highly recommended to configure a fixed format, because a stream cannot switch its audio format on-the-fly when the song changes. Setting Description port P Binds the HTTP server to the specified port (on all interfaces). encoder NAME Chooses an encoder plugin, e.g. vorbis. quality Q Configures the encoder quality (for VBR) in the range -1 .. 10. bitrate BR Sets a constant encoder bit rate, in kilobit per second.
<varname>null</varname> The null plugin does nothing. It discards everything sent to it. Setting Description sync yes|no If set to no, then the timer is disabled - the device will accept PCM chunks at arbitrary rate (useful for benchmarking). The default behaviour is to play in real time.
<varname>oss</varname> The "Open Sound System" plugin is supported on most Unix platforms. Setting Description device PATH Sets the path of the PCM device. If not specified, then MPD will attempt to open /dev/sound/dsp and /dev/dsp.
<varname>osx</varname> The "Mac OS X" plugin uses Apple's CoreAudio API.
<varname>pipe</varname> The pipe plugin starts a program and writes raw PCM data into its standard input.
<varname>pulse</varname> The pulse plugin connects to a PulseAudio server.
<varname>shout</varname> The shout plugin connects to a ShoutCast or IceCast server. It forwards tags to this server.
<varname>solaris</varname> The "Solaris" plugin runs only on SUN Solaris, and plays via /dev/audio. Setting Description device PATH Sets the path of the audio device, defaults to /dev/audio.