DOKK / manpages / debian 10 / mpc / mpc.1.en
MPC(1) mpc MPC(1)

mpc - mpc Documentation

mpc is a command-line client for the Music Player Daemon (MPD). It 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").

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


Configure the format used to display songs.

The metadata delimiters are:

Name Description
%name% A name for this song. This is not the song title. The exact meaning of this tag is not well-defined. It is often used by badly configured internet radio stations with broken tags to squeeze both the artist name and the song title in one tag.
%artist% Artist file tag
%album% Album file tag
%albumartist% Album Artist file tag
%comment% Comment file tag (not enabled by default in mpd.conf's metadata_to_use)
%composer% Composer file tag
%date% Date file tag
%originaldate% Original Date file tag
%disc% Disc file tag
%genre% Genre file tag
%performer% Performer file tag
%title% Title file tag
%track% Track file tag
%time% Duration of file
%file% Path of file, relative to MPD's music_directory variable
%position% Queue track number
%id% Queue track id number
%prio% Priority in the (random) queue.
%mtime% Date and time of last file modification
%mdate% Date of last file modification

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:

\ backslash
\[ left bracket
\] right bracket
\a alert
\b backspace
\e escape
\t tab
\n newline
\v vertical tab
\f form-feed
\r carriage return

If not given, the value of the environment variable MPC_FORMAT is used.


Wait for operation to finish (e.g. database update).

Operate on a range (e.g. when loading a playlist). START is the first index of the range, END is the first index after the range (i.e. excluding). START and END may be omitted, making the range open to that end. Indexes start with zero.

Prevents the current song status from being printed on completion of some of the commands.

Verbose output.

The MPD server to connect to. This can be a hostname, IPv4/IPv6 address, an absolute path (i.e. local socket) or a name starting with @ (i.e. an abstract socket, Linux only).

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

If not given, the value of the environment variable MPD_HOST is used.


The TCP port of the MPD server to connect to.

If not given, the value of the environment variable MPD_PORT is used.


Commands can be used from the least unambiguous prefix (e.g insert or ins).

or off) is not specified.
crossfading between songs (0 disables crossfading).
--wait, mpc waits until the song changes (or until playback is started/stopped) before it queries the current song from the server.

queued - Show the currently queued (next) song.

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.
of extra delay added to the value computed from the MixRamp tags. (A negative value disables overlapping with MixRamp tagqs and restores the previous value of crossfade).

next - Starts playing next song on queue.

pause - Pauses playing.

specified. If none is specified, plays number 1.

prev - Starts playing previous song.

or off) is not specified.
or off) is not specified.
Without arguments, it prints the replay gain mode.
or off) is not specified.
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.
minute or seconds, hours or minutes can be omitted, relatively to the current position. If the duration exceeds the limit of the current song, the seek command proceeds to seek through the playlist until the duration is reached. If a + is used, the seek is forward. If a - is used, the seek is backward. Forward seeking by default.

stop - Stops playing.

playing. Does not support start playing at song number (use play).

queue. Can also read input from pipes. Use "mpc add /" to add all files to the queue.
add except it adds song(s) after the currently playing one, rather than at the end. When random mode is enabled, the new song is queued after the current song.

clear - Empties the queue.


shuffle - Shuffles all songs on the queue.

load <file> - Loads <file> as queue. The option --range may be used to load only a portion of the file (requires libmpdclient 2.16).

lsplaylists: - Lists available playlists.

no <playlist> is specified, lists all songs in the current queue.

rm <file> - Deletes a specific playlist.

save <file> - Saves playlist as <file>.

<file> is specified, lists all songs in the database.
<directory>. If no <directory> is specified, lists all files in music directory.
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).

search <expression> - Searches with a filter expression, e.g. mpc search '((artist == "Kraftwerk") AND (title == "Metall auf Metall"))'. Check the MPD protocol documentation for details. This syntax can be used with find andd findadd as well. (Requires libmpdclient 2.16 and MPD 0.21)

but tag values must match <query>s exactly instead of doing a substring match.
but add the result to the current queue instead of printing them.
of given tag <type>. Optional search <type>s/<query>s limit results in a way similar to search.

stats - Displays statistics about MPD.

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.

unmodified files.

mount - Lists all mounts.

mount <uri> <storage> - Create a new mount.

unmount <uri> - Remove a mount.

The sticker command allows you to get and set song stickers.


sticker <file> list - List all stickers of a song.

sticker <file> delete <key> - Delete a song sticker.

specified name, below the specified directory.

+ or - is used, then it adjusts the volume relative to the current volume.

outputs - Lists all available outputs

output(s); a list of one or more names or numbers is required. If "only" is the first argument, all other outputs are enabled.
output(s); a list of one or more names or numbers is required. If "only" is the first argument, all other outputs are disabled.
status for the given output(s); a list of one or more names or numbers is required.


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.

re-enters "idle" state after events have been printed.

If you specify a list of events, only these events are considered.


version - Reports the version of MPD.

All environment variables are overridden by any values specified via command line switches.

Configure the format used to display songs. See option --format.

The MPD server to connect to. See option --host.

The TCP port of the MPD server to connect to. See option --port.

Report bugs on https://github.com/MusicPlayerDaemon/mpc/issues

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).

mpd(1)

See https://raw.githubusercontent.com/MusicPlayerDaemon/mpc/master/AUTHORS

Max Kellermann

Copyright 2003-2018 The Music Player Daemon Project

January 7, 2019 0.31