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").
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.
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.
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).
queued - Show the currently queued (next) song.
next - Starts playing next song on queue.
pause - Pauses playing.
prev - Starts playing previous song.
stop - Stops playing.
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.
rm <file> - Deletes a specific playlist.
save <file> - Saves playlist as <file>.
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)
stats - Displays statistics about MPD.
With --wait, mpc waits until MPD has finished the update.
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.
outputs - Lists all available outputs
If you specify a list of events, only these events are considered.
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.
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).
See https://raw.githubusercontent.com/MusicPlayerDaemon/mpc/master/AUTHORS
Max Kellermann
Copyright 2003-2018 The Music Player Daemon Project
November 7, 2019 | 0.33 |