Format specifiers


If no format specifier is set, mpc will attempt to use a sensible default. A format string is composed of %prop tuples, where prop is a metadata property returned by mpv. When mpc has not received any metadata about a file, it will display the filename (minus the extension and the dot).


%prop{tag present}{audio file}{video file}

Expands to the text as decoded by format string X if the tag was present, and optionally if the tag was not present, whether the file was an audio or video file. Files without an audio or video track will be decoded to nothing. For example %author{# - }{Unknown - }{} will expand to "John Doe - " when a music file specifies who the author is, "Unknown - " when a music file does not specify who the author is, and nothing when a video file does not specify who the author is (as would be the expected case for most video files). If the second and/or third pair of {} are not specified, they will be parsed as if they were empty.


Format string X


#

A special character that expands to whatever the current property may be. Nothing if there is no current property or the current property is empty.


##

Expands to a hash sign.


$

A special character which expands to the filename (minus the extension and the dot). Useful for when no or insufficient metadata is present.


$$

Expands to a dollar sign


Useful metadata properties


album

author

date

genre

title

track