cruxports/mpc/mpc.1

611 lines
14 KiB
Groff

.\" Man page generated from reStructuredText.
.
.TH "MPC" "1" "Nov 30, 2021" "0.34" "mpc"
.SH NAME
mpc \- mpc Documentation
.
.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
..
.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 "\fBmpc status\fP").
.SH SYNOPSIS
.INDENT 0.0
.INDENT 3.5
mpc [options] <command> [<arguments>]
.UNINDENT
.UNINDENT
.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}
_
.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: "\fB%file%\fP" and
"\fB[[%artist% \- ]%title%]|[%file%]\fP". 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 \-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
"\fBpassword@host\fP".
.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
.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 <on|off>\fP \- Toggle consume mode if state (\fBon\fP
or \fBoff\fP) is not specified.
.TP
\fBcrossfade [<seconds>]\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 [<db>]\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 [<seconds>]\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
tagqs 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 <position>\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 <on|off>\fP \- Toggle random mode if state (\fBon\fP
or \fBoff\fP) is not specified.
.TP
\fBrepeat <on|off>\fP \- Toggle repeat mode if state (\fBon\fP
or \fBoff\fP) is not specified.
.TP
\fBreplaygain [<off|track|album>]\fP \- Sets the replay gain mode.
Without arguments, it prints the replay gain mode.
.TP
\fBsingle <on|off>\fP \- Toggle single mode if state (\fBon\fP
or \fBoff\fP) is not specified.
.TP
\fBseek [+\-][<HH:MM:SS>] 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 [+\-][<HH:MM:SS>]\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 <file>\fP \- Adds a song from the music database to the
queue. Can also read input from pipes. Use "\fBmpc add /\fP" to
add all files to the queue.
.TP
\fBinsert <file>\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 <songpos>\fP \- Removes a queue number from the queue. Can
also read input from pipes (\fB0\fP deletes the current playing
song).
.TP
\fBmv, move <from> <to>\fP \- Moves song at position <from> to the
position <to> in the queue.
.TP
\fBsearchplay <type> <query> [<type> <query>]...\fP \- Search the
queue for a matching song and play it.
.UNINDENT
.sp
\fBshuffle\fP \- Shuffles all songs on the queue.
.SS Playlist Commands
.sp
\fBload <file>\fP \- Loads <file> as queue. The option
\fI\%\-\-range\fP may be used to load only a portion of the file
(requires libmpdclient 2.16).
.sp
\fBlsplaylists\fP: \- Lists available playlists.
.INDENT 0.0
.TP
\fBplaylist [<playlist>]\fP \- Lists all songs in <playlist>. If
no <playlist> is specified, lists all songs in the current queue.
.UNINDENT
.sp
\fBrm <file>\fP \- Deletes a specific playlist.
.sp
\fBsave <file>\fP \- Saves playlist as <file>.
.SS Database Commands
.INDENT 0.0
.TP
\fBlistall [<file>]\fP \- Lists <file> from database. If no
<file> is specified, lists all songs in the database.
.TP
\fBls [<directory>]\fP \- Lists all files/folders in
<directory>. If no <directory> is specified, lists all files in
music directory.
.TP
\fBsearch <type> <query> [<type> <query>]...\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).
.UNINDENT
.sp
\fBsearch <expression>\fP \- Searches with a filter expression,
e.g. \fBmpc search \(aq((artist == "Kraftwerk") AND (title == "Metall auf
Metall"))\(aq\fP\&. Check the \fI\%MPD protocol documentation\fP for
details. This syntax can be used with \fBfind\fP andd
\fBfindadd\fP as well. (Requires libmpdclient 2.16 and MPD 0.21)
.INDENT 0.0
.TP
\fBfind <type> <query> [<type> <query>]...\fP \- Same as search,
but tag values must match <query>s exactly instead of doing a
substring match.
.TP
\fBfindadd <type> <query> [<type> <query>]...\fP \- Same as find,
but add the result to the current queue instead of printing them.
.TP
\fBlist <type> [<type> <query>]...\fP \- Return a list of all tags
of given tag <type>. Optional search <type>s/<query>s limit
results in a way similar to search.
.UNINDENT
.sp
\fBstats\fP \- Displays statistics about MPD.
.INDENT 0.0
.TP
\fBupdate [\-\-wait] [<path>]\fP \- Scans for updated files in the
music directory. The optional parameter <path> (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] [<path>]\fP \- Like update, but also rescans
unmodified files.
.UNINDENT
.SS Mount Commands
.sp
\fBmount\fP \- Lists all mounts.
.sp
\fBmount <uri> <storage>\fP \- Create a new mount.
.sp
\fBunmount <uri>\fP \- Remove a mount.
.SS Sticker Commands
.sp
The \fBsticker\fP command allows you to get and set song
stickers.
.INDENT 0.0
.TP
\fBsticker <file> set <key> <value>\fP \- Set the value of a song
sticker.
.TP
\fBsticker <file> get <key>\fP \- Print the value of a song
sticker.
.UNINDENT
.sp
\fBsticker <file> list\fP \- List all stickers of a song.
.sp
\fBsticker <file> delete <key>\fP \- Delete a song sticker.
.INDENT 0.0
.TP
\fBsticker <dir> find <key>\fP \- Search for stickers with the
specified name, below the specified directory.
.UNINDENT
.SS Output Commands
.INDENT 0.0
.TP
\fBvolume [+\-]<num>\fP \- Sets the volume to <num> (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] <output # or name> [...]\fP \- Disables the
output(s); a list of one or more names or numbers is
required. If "only" is the first argument, all other outputs
are enabled.
.TP
\fBenable [only] <output # or name> [...]\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 <output # or name> [...]\fP \- Changes the
status for the given output(s); a list of one or more names or
numbers is required.
.UNINDENT
.SS Client\-to\-client Commands
.INDENT 0.0
.TP
\fBchannels\fP \- List the channels that other clients have
subscribed to.
.TP
\fBsendmessage <channel> <message>\fP \- Send a message to the
specified channel.
.TP
\fBwaitmessage <channel>\fP \- Wait for at least one message on
the specified channel.
.TP
\fBsubscribe <channel>\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 "idle" state after events have been printed.
.sp
If you specify a list of events, only these events are considered.
.UNINDENT
.sp
\fBversion\fP \- Reports the version of MPD.
.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-2018 The Music Player Daemon Project
.\" Generated by docutils manpage writer.
.