File: mpc.1

package info (click to toggle)
mpc 0.26-1
  • links: PTS, VCS
  • area: main
  • in suites: jessie, jessie-kfreebsd
  • size: 760 kB
  • ctags: 323
  • sloc: ansic: 3,046; sh: 1,541; makefile: 45
file content (286 lines) | stat: -rw-r--r-- 9,341 bytes parent folder | download
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
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
.TH "Music Player Command" 1
.SH "NAME"
mpc \- Program for controlling Music Player Daemon (MPD)
.SH "SYNOPSIS"
.B mpc
.RI [ options ]
.I <command>
.RI [ <arguments> ]
.SH "DESCRIPTION"
mpc is a client for MPD, the Music Player Daemon.  mpc connects to a MPD and
controls it according to commands and arguments passed to it.  If no command
is given, the current status is printed (same as 'mpc status').
.SH "OPTIONS"
.TP
.BI \-f,\-\-format
.br
Configure the format of song display for status and the playlist.  The metadata delimiters are:

.br
%name%         Unknown (doesn't produce output)
.br
%artist%       Artist file tag
.br
%album%        Album file tag
.br
%albumartist%  Album Artist file tag
.br
%comment%      Comment file tag (not enabled by default in mpd.conf's metadata_to_use)
.br
%composer%     Composer file tag
.br
%date%         Date file tag
.br
%disc%         Disc file tag
.br
%genre%        Genre file tag
.br
%performer%    Performer file tag
.br
%title%        Title file tag
.br
%track%        Track file tag
.br
%time%         Duration of file
.br
%file%         Path of file, relative to mpd's `music_directory` variable
.br
%position%     Playlist track number
.br

The [] operator is used to group output such that if no metadata delimiters are found or matched between '[' and ']', then none of the characters between '[' and ']' are output.  '&' and '|' are logical operators for and and or.  '#' is used to escape characters.  Some useful examples for format are: "%file%" and "[[%artist% - ]%title%]|[%file%]".
This command also takes the following defined escape sequences:

.br
\\\\ - backslash
.br
\\[ - left bracket
.br
\\] - right bracket
.br
\\a - alert
.br
\\b - backspace
.br
\\t - tab
.br
\\n - newline
.br
\\v - vertical tab
.br
\\f - form-feed
.br
\\r - carriage return
.TP
.BI \-\-wait
.br
Wait for operation to finish (e.g. database update).
.TP
.BI \-q,\-\-quiet,\-\-no\-status
.br
Prevents the current song status from being printed on completion of some of
the commands.
.TP
.BI \-v,\-\-verbose
.br
Verbose output.
.TP
.BI \-h,\-\-host
The host to connect to; if not given, the value of the environment variable MPD_HOST is checked before defaulting to localhost.  This default can be changed at compile-time.

To use a password, provide a value of the form "password@host".

If you specify an absolute path, mpc attempts a connection via Unix Domain Socket.
.TP
.BI \-p,\-\-port
The port to connect to; if not given, the value of the environment variable MPD_PORT is checked before defaulting to 6600.  This default can be changed at compile-time.
.br
.SH COMMANDS
.TP
.B add <file>
Adds a song from the music database to the playlist. Can also read input from pipes. Use "mpc ls | mpc add" to add all files to the playlist.
.TP
.B insert <file>
The insert command works similarly to
.B add
except it adds song(s) after the currently playing one, rather than at the end.
.TP
.B clear
Empties playlist.
.TP
.B crop
Remove all songs except for the currently playing song.
.TP
.B current [\-\-wait]
Show the currently playing song

With \-\-wait, mpc waits until the song changes (or until playback is
started/stopped) before it queries the current song from the server.
.TP
.B crossfade [<seconds>]
Gets and sets the current amount of crossfading between songs (0 disables crossfading).
.TP
.B mixrampdb [<db>]
Gets and sets the volume level at which songs with MIXRAMP tags will be overlapped. This disables the fading of the crossfade command and simply mixes the songs. \-50.0 will effectively remove any gaps, 0.0 will mash tracks together. The amount of overlap is limited by the audio_buffer_size MPD configuration parameter.
.TP
.B mixrampdelay [<seconds>]
Gets and sets the current amount of extra delay added to the value computed from the MIXRAMP tags. (A negative value disables overlapping with MIXRAMP tags and restores the previous value of crossfade).
.TP
.B del <songpos>
Removes a playlist number from the playlist. Can also read input from pipes (0 deletes the current playing song).
.TP
.B disable [only] <output # or name> [...]
Disables the output(s); a list of one or more names or numbers is required. If "only" is the first argument, all other outputs are enabled.
.TP
.B enable [only] <output # or name> [...]
Enables the output(s); a list of one or more names or numbers is required. If "only" is the first argument, all other outputs are disabled.
.TP
.B idle [events]
Waits until an event occurs.  Prints a list of event names, one per
line.  See the MPD protocol documentation for further information.

If you specify a list of events, only these events are considered.
.TP
.B idleloop [events]
Similar to "idle", but re-enters "idle" state after events have been
printed.

If you specify a list of events, only these events are considered.
.TP
.B listall [<file>]
Lists <file> from playlist. If no <file> is specified, lists all songs.
.TP
.B load <file>
Loads <file> as playlist.
.TP
.B ls [<directory>]
Lists all files/folders in <directory>. If no <directory> is specified, lists all files in music directory.
.TP
.B lsplaylists
Lists available playlists.
.TP
.B mv, move <from> <to>
Moves song at position <from> to the position <to> in the playlist.
.TP
.B next
Starts playing next song on playlist.
.TP
.B outputs
Lists all available outputs
.TP
.B pause
Pauses playing.
.TP
.B play <position>
Starts playing the song-number specified. If none is specified, plays number 1.
.TP
.B playlist [<playlist>]
Lists all songs in <playlist>. If no <playlist> is specified, lists all songs
in the current playlist.
.TP
.B prev
Starts playing previous song.
.TP
.B random <on|off>
Toggle random mode if state ("on" or "off") is not specified.
.TP
.B repeat <on|off>
Toggle repeat mode if state ("on" or "off") is not specified.
.TP
.B replaygain [<off|track|album>]
Sets the replay gain mode.  Without arguments, it prints the replay
gain mode.
.TP
.B single <on|off>
Toggle single mode if state ("on" or "off") is not specified.
.TP
.B consume <on|off>
Toggle consume mode if state ("on" or "off") is not specified.
.TP
.B rm <file>
Deletes a specific playlist.
.TP
.B save <file>
Saves playlist as <file>.
.TP
.B search <type> <query> [<type> <query>]...
Searches for substrings in song tags.
Any number of tag type and query combinations can be specified.  Possible tag
types are: artist, album, title, track, name, genre, date, composer, performer,
comment, disc, filename, or any (to match any tag).
.TP
.B find <type> <query> [<type> <query>]...
Same as search, but tag values must match <query>s exactly instead of
doing a substring match.
.TP
.B findadd <type> <query> [<type> <query>]...
Same as find, but add the result to the current playlist instead of
printing them.
.TP
.B list <type> [<type> <query>]...
Return a list of all tags of given tag <type>.  Optional search
<type>s/<query>s limit results in a way similar to search.
.TP
.B seek [+\-][<HH:MM:SS>] or <[+\-]<0-100>%>
Seeks by hour, minute or seconds, hours or minutes can be omitted.
If seeking by percentage, seeks within the current song in the specified manner.  If a "+" or "\-" is used, the seek is done relative to the current song position. Absolute seeking by default.
.TP
.B shuffle
Shuffles all songs on the playlist.
.TP
.B stats
Displays statistics about MPD.
.TP
.B stop
Stops playing.
.TP
.B toggle
Toggles between play and pause. If stopped starts playing. Does not support start playing at song number (use play).
.TP
.B update [\-\-wait] [<path>]
Scans for updated files in the music directory.  The optional
parameter <path> (relative to the music directory) may limit the scope
of the update.

With \-\-wait, mpc waits until MPD has finished the update.
.TP
.B version
Reports the version of MPD.
.TP
.B volume [+\-]<num>
Sets the volume to <num> (0-100).  If "+" or "\-" is used, then it adjusts
the volume relative to the current volume.
.TP
.B channels
List the channels that other clients have subscribed to.
.TP
.B sendmessage <channel> <message>
Send a message to the specified channel.
.TP
.B waitmessage <channel>
Wait for at least one message on the specified channel.
.TP
.B subscribe <channel>>
Subscribe to the specified channel and continuously receive messages.
.SH "ENVIRONMENT VARIABLES"
All environment variables are overridden by any values specified via command line switches.
.IP MPD_HOST
Specifies the hostname of the mpd server.  This can be a hostname, IP address or an absolute path.  If it is an absolute path, mpc will use Unix Domain Sockets instead of TCP/IP.

If the server requires a password, it can be specified using password@host in the MPD_HOST variable.
.IP MPD_PORT
Specifies the port the mpd server is listening on.
.SH "EXAMPLES"
.TP
.br
For useful examples of mpc use in playlist parsing, see mpd\-m3u\-playlist.sh and mpd\-pls\-playlist.sh.
.br
.SH "BUGS"
Report bugs on http://bugs.musicpd.org/
.SH "NOTE"
Since MPD uses UTF\-8, mpc needs to convert characters to the
charset used by the local system. If you get character conversion errors when you're running mpc you probably need to set up your locale. This is done by setting any of the LC_CTYPE, LANG or LC_ALL environment variables (LC_CTYPE only affects character handling).
.SH "SEE ALSO"
mpd(1)
.SH "AUTHOR"
See http://git.musicpd.org/cgit/master/mpc.git/plain/AUTHORS