man mpd (Commandes) - A daemon for playing music (mp3, ogg vorbis, and flac)
NAME
MPD - A daemon for playing music (mp3, ogg vorbis, and flac)
SYNOPSIS
mpd
[options]
[CONF_FILE]
mpd
[options]
PORT MUSIC_DIR PLAYLIST_DIR LOG_FILE ERROR_FILE
DESCRIPTION
MPD is a daemon for playing music (mp3, ogg vorbis, and flac). Music is played through the server's audio device. The daemon stores info about all available music, and this info can be easily searched and retrieved. Player control, info retrieval, and playlist management can all be managed remotely.
MPD searches for a config file in ~/.mpdconf then /etc/mpd.conf or uses CONF_FILE. Instead of using a config file, the minimal configuration paramters can be specified on the command line: PORT, MUSIC_DIR, PLAYLIST_DIR, LOG_FILE, and ERROR_FILE.
Read more about MPD on http://www.musicpd.org
OPTIONS
- --create-db
- (Re)Crete the db file for mpd.
- --help
Output a brief help message.- --no-create-db
- Do not create the db file for mpd, even if it doesn't exist.
- --no-daemon
- Don't detach from console.
- --stdout
- Don't redirect output to log files.
- --verbose
- Output verbose amounts of information to the logs
- --version
- Print version information.
PARAMETERS
Below are a list of parameters that can be specified in the config file. Each line in the config file should be of the form:
parameter "value"
- port <port>
- This specifies the port that MPD listens on. This parameter is required. This is typically 6600.
- music_directory <directory>
- This specifies the directory where music is located. This parameter is required. The directory path should be an absolute path.
- playlist_directory <directory>
- This specifies the directory where saved playlists are stored. This parameter is required. The directory path should be an absolute path.
- log_file <file>
- This specifies where the log file should be located. This parameter is required. The file path should be an absolute path.
- error_file <file>
- This specifies where the error file should be located. This parameter is required. The file path should be an absolute path.
- log_level <default, secure, or verbose>
- This specifies how verbose logs are. "default" is minimal logging, "secure" reports from what address a connection is opened, and when it is closed, and "verbose" records excessive amounts of information for debugging purposes. The default is "default".
- db_file <file>
- This specifies where the db file will be stored. The file path should be an absolute path. The default is ".mpddb" in the playlist directory.
- filesystem_charset <charset>
- This specifies the character set used for the filesystem. A list of supported character sets can be obtained by running "iconv -l". The default is determined from the locale when the db was originally created.
- id3v1_encoding <charset>
- This specifies the character set used for the ID3v1 tags. Supported characters sets also can be obtained from the iconv. By default ISO8859-1 is used.
- bind_to_address <ip address or hostname or any>
- This specifies which address MPD binds to and listens on. The default is "any", which binds to all available addresses.
- user <user>
- This specifies the user that mpd will run as, if set.
- password <password@permissions>
- This specifies a password for access to mpd. The format is "password@permissions" where permissions is a comma delimmitted list composed of "read","add","control", and/or "admin". "read" allows for reading of the database, displaying the current playlist, and current status of mpd. "add" allows for adding songs and loading playlists. "control" allows for all other player and playlist manipulations. "admin" allows the db to be updated and for the client to kill mpd. More than one password can be specified. An example of a password is "somePassword@read,add".
- default_permissions <permissions>
- This specifies the permissions of a client that has not been authenticated using a password. The format of permissions is specified n the description of the "password" config paramter. If not passwords are specified, the default is "read,add,control,admin", otherwise it is "" (no permissions).
- state_file <file>
- This specifies if a state file is used and where it is located. The file path should be an absolute path. The state of mpd will be saved to this file when mpd is terminated by a TERM signal or by the "kill" command. When mpd is restarted, it will read the state file and restore the state of MPD (including the playlist).
- connection_timeout <seconds>
- If a client does not send any new data in this time period, the connection is closed. The default is 60 seconds.
- max_connections <int>
- This specifies the maximum number of clients that can be connected to MPD. The default is 5 connections.
- mixer_type <oss, alsa, or software>
- This specifies which mixer to use. The default is oss.
- mixer_device <mixer dev>
- This specifies which mixer to use. The default for oss is /dev/mixer; the default for alsa is "hw:0".
- mixer_control <string>
- This specifies which mixer control to use (sometimes referred to as the "device"). Examples of mixer controls are PCM, Line1, Master, etc. An example for OSS is "Pcm", and an example for alsa is "PCM".
- max_playlist_length <int>
- This specifies the maximum number of songs that can be in the playlist. The default is 4096 songs.
- audio_buffer_size <size in KB>
- This specifies the size of the audio output buffer that mpd uses. The default is 2048 kilobytes. buffer_before play <0-100%> This specifies the amount of the audio buffer that will be filled before a song begins playing. The default is 25%.
- audio_output_format <sample_rate:bits:channels>
- This specifies the format all decoded audio should be converted to for playing. This options is useful if your sound card only supports a limited number of sample rates and if you want to ensure all transitions between songs are crossfaded/gapless. This option is not recommended for all users because it can cause a reduction in sound quality. The two most common formats are "48000:16:2" and "44100:16:2".
- replaygain <album or track>
- This specifies whether to use replaygain tags (currently only supported for FLAC and Ogg Vorbis formats).
- replaygain_preamp <-15 to 15>
- This is the gain (in dB) applied to songs with replaygain tags.
- max_command_list_size <size in KB>
- This specifies the maximum size a command list can be (in kilobytes). The default is 2048 kilobytes.
- max_output_buffer_size <size in KB>
- This specifies the maximum size of the output buffer to a client (in kilobytes). The default is 2048 kilobytes.
- ao_driver <ao plug-in>
- This specifies the ao plug-in to use for audio output. Typical values for Linux include "oss" and "alsa09". The default value is "default".
- ao_driver_options <ao plug-in options>
- This specifies the options to use for the selected ao_driver. For oss, the only option available is "dsp". For alsa09, the available options are: "dev", "buf_size", and "periods". Options are assigned using "=" and ";" is used to separate options. An example for oss: "dsp=/dev/dsp". An example for alsa09: "dev=hw:0,0;buf_size=4096". The default value is "".
- audio_write_size <size in bytes>
- This specifies how many bytes mpd writes to the audio device at once. The default is 1024. This options is to work around a bug in older versions of libao on sound cards with very small buffers.
- save_absolute_paths_in_playlists <yes or no>
- This specifies whether relative or absolute paths for song filenames are used when saving playlists. The default value is "no".
- http_proxy_host <string>
- Use to specify the proxy host used for http connections.
- http_proxy_port <port>
- The port that the http proxy host uses.
- http_proxy_user <string>
- If the http proxy server requires authentication, this specifies the user.
- http_proxy_password <string>
- If the http proxy server requires authentication, this specifies the password.
EXAMPLES
- Below is an example config file. (Note: '#' at the beginning of a line denotes a comment. The '#' must be the first character/symbol on that line.)
# required
port "6600"
music_directory "~/mp3"
playlist_directory "~/playlists"
log_file "~/mpd.log"
error_file "~/mpd.error"
# optional
mixer_type "oss"
mixer_device "/dev/mixer"
#mixer_control "Pcm"
# mixer_type is typically "oss", "alsa", or "software"
#mixer_type "alsa"
#mixer_device "default"
#mixer_control "PCM"
# ao_driver is typically "oss" or "alsa09"
#ao_driver "oss"
#ao_driver_options "dsp=/dev/dsp"
#audio_write_size "1024"
max_playlist_length "4096"
buffer_before_play "25%"
audio_buffer_size "2048"
#db_file "~/playlists/.mpddb"
#state_file "~/playlists/.mpdstate"
#user "shank"
connection_timeout "60"
max_connections "5"
max_command_list_size "2048"
max_output_buffer_size "2048"
save_absolute_paths_in_playlists "no"
# log_level can be "default", "secure", "verbose"
log_level "default"
# when bind_to_address is set to "any", MPD binds all available addresses
bind_to_address "any"
#password "password@read,add,control,admin"
#default_permissions "read,add,control,admin"
#filesystem_charset "UTF-8"
#replaygain "album"
#replaygain_preamp "0"
#http_proxy_host "proxy.isp.com"
#http_proxy_port "8080"
#http_proxy_user "user"
#http_proxy_password "password"