'\" t .\" Man page generated from reStructuredText. . . .nr rst2man-indent-level 0 . .de1 rstReportMargin \\$1 \\n[an-margin] level \\n[rst2man-indent-level] level margin: \\n[rst2man-indent\\n[rst2man-indent-level]] - \\n[rst2man-indent0] \\n[rst2man-indent1] \\n[rst2man-indent2] .. .de1 INDENT .\" .rstReportMargin pre: . RS \\$1 . nr rst2man-indent\\n[rst2man-indent-level] \\n[an-margin] . nr rst2man-indent-level +1 .\" .rstReportMargin post: .. .de UNINDENT . RE .\" indent \\n[an-margin] .\" old: \\n[rst2man-indent\\n[rst2man-indent-level]] .nr rst2man-indent-level -1 .\" new: \\n[rst2man-indent\\n[rst2man-indent-level]] .in \\n[rst2man-indent\\n[rst2man-indent-level]]u .. .TH "MPC" "1" "Mar 29, 2024" "0.35" "mpc" .SH NAME mpc \- mpc Documentation .SH DESCRIPTION .sp mpc is a command\-line client for the \fI\%Music Player Daemon\fP (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 \(dq\fBmpc status\fP\(dq). .SH SYNOPSIS .INDENT 0.0 .INDENT 3.5 mpc [options] [\-\-] [] .UNINDENT .UNINDENT .sp After \fB\-\-\fP, all parameters are considered to be arguments, not options, even if they start with a dash. .SH OPTIONS .INDENT 0.0 .TP .B \-f, \-\-format Configure the format used to display songs. .sp The metadata delimiters are: .TS center; |l|l|. _ T{ Name T} T{ Description T} _ T{ %name% T} T{ 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. T} _ T{ %artist% T} T{ Artist file tag T} _ T{ %album% T} T{ Album file tag T} _ T{ %albumartist% T} T{ Album Artist file tag T} _ T{ %comment% T} T{ Comment file tag (not enabled by default in \fBmpd.conf\fP\(aqs metadata_to_use) T} _ T{ %composer% T} T{ Composer file tag T} _ T{ %date% T} T{ Date file tag T} _ T{ %originaldate% T} T{ Original Date file tag T} _ T{ %disc% T} T{ Disc file tag T} _ T{ %genre% T} T{ Genre file tag T} _ T{ %performer% T} T{ Performer file tag T} _ T{ %title% T} T{ Title file tag T} _ T{ %track% T} T{ Track file tag T} _ T{ %time% T} T{ Duration of file T} _ T{ %file% T} T{ Path of file, relative to MPD\(aqs \fBmusic_directory\fP variable T} _ T{ %position% T} T{ Queue track number T} _ T{ %id% T} T{ Queue track id number T} _ T{ %prio% T} T{ Priority in the (random) queue. T} _ T{ %mtime% T} T{ Date and time of last file modification T} _ T{ %mdate% T} T{ Date of last file modification T} _ T{ %audioformat% T} T{ The audio format of the song. T} _ .TE .sp The \fB[]\fP operator is used to group output such that if no metadata delimiters are found or matched between \fB[\fP and \fB]\fP, then none of the characters between \fB[\fP and \fB]\fP are output. \fB&\fP and \fB|\fP are logical operators for and and or. \fB#\fP is used to escape characters. Some useful examples for format are: \(dq\fB%file%\fP\(dq and \(dq\fB[[%artist% \- ]%title%]|[%file%]\fP\(dq. This command also takes the following defined escape sequences: .TS center; |l|l|. _ T{ \e T} T{ backslash T} _ T{ \e[ T} T{ left bracket T} _ T{ \e] T} T{ right bracket T} _ T{ \ea T} T{ alert T} _ T{ \eb T} T{ backspace T} _ T{ \ee T} T{ escape T} _ T{ \et T} T{ tab T} _ T{ \en T} T{ newline T} _ T{ \ev T} T{ vertical tab T} _ T{ \ef T} T{ form\-feed T} _ T{ \er T} T{ carriage return T} _ .TE .sp If not given, the value of the environment variable \fI\%MPC_FORMAT\fP is used. .UNINDENT .INDENT 0.0 .TP .B \-\-wait Wait for operation to finish (e.g. database update). .UNINDENT .INDENT 0.0 .TP .B \-\-range=[START]:[END] 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. .UNINDENT .INDENT 0.0 .TP .B \-\-with\-prio Show only songs that have a non\-zero priority. .UNINDENT .INDENT 0.0 .TP .B \-q, \-\-quiet, \-\-no\-status Prevents the current song status from being printed on completion of some of the commands. .UNINDENT .INDENT 0.0 .TP .B \-\-verbose Verbose output. .UNINDENT .INDENT 0.0 .TP .B \-\-host=HOST 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 \fB@\fP (i.e. an abstract socket, Linux only). .sp To use a password, provide a value of the form \(dq\fBpassword@host\fP\(dq. .sp If not given, the value of the environment variable \fI\%MPD_HOST\fP is used. .UNINDENT .INDENT 0.0 .TP .B \-\-port=PORT, \-p PORT The TCP port of the MPD server to connect to. .sp If not given, the value of the environment variable \fI\%MPD_PORT\fP is used. .UNINDENT .INDENT 0.0 .TP .B \-\-partition=PARTITION, \-a PARTITION The partition of the MPD server to operate on. .sp If not given, the default partition is used. .UNINDENT .SH COMMANDS .sp Commands can be used from the least unambiguous prefix (e.g insert or ins). .SS Player Commands .INDENT 0.0 .TP \fBconsume \fP \- Toggle consume mode if state (\fBon\fP or \fBoff\fP) is not specified. .TP \fBcrossfade []\fP \- Gets and sets the current amount of crossfading between songs (\fB0\fP disables crossfading). .TP \fBcurrent [\-\-wait]\fP \- Show the currently playing song. With \fI\%\-\-wait\fP, mpc waits until the song changes (or until playback is started/stopped) before it queries the current song from the server. .UNINDENT .sp \fBqueued\fP \- Show the currently queued (next) song. .INDENT 0.0 .TP \fBmixrampdb []\fP \- 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. \fB\-50.0\fP will effectively remove any gaps, \fB0.0\fP will mash tracks together. The amount of overlap is limited by the audio_buffer_size MPD configuration parameter. .TP \fBmixrampdelay []\fP \- 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). .UNINDENT .sp \fBnext\fP \- Starts playing next song on queue. .sp \fBpause\fP \- Pauses playing. .INDENT 0.0 .TP \fBplay \fP \- Starts playing the song\-number specified. If none is specified, plays number 1. .UNINDENT .sp \fBprev\fP \- Starts playing previous song. .INDENT 0.0 .TP \fBrandom \fP \- Toggle random mode if state (\fBon\fP or \fBoff\fP) is not specified. .TP \fBrepeat \fP \- Toggle repeat mode if state (\fBon\fP or \fBoff\fP) is not specified. .TP \fBreplaygain []\fP \- Sets the replay gain mode. Without arguments, it prints the replay gain mode. .TP \fBsingle \fP \- Toggle single mode if state (\fBon\fP, \fBonce\fP, or \fBoff\fP) is not specified. \fBonce\fP toggles to \fBoff\fP\&. .TP \fBseek [+\-][] or <[+\-]<0\-100>%>\fP \- 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 \fB+\fP or \fB\-\fP is used, the seek is done relative to the current song position. Absolute seeking by default. .TP \fBseekthrough [+\-][]\fP \- Seeks by hour, 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 \fB+\fP is used, the seek is forward. If a \fB\-\fP is used, the seek is backward. Forward seeking by default. .UNINDENT .sp \fBstop\fP \- Stops playing. .INDENT 0.0 .TP \fBtoggle\fP \- Toggles between play and pause. If stopped starts playing. Does not support start playing at song number (use play). .UNINDENT .SS Queue Commands .INDENT 0.0 .TP \fBadd \fP \- Adds a song from the music database to the queue. Can also read input from pipes. Use \(dq\fBmpc add /\fP\(dq to add all files to the queue. .TP \fBinsert \fP \- The insert command works similarly to \fBadd\fP 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. .UNINDENT .sp \fBclear\fP \- Empties the queue. .INDENT 0.0 .TP \fBcrop\fP \- Remove all songs except for the currently playing song. .TP \fBdel \fP \- Removes a queue number from the queue. Can also read input from pipes (\fB0\fP deletes the current playing song). .TP \fBmv, move \fP \- Moves song at position to the position in the queue. .TP \fBsearchplay [ ]...\fP \- Search the queue for a matching song and play it. .UNINDENT .sp \fBshuffle\fP \- Shuffles all songs on the queue. .SS Playlist Commands .INDENT 0.0 .TP \fBload \fP \- Loads as queue. The option \fI\%\-\-range\fP may be used to load only a portion of the file .UNINDENT .sp \fBlsplaylists\fP: \- Lists available playlists. .INDENT 0.0 .TP \fBplaylist []\fP \- Lists all songs in . If no is specified, lists all songs in the current queue. .UNINDENT .sp \fBrm \fP \- Deletes a specific playlist. .sp \fBsave \fP \- Saves playlist as . .INDENT 0.0 .TP \fBaddplaylist \fP \- Adds a song from the music database to the playlist. The playlist will be created if it does not exist. Can also read input from pipes. .TP \fBdelplaylist \fP \- Removes the song at given position from the playlist. Can also read input from pipes. .TP \fBmoveplaylist \fP \- Moves the song at given position to the position in the playlist. .UNINDENT .sp \fBrenplaylist \fP \- Rename a playlist. .sp \fBclearplaylist \fP \- Clear the playlist name (i.e. truncate playlist.m3u). .SS Database Commands .INDENT 0.0 .TP \fBlistall []\fP \- Lists from database. If no \fBfile\fP is specified, lists all songs in the database. .TP \fBls []\fP \- Lists all files/folders in \fBdirectory\fP\&. If no \fBdirectory\fP is specified, lists all files in music directory. .TP \fBlsdirs []\fP \- List subdirectories of \fBdirectory\fP\&. If no \fBdirectory\fP is specified, lists subdirectories in music directory. .TP \fBsearch [ ]...\fP \- 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 \fBsearch \fP \- Searches with a filter expression, .INDENT 7.0 .INDENT 3.5 e.g.: .INDENT 0.0 .INDENT 3.5 .sp .EX mpc search \(aq((artist == \(dqKraftwerk\(dq) AND (title == \(dqMetall auf Metall\(dq))\(aq .EE .UNINDENT .UNINDENT .UNINDENT .UNINDENT .sp Check the \fI\%MPD protocol documentation\fP for details. This syntax can be used with \fBfind\fP and \fBfindadd\fP as well. (Requires libmpdclient 2.16 and MPD 0.21) .TP \fBfind [ ]...\fP \- Same as \fBsearch\fP, but tag values must match \fBquery\fP exactly instead of doing a substring match. .TP \fBfindadd [ ]...\fP \- Same as \fBfind\fP, but add the result to the current queue instead of printing them. .TP \fBlist [ ]... [group ]...\fP \- Return a list of all tags of given tag \fBtype\fP\&. Optional search \fBtype\fP/\fBquery\fP limit results in a way similar to search. Results can be grouped by one or more tags. Example: .INDENT 7.0 .INDENT 3.5 .sp .EX mpc list album group artist .EE .UNINDENT .UNINDENT .UNINDENT .sp \fBstats\fP \- Displays statistics about MPD. .INDENT 0.0 .TP \fBupdate [\-\-wait] []\fP \- Scans for updated files in the music directory. The optional parameter \fBpath\fP (relative to the music directory) may limit the scope of the update. .sp With \fI\%\-\-wait\fP, mpc waits until MPD has finished the update. .TP \fBrescan [\-\-wait] []\fP \- Like update, but also rescans unmodified files. .UNINDENT .SS File Commands .INDENT 0.0 .TP \fBalbumart \fP \- Download album art for the given song and write it to stdout. .TP \fBreadpicture \fP \- Download a picture embedded in the given song and write it to stdout. .UNINDENT .SS Mount Commands .sp \fBmount\fP \- Lists all mounts. .INDENT 0.0 .TP \fBmount \fP \- Create a new mount: mounts a storage on the given path. Example: .INDENT 7.0 .INDENT 3.5 .sp .EX mpc mount server nfs://10.0.0.5/mp3 mpc mount stick udisks://by\-id\-ata\-FOO\-part2 .EE .UNINDENT .UNINDENT .UNINDENT .sp \fBunmount \fP \- Remove a mount. .INDENT 0.0 .TP \fBlistneighbors\fP \- Print a list of \(dqneighors\(dq (i.e. automatically detected storages which can be mounted). This requires \fI\%enabling at least one neighbor plugin\fP in \fBmpd.conf\fP\&. Example: .INDENT 7.0 .INDENT 3.5 .sp .EX $ mpc listneighbors upnp://uuid:01234567\-89ab\-cdef\-0123\-456789abcdef/urn:schemas\-upnp\-org:service:ContentDirectory:1 udisks://by\-id\-dm\-name\-_dev_sdb3 udisks://by\-id\-ata\-FOO\-part2 .EE .UNINDENT .UNINDENT .UNINDENT .SS Sticker Commands .sp The \fBsticker\fP command allows you to get and set song stickers. .INDENT 0.0 .TP \fBsticker set \fP \- Set the value of a song sticker. .TP \fBsticker get \fP \- Print the value of a song sticker. .UNINDENT .sp \fBsticker list\fP \- List all stickers of a song. .sp \fBsticker delete \fP \- Delete a song sticker. .INDENT 0.0 .TP \fBsticker find \fP \- Search for stickers with the specified name, below the specified directory. .UNINDENT .SS Output Commands .INDENT 0.0 .TP \fBvolume [+\-]\fP \- Sets the volume to (0\-100). If \fB+\fP or \fB\-\fP is used, then it adjusts the volume relative to the current volume. .UNINDENT .sp \fBoutputs\fP \- Lists all available outputs .INDENT 0.0 .TP \fBdisable [only] [...]\fP \- Disables the output(s); a list of one or more names or numbers is required. If \fBonly\fP is the first argument, all other outputs are enabled. .TP \fBenable [only] [...]\fP \- Enables the output(s); a list of one or more names or numbers is required. If \fBonly\fP is the first argument, all other outputs are disabled. .TP \fBtoggleoutput [...]\fP \- Changes the status for the given output(s); a list of one or more names or numbers is required. .TP \fBmoveoutput \fP \- Moves the given output to the current partition (see \-\-partition). .UNINDENT .SS Partition Commands .sp \fBpartitions\fP \- Lists all available partitions .sp \fBmakepart [...]\fP \- Creates new partitions .sp \fBdelpart [...]\fP \- Deletes partitions .SS Client\-to\-client Commands .INDENT 0.0 .TP \fBchannels\fP \- List the channels that other clients have subscribed to. .TP \fBsendmessage \fP \- Send a message to the specified channel. .TP \fBwaitmessage \fP \- Wait for at least one message on the specified channel. .TP \fBsubscribe \fP \- Subscribe to the specified channel and continuously receive messages. .UNINDENT .SS Other Commands .INDENT 0.0 .TP \fBidle [events]\fP \- Waits until an event occurs. Prints a list of event names, one per line. See the MPD protocol documentation for further information. .sp If you specify a list of events, only these events are considered. .TP \fBidleloop [events]\fP \- Similar to \fBidle\fP, but re\-enters \(dqidle\(dq state after events have been printed. .sp If you specify a list of events, only these events are considered. .TP \fBstatus [format]\fP \- Without an argument print a three line status output equivalent to \(dqmpc\(dq with no arguments. If a format string is given then the delimiters are processed exactly as how they are for metadata. See the \(aq\-f\(aq option in \fI\%Options\fP .TS center; |l|l|. _ T{ Name T} T{ Description T} _ T{ %totaltime% T} T{ The total duration of the song. T} _ T{ %currenttime% T} T{ The time that the client is currently at. T} _ T{ %percenttime% T} T{ The percentage of time elapsed for the current song. T} _ T{ %songpos% T} T{ The position of the current song within the playlist. T} _ T{ %length% T} T{ The number of songs within the playlist T} _ T{ %state% T} T{ Either \(aqplaying\(aq, \(aqpaused\(aq or \(aqstopped\(aq T} _ T{ %volume% T} T{ The current volume spaced out to 4 characters including a percent sign T} _ T{ %random% T} T{ Current status of random mode. \(aqon\(aq or \(aqoff\(aq T} _ T{ %repeat% T} T{ Current status of repeat mode. \(aqon\(aq or \(aqoff\(aq T} _ T{ %single% T} T{ Current status of single mode. \(aqon\(aq, \(aqonce\(aq, or \(aqoff\(aq T} _ T{ %consume% T} T{ Current status of consume mode. \(aqon\(aq or \(aqoff\(aq T} _ T{ %kbitrate% T} T{ The bit rate in kbps for the current song. T} _ T{ %audioformat% T} T{ The audio format which MPD is currently playing as \(aqsamplerate:bits:channels\(aq. T} _ T{ %samplerate% T} T{ The sample rate in Hz extracted from the current MPD audio format. T} _ T{ %bits% T} T{ The number of significant bits per sample size extracted from the current MPD audio format. T} _ T{ %channels% T} T{ The number of channels extracted from the current MPD audio format. T} _ .TE .TP \fBversion\fP \- Reports the version of the protocol spoken, not the real version of the daemon. .UNINDENT .SH ENVIRONMENT VARIABLES .sp All environment variables are overridden by any values specified via command line switches. .INDENT 0.0 .TP .B MPC_FORMAT Configure the format used to display songs. See option \fI\%\-\-format\fP\&. .UNINDENT .INDENT 0.0 .TP .B MPD_HOST The MPD server to connect to. See option \fI\%\-\-host\fP\&. .UNINDENT .INDENT 0.0 .TP .B MPD_PORT The TCP port of the MPD server to connect to. See option \fI\%\-\-port\fP\&. .UNINDENT .SH BUGS .sp Report bugs on \fI\%https://github.com/MusicPlayerDaemon/mpc/issues\fP .sp 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\(aqre 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 .sp \fBmpd(1)\fP .SH AUTHOR .sp See \fI\%https://raw.githubusercontent.com/MusicPlayerDaemon/mpc/master/AUTHORS\fP .SH AUTHOR Max Kellermann .SH COPYRIGHT Copyright 2003-2021 The Music Player Daemon Project .\" Generated by docutils manpage writer. .