summaryrefslogtreecommitdiff
path: root/doc/mpd.1
blob: 6bbab2965985959f536bd900f9c90b8d24f34347 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
.TH "Music Player Daemon" 1
.SH NAME
MPD \- A daemon for playing music (mp3, ogg vorbis, and flac)
.SH SYNOPSIS
.B mpd
.RI [ options ]
.RI [ CONF_FILE ]
.br
.B mpd
.RI [ options ]
.I PORT MUSIC_DIR PLAYLIST_DIR LOG_FILE ERROR_FILE 
.br
.SH 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
.SH OPTIONS
.TP
.B --create-db
(Re)Crete the db file for mpd.
.TP
.BI --help
Output a brief help message.
.br
.TP
.BI --no-daemon
Don't detach from console or redirect output to log files.
.TP
.BI --verbose
Output verbose amounts of information to the logs
.TP
.BI --version
Print version information.
.SH 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:
.br
parameter "value"
.TP
.B port <port>
This specifies the port that MPD listens on. This parameter is required. This is typically 6600.
.TP
.B music_directory <directory>
This specifies the directory where music is located.  This parameter is required.  The directory path should be an absolute path.
.TP
.B playlist_directory <directory>
This specifies the directory where saved playlists are stored.  This parameter is required.  The directory path should be an absolute path.
.TP
.B log_file <file>
This specifies where the log file should be located.  This parameter is required.  The file path should be an absolute path.
.TP
.B error_file <file>
This specifies where the error file should be located.  This parameter is required.  The file path should be an absolute path.
.TP
.B 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".
.TP
.B 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.
.TP
.B 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.
.TP
.B 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.
.TP
.B user <user>
This specifies the user that mpd will run as, if set.
.TP
.B 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".
.TP
.B 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).
.TP
.B 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.
.TP
.B 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.
.TP
.B max_connections <int>
This specifies the maximum number of clients that can be connected to MPD. The default is 5 connections.
.TP
.B mixer_type <oss, alsa, or software>
This specifies which mixer to use. The default is oss.
.TP
.B mixer_device <mixer dev>
This specifies which mixer to use. The default for oss is /dev/mixer;
the default for alsa is "hw:0".
.TP
.B 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".
.TP
.B max_playlist_length <int>
This specifies the maximum number of songs that can be in the playlist. The default is 4096 songs.
.TP
.B audio_buffer_size <size in KB>
This specifies the size of the audio output buffer that mpd uses.  The default is 2048 kilobytes.
.B 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%.
.TP
.B 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".
.TP
.B replaygain <album or track>
This specifies whether to use replaygain tags (currently only supported for FLAC and Ogg Vorbis formats).
.TP
.B max_command_list_size <size in KB>
This specifies the maximum size a command list can be (in kilobytes). The default is 2048 kilobytes.
.TP
.B 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.
.TP
.B 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".
.TP
.B 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 "".
.TP
.B 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.
.TP
.B 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".
.SH EXAMPLES
.TP
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.)
.br

.br
# required
.br
port 			"6600"
.br
music_directory 	"~/mp3"
.br
playlist_directory 	"~/playlists"
.br
log_file 		"~/mpd.log"
.br
error_file 		"~/mpd.error"
.br

.br
# optional
.br
mixer_type              "oss"
.br
mixer_device            "/dev/mixer"
.br
#mixer_control          "Pcm"
.br
# mixer_type is typically "oss", "alsa", or "software"
.br
#mixer_type             "alsa"
.br
#mixer_device           "default"
.br
#mixer_control          "PCM"
.br
# ao_driver is typically "oss" or "alsa09"
.br
#ao_driver              "oss"
.br
#ao_driver_options      "dsp=/dev/dsp"
.br
#audio_write_size       "1024"
.br
max_playlist_length     "4096"
.br
buffer_before_play      "25%"
.br
audio_buffer_size       "2048"
.br
#db_file                "~/playlists/.mpddb"
.br
#state_file             "~/playlists/.mpdstate"
.br
#user                   "shank"
.br
connection_timeout      "60"
.br
max_connections         "5"
.br
max_command_list_size   "2048"
.br
max_output_buffer_size  "2048"
.br
save_absolute_paths_in_playlists "no"
.br
# log_level can be "default", "secure", "verbose"
.br
log_level               "default"
.br
# when bind_to_address is set to "any", MPD binds all available addresses
.br
bind_to_address         "any"
.br
#password               "password@read,add,control,admin"
.br
#default_permissions    "read,add,control,admin"
.br
#filesystem_charset     "UTF-8"
.br
#replaygain		"album"
.SH SEE ALSO
mpc(1)