1Music Player Command(1)     General Commands Manual    Music Player Command(1)
2
3
4

NAME

6       mpc - Program for controlling Music Player Daemon (MPD)
7

SYNOPSIS

9       mpc [options] <command> [<arguments>]
10

DESCRIPTION

12       mpc  is  a  client for MPD, the Music Player Daemon.  mpc connects to a
13       MPD and controls it according to commands and arguments passed  to  it.
14       If  no  command  is  given, the current status is printed (same as 'mpc
15       status').
16

OPTIONS

18       -f,--format
19              Configure  the  format  of  song  display  for  status  and  the
20              playlist.   The  metadata  delimiters  are "%name%", "%artist%",
21              "%album%", "%title%", "%track%", "%time%", and "%file%".  The []
22              operator is used to group output such that if no metadata delim‐
23              iters are found or matched between '[' and ']', then none of the
24              characters between '[' and ']' are output.  '&' and '|' are log‐
25              ical operators for and and or.  '#' is used  to  escape  charac‐
26              ters.   Some  useful  examples  for  format  are:  "%file%"  and
27              "[[%artist% - ]%title%]|[%file%]".  This command also takes  the
28              following defined escape sequences:
29              \\ - backslash
30              \a - alert
31              \b - backspace
32              \t - tab
33              \n - newline
34              \v - vertical tab
35              \f - form-feed
36              \r - carriage return
37
38       --wait
39              Wait for operation to finish (e.g. database update).
40
41       -q,--quiet,--no-status
42              Prevents  the  current song status from being printed on comple‐
43              tion of some of the commands.
44
45       -v,--verbose
46              Verbose output.
47
48       -h,--host
49              The host to connect to; if not given, the value of the  environ‐
50              ment  variable  MPD_HOST  is checked before defaulting to local‐
51              host.  This default can be changed at compile-time.
52
53              To use a password, provide a value of the form "password@host".
54
55              If you specify an absolute path, mpc attempts a  connection  via
56              Unix Domain Socket.
57
58       -p,--port
59              The  port to connect to; if not given, the value of the environ‐
60              ment variable MPD_PORT is checked  before  defaulting  to  6600.
61              This default can be changed at compile-time.
62

COMMANDS

64       add <file>
65              Adds  a  song  from the music database to the playlist. Can also
66              read input from pipes. Use "mpc ls | mpc add" to add  all  files
67              to the playlist.
68
69       clear  Empties playlist.
70
71       crop   Remove all songs except for the currently playing song.
72
73       current
74              Show the currently playing song
75
76       crossfade [<seconds>]
77              Gets and sets the current amount of crossfading between songs (0
78              disables crossfading).
79
80       del <songpos>
81              Removes a playlist number from the playlist. Can also read input
82              from pipes (0 deletes the current playing song).
83
84       disable <output #>
85              Disables the output, number is required.
86
87       enable <output #>
88              Enables the output, number is required.
89
90       idle [events]
91              Waits  until an event occurs.  Prints a list of event names, one
92              per line.  See the MPD protocol documentation for further infor‐
93              mation.
94
95              If  you  specify a list of events, only these events are consid‐
96              ered.
97
98       idleloop [events]
99              Similar to "idle", but re-enters "idle" state after events  have
100              been printed.
101
102              If  you  specify a list of events, only these events are consid‐
103              ered.
104
105       listall [<file>]
106              Lists <file> from playlist. If no <file> is specified, lists all
107              songs.
108
109       load <file>
110              Loads <file> as playlist.
111
112       ls [<directory>]
113              Lists  all  files/folders  in  <directory>. If no <directory> is
114              specified, lists all files in music directory.
115
116       lsplaylists
117              Lists available playlists.
118
119       move <from> <to>
120              Moves song at position  <from>  to  the  position  <to>  in  the
121              playlist.
122
123       next   Starts playing next song on playlist.
124
125       outputs
126              Lists all available outputs
127
128       pause  Pauses playing.
129
130       play <position>
131              Starts  playing the song-number specified. If none is specified,
132              plays number 1.
133
134       playlist
135              Prints entire playlist.
136
137       prev   Starts playing previous song.
138
139       random <on|off>
140              Toggle random mode if state ("on" or "off") is not specified.
141
142       repeat <on|off>
143              Toggle repeat mode if state ("on" or "off") is not specified.
144
145       replaygain [<off|track|album>]
146              Sets the replay gain mode.  Without  arguments,  it  prints  the
147              replay gain mode.
148
149       single <on|off>
150              Toggle single mode if state ("on" or "off") is not specified.
151
152       consume <on|off>
153              Toggle consume mode if state ("on" or "off") is not specified.
154
155       rm <file>
156              Deletes a specific playlist.
157
158       save <file>
159              Saves playlist as <file>.
160
161       search <type> <query> [<type> <query>]...
162              Searches  for songs where all of the given tag <type>s match the
163              given <query>s.  Any number of tag type and  query  combinations
164              can be specified.  Possible tag types are: artist, album, title,
165              track, name, genre, date, composer,  performer,  comment,  disc,
166              filename, or any (to match any tag).
167
168       find <type> <query> [<type> <query>]...
169              Same as search, but match <query>s exactly.
170
171       findadd <type> <query> [<type> <query>]...
172              Same as find, but add the result to the current playlist instead
173              of printing them.
174
175       list <type> [<type> <query>]...
176              Return a list of all tags of given tag <type>.  Optional  search
177              <type>s/<query>s limit results in a way similar to search.
178
179       seek [+-][<HH:MM:SS>] or <[+-]<0-100>%>
180              Seeks  by hour, minute or seconds, hours or minutes can be omit‐
181              ted.  If seeking by percentage, seeks within the current song in
182              the specified manner.  If a "+" or "-" is used, the seek is done
183              relative to the  current  song  position.  Absolute  seeking  by
184              default.
185
186       shuffle
187              Shuffles all songs on the playlist.
188
189       stats  Displays statistics about MPD.
190
191       stop   Stops playing.
192
193       toggle Toggles  between play and pause. If stopped starts playing. Does
194              not support start playing at song number (use play).
195
196       update [--wait] [<path>]
197              Scans music directory for updates if no <path> is specified.  If
198              one  or more <path>'s are specified, scans only those path's for
199              updates.  Can take input from a pipe.
200
201              With --wait, mpc waits until MPD has finished the update.
202
203       version
204              Reports the version of MPD.
205
206       volume [+-]<num>
207              Sets the volume to <num> (0-100).  If "+" or "-" is  used,  then
208              it adjusts the volume relative to the current volume.
209

EXAMPLES

211       For  useful  examples  of  mpc  use  in  playlist parsing, see mpd-m3u-
212       playlist.sh and mpd-pls-playlist.sh.
213

BUGS

215       Report bugs on http://www.musicpd.org/mantis/
216

NOTE

218       Since MPD uses UTF-8, mpc needs to convert characters  to  the  charset
219       used  by  the local system. If you get character conversion errors when
220       you're running mpc you probably need to set up  your  locale.  This  is
221       done  by  setting any of the LC_CTYPE, LANG or LC_ALL environment vari‐
222       ables (LC_CTYPE only affects character handling).
223

SEE ALSO

225       mpd(1)
226

AUTHOR

228       See http://git.musicpd.org/cgit/master/mpc.git/plain/AUTHORS
229
230
231
232                                                       Music Player Command(1)
Impressum