.\" Man page generated from reStructuredText. . .TH MPV 1 "" "" "multimedia" .SH NAME mpv \- a media player . .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 SYNOPSIS .nf \fBmpv\fP [options] [file|URL|\-] \fBmpv\fP [options] \-\-playlist=PLAYLIST \fBmpv\fP [options] files .fi .sp .SH DESCRIPTION .sp \fBmpv\fP is a media player based on MPlayer and mplayer2. It supports a wide variety of video file formats, audio and video codecs, and subtitle types. Special input URL types are available to read input from a variety of sources other than disk files. Depending on platform, a variety of different video and audio output methods are supported. .sp Usage examples to get you started quickly can be found at the end of this man page. .SH INTERACTIVE CONTROL .sp mpv has a fully configurable, command\-driven control layer which allows you to control mpv using keyboard, mouse, joystick or remote control (with LIRC). See the \fB\-\-input\-\fP options for ways to customize it. .SS Keyboard Control .INDENT 0.0 .TP .B LEFT and RIGHT Seek backward/forward 5 seconds. Shift+arrow does a 1 second exact seek (see \fB\-\-hr\-seek\fP). .TP .B UP and DOWN Seek forward/backward 1 minute. Shift+arrow does a 5 second exact seek (see \fB\-\-hr\-seek\fP). .TP .B [ and ] Decrease/increase current playback speed by 10%. .TP .B { and } Halve/double current playback speed. .TP .B BACKSPACE Reset playback speed to normal. .TP .B < and > Go backward/forward in the playlist. .TP .B ENTER Go forward in the playlist, even over the end. .TP .B p / SPACE Pause (pressing again unpauses). .TP .B \&. Step forward. Pressing once will pause, every consecutive press will play one frame and then go into pause mode again. .UNINDENT .INDENT 0.0 .TP .B , Step backward. Pressing once will pause, every consecutive press will play one frame in reverse and then go into pause mode again. .TP .B q Stop playing and quit. .TP .B Q Like \fBq\fP, but store the current playback position. Playing the same file later will resume at the old playback position if possible. .TP .B / and * Decrease/increase volume. .TP .B 9 and 0 Decrease/increase volume. .TP .B m Mute sound. .TP .B _ Cycle through the available video tracks. .TP .B # Cycle through the available audio tracks. .TP .B f Toggle fullscreen (see also \fB\-\-fs\fP). .TP .B ESC Exit fullscreen mode. .TP .B T Toggle stay\-on\-top (see also \fB\-\-ontop\fP). .TP .B w and e Decrease/increase pan\-and\-scan range. .TP .B o (also P) Show progression bar, elapsed time and total duration on the OSD. .TP .B O Toggle OSD states: none / seek / seek + timer / seek + timer + total time. .TP .B d Toggle frame dropping states: none / skip display / skip decoding (see \fB\-\-framedrop\fP). .TP .B v Toggle subtitle visibility. .TP .B j and J Cycle through the available subtitles. .TP .B x and z Adjust subtitle delay by +/\- 0.1 seconds. .TP .B Ctrl + and Ctrl \- Adjust audio delay by +/\- 0.1 seconds. .TP .B V Toggle subtitle VSFilter aspect compatibility mode. See \fB\-\-ass\-vsfilter\-aspect\-compat\fP for more info. .TP .B r and t Move subtitles up/down. .TP .B s Take a screenshot. .TP .B S Take a screenshot, without subtitles. (Whether this works depends on VO driver support.) .TP .B I Show filename on the OSD. .TP .B PGUP and PGDWN Seek to the beginning of the previous/next chapter. In most cases, "previous" will actually go to the beginning of the current chapter; see \fB\-\-chapter\-seek\-threshold\fP\&. .TP .B Shift+PGUP and Shift+PGDWN Seek backward or forward by 10 minutes. (This used to be mapped to PGUP/PGDWN without Shift.) .TP .B D Activate/deactivate deinterlacer. .UNINDENT .sp (The following keys are valid only when using a video output that supports the corresponding adjustment, or the software equalizer (\fB\-\-vf=eq\fP).) .INDENT 0.0 .TP .B 1 and 2 Adjust contrast. .TP .B 3 and 4 Adjust brightness. .TP .B 5 and 6 Adjust gamma. .TP .B 7 and 8 Adjust saturation. .UNINDENT .sp (The following keys are valid only on OS X.) .INDENT 0.0 .TP .B command + 0 Resize video window to half its original size. (On other platforms, you can bind keys to change the \fBwindow\-scale\fP property.) .TP .B command + 1 Resize video window to its original size. .TP .B command + 2 Resize video window to double its original size. .TP .B command + f Toggle fullscreen (see also \fB\-\-fs\fP). .TP .B command + [ and command + ] Set video window alpha. .UNINDENT .sp (The following keys are valid if you have a keyboard with multimedia keys.) .INDENT 0.0 .TP .B PAUSE Pause. .TP .B STOP Stop playing and quit. .TP .B PREVIOUS and NEXT Seek backward/forward 1 minute. .UNINDENT .sp (The following keys are only valid if you compiled with TV or DVB input support.) .INDENT 0.0 .TP .B h and k Select previous/next channel. .UNINDENT .SS Mouse Control .INDENT 0.0 .TP .B button 3 and button 4 Seek backward/forward 1 minute. .TP .B button 5 and button 6 Decrease/increase volume. .UNINDENT .SH USAGE .sp Every \fIflag\fP option has a \fIno\-flag\fP counterpart, e.g. the opposite of the \fB\-\-fs\fP option is \fB\-\-no\-fs\fP\&. \fB\-\-fs=yes\fP is same as \fB\-\-fs\fP, \fB\-\-fs=no\fP is the same as \fB\-\-no\-fs\fP\&. .sp If an option is marked as \fI(XXX only)\fP, it will only work in combination with the \fIXXX\fP option or if \fIXXX\fP is compiled in. .sp \fBNOTE:\fP .INDENT 0.0 .INDENT 3.5 The suboption parser (used for example for \fB\-\-ao=pcm\fP suboptions) supports a special kind of string\-escaping intended for use with external GUIs. .UNINDENT .UNINDENT .sp It has the following format: .INDENT 0.0 .INDENT 3.5 .sp .nf .ft C %n%string_of_length_n .ft P .fi .UNINDENT .UNINDENT .INDENT 0.0 .INDENT 3.5 .IP "Examples" .sp \fBmpv \-\-ao=pcm:file=%10%C:test.wav test.avi\fP .sp Or in a script: .sp \fBmpv \-\-ao=pcm:file=%\(gaexpr length "$NAME"\(ga%"$NAME" test.avi\fP .UNINDENT .UNINDENT .SS Paths .sp Some care must be taken when passing arbitrary paths and filenames to mpv. For example, paths starting with \fB\-\fP will be interpreted as options. Likewise, if a path contains the sequence \fB://\fP, the string before that might be interpreted as protocol prefix, even though \fB://\fP can be part of a legal UNIX path. To avoid problems with arbitrary paths, you should be sure that absolute paths passed to mpv start with \fB/\fP, and relative paths with \fB\&./\fP\&. .sp The name \fB\-\fP itself is interpreted as stdin, and will cause mpv to disable console controls. (Which makes it suitable for playing data piped to stdin.) .sp For paths passed to suboptions, the situation is further complicated by the need to escape special characters. To work this around, the path can be additionally wrapped in the \fB%n%string_of_length_n\fP syntax (see above). .sp Some mpv options interpret paths starting with \fB~\fP\&. Currently, the prefix \fB~~/\fP expands to the mpv configuration directory (usually \fB~/.config/mpv/\fP). \fB~/\fP expands to the user\(aqs home directory. (The trailing \fB/\fP is always required.) .SS Per\-File Options .sp When playing multiple files, any option given on the command line usually affects all files. Example: .INDENT 0.0 .INDENT 3.5 .sp .nf .ft C mpv \-\-a file1.mkv \-\-b file2.mkv \-\-c .ft P .fi .UNINDENT .UNINDENT .TS center; |l|l|. _ T{ File T} T{ Active options T} _ T{ file1.mkv T} T{ \fB\-\-a \-\-b \-\-c\fP T} _ T{ file2.mkv T} T{ \fB\-\-a \-\-b \-\-c\fP T} _ .TE .sp (This is different from MPlayer and mplayer2.) .sp Also, if any option is changed at runtime (via input commands), they are not reset when a new file is played. .sp Sometimes, it is useful to change options per\-file. This can be achieved by adding the special per\-file markers \fB\-\-{\fP and \fB\-\-}\fP\&. (Note that you must escape these on some shells.) Example: .INDENT 0.0 .INDENT 3.5 .sp .nf .ft C mpv \-\-a file1.mkv \-\-b \-\-\e{ \-\-c file2.mkv \-\-d file3.mkv \-\-e \-\-\e} file4.mkv \-\-f .ft P .fi .UNINDENT .UNINDENT .TS center; |l|l|. _ T{ File T} T{ Active options T} _ T{ file1.mkv T} T{ \fB\-\-a \-\-b \-\-f\fP T} _ T{ file2.mkv T} T{ \fB\-\-a \-\-b \-\-f \-\-c \-\-d \-\-e\fP T} _ T{ file3.mkv T} T{ \fB\-\-a \-\-b \-\-f \-\-c \-\-d \-\-e\fP T} _ T{ file4.mkv T} T{ \fB\-\-a \-\-b \-\-f\fP T} _ .TE .sp Additionally, any file\-local option changed at runtime is reset when the current file stops playing. If option \fB\-\-c\fP is changed during playback of \fBfile2.mkv\fP, it is reset when advancing to \fBfile3.mkv\fP\&. This only affects file\-local options. The option \fB\-\-a\fP is never reset here. .SH CONFIGURATION FILES .SS Location and Syntax .sp You can put all of the options in configuration files which will be read every time mpv is run. The system\-wide configuration file \(aqmpv.conf\(aq is in your configuration directory (\fB/etc/mpv\fP), the user\-specific one is \fB~/.config/mpv/mpv.conf\fP\&. User\-specific options override system\-wide options and options given on the command line override either. The syntax of the configuration files is \fBoption=\fP; everything after a \fI#\fP is considered a comment. Options that work without values can be enabled by setting them to \fIyes\fP and disabled by setting them to \fIno\fP\&. Even suboptions can be specified in this way. .INDENT 0.0 .INDENT 3.5 .IP "Example configuration file" .INDENT 0.0 .INDENT 3.5 .sp .nf .ft C # Use opengl video output by default. vo=opengl # Use quotes for text that can contain spaces: status\-msg="Time: ${time\-pos}" .ft P .fi .UNINDENT .UNINDENT .UNINDENT .UNINDENT .SS Putting Command Line Options into the Configuration File .sp Almost all command line options can be put into the configuration file. Here is a small guide: .TS center; |l|l|. _ T{ Option T} T{ Configuration file entry T} _ T{ \fB\-\-flag\fP T} T{ \fBflag\fP T} _ T{ \fB\-opt val\fP T} T{ \fBopt=val\fP T} _ T{ \fB\-\-opt=val\fP T} T{ \fBopt=val\fP T} _ T{ \fB\-opt "has spaces"\fP T} T{ \fBopt="has spaces"\fP T} _ .TE .SS File\-specific Configuration Files .sp You can also write file\-specific configuration files. If you wish to have a configuration file for a file called \(aqvideo.avi\(aq, create a file named \(aqvideo.avi.conf\(aq with the file\-specific options in it and put it in \fB~/.config/mpv/\fP\&. You can also put the configuration file in the same directory as the file to be played, as long as you give the \fB\-\-use\-filedir\-conf\fP option (either on the command line or in your global config file). If a file\-specific configuration file is found in the same directory, no file\-specific configuration is loaded from \fB~/.config/mpv\fP\&. In addition, the \fB\-\-use\-filedir\-conf\fP option enables directory\-specific configuration files. For this, mpv first tries to load a mpv.conf from the same directory as the file played and then tries to load any file\-specific configuration. .SS Profiles .sp To ease working with different configurations, profiles can be defined in the configuration files. A profile starts with its name in square brackets, e.g. \fB[my\-profile]\fP\&. All following options will be part of the profile. A description (shown by \fB\-\-profile=help\fP) can be defined with the \fBprofile\-desc\fP option. To end the profile, start another one or use the profile name \fBdefault\fP to continue with normal options. .INDENT 0.0 .INDENT 3.5 .IP "Example mpv profile" .INDENT 0.0 .INDENT 3.5 .sp .nf .ft C [vo.vdpau] # Use hardware decoding (might break playback of some h264 files) hwdec=vdpau [protocol.dvd] profile\-desc="profile for dvd:// streams" vf=pp=hb/vb/dr/al/fd alang=en [extension.flv] profile\-desc="profile for .flv files" vf=flip [ao.alsa] device=spdif .ft P .fi .UNINDENT .UNINDENT .UNINDENT .UNINDENT .SH TAKING SCREENSHOTS .sp Screenshots of the currently played file can be taken using the \(aqscreenshot\(aq input mode command, which is by default bound to the \fBs\fP key. Files named \fBshotNNNN.jpg\fP will be saved in the working directory, using the first available number \- no files will be overwritten. .sp A screenshot will usually contain the unscaled video contents at the end of the video filter chain and subtitles. By default, \fBS\fP takes screenshots without subtitles, while \fBs\fP includes subtitles. .sp The \fBscreenshot\fP video filter is not required when using a recommended GUI video output driver. It should normally not be added to the config file, as taking screenshots is handled by the VOs, and adding the screenshot filter will break hardware decoding. (The filter may still be useful for taking screenshots at a certain point within the video chain when using multiple video filters.) .SH TERMINAL STATUS LINE .sp During playback, mpv shows the playback status on the terminal. It looks like something like this: .INDENT 0.0 .INDENT 3.5 \fBAV: 00:03:12 / 00:24:25 (13%) A\-V: \-0.000\fP .UNINDENT .UNINDENT .sp The status line can be overridden with the \fB\-\-term\-status\-msg\fP option. .sp The following is a list of things that can show up in the status line. Input properties, that can be used to get the same information manually, are also listed. .INDENT 0.0 .IP \(bu 2 \fBAV:\fP or \fBV:\fP (video only) or \fBA:\fP (audio only) .IP \(bu 2 The current time position in \fBHH:MM:SS\fP format (\fBplayback\-time\fP property) .IP \(bu 2 The total file duration (or \fB00:00:00\fP if unknown) (\fBlength\fP property) .IP \(bu 2 Playback speed, e.g. \(ga\(ga x2.0\(ga\(ga. Only visible if the speed is not normal. This is the user\-requested speed, and not the actual speed (usually they should be the same, unless playback is too slow). (\fBspeed\fP property.) .IP \(bu 2 Playback percentage, e.g. \fB(13%)\fP\&. How much of the file has been played. Normally calculated out of playback position and duration, but can fallback to other methods (like byte position) if these are not available. (\fBpercent\-pos\fP property.) .IP \(bu 2 The audio/video sync as \fBA\-V: 0.000\fP\&. This is the difference between audio and video time. Normally it should be 0 or close to 0. If it\(aqs growing, it might indicate a playback problem. (\fBavsync\fP property.) .IP \(bu 2 Total A/V sync change, e.g. \fBct: \-0.417\fP\&. Normally invisible. Can show up if there is audio "missing", or not enough frames can be dropped. Usually this will indicate a problem. (\fBtotal\-avsync\-change\fP property.) .IP \(bu 2 Encoding state in \fB{...}\fP, only shown in encoding mode. .IP \(bu 2 Decoder\-dropped video frames, e.g. \fBSD: 2\fP\&. Shows up only if the count is not 0. Normally should never show up, unless \fB\-\-framedrop\fP is set to enable this mode, and your CPU is too slow. (\fBdrop\-frame\-count\fP property.) .IP \(bu 2 VO\-dropped video frames, e.g. \fBD: 4\fP\&. Shows up only if the count is not 0. Can grow if the video framerate is higher than that of the display, or if video rendering is too slow. Also can be incremented on "hiccups" and when the video frame couldn\(aqt be displayed on time. (\fBvo\-drop\-frame\-count\fP property.) .IP \(bu 2 Cache state, e.g. \fBCache: 2s+134KB\fP\&. Visible if the stream cache is enabled. The first value shows the amount of video buffered in the demuxer in seconds, the second value shows \fIadditional\fP data buffered in the stream cache in kilobytes. (\fBdemuxer\-cache\-duration\fP and \fBcached\-used\fP properties.) .UNINDENT .SH PROTOCOLS .INDENT 0.0 .TP .B \fBhttp://...\fP, \fBhttps://\fP, ... Many network protocols are supported, but the protocol prefix must always be specified. mpv will never attempt to guess whether a filename is actually a network address. A protocol prefix is always required. .TP .B \fB\-\fP Play data from stdin. .TP .B \fBsmb://PATH\fP Play a path from Samba share. .TP .B \fBbd://[title][/device]\fP \fB\-\-bluray\-device=PATH\fP Play a Blu\-Ray disc. Currently, this does not accept ISO files. Instead, you must mount the ISO file as filesystem, and point \fB\-\-bluray\-device\fP to the mounted directly. .TP .B \fBbdnav://[title][/device]\fP Play a Blu\-Ray disc, with navigation features enabled. This feature is permanently experimental. .TP .B \fBdvd://[title|[starttitle]\-endtitle][/device]\fP \fB\-\-dvd\-device=PATH\fP Play a DVD. If you want dvdnav menus, use \fBdvd://menu\fP\&. If no title is given, the longest title is auto\-selected. .sp \fBdvdnav://\fP is an old alias for \fBdvd://\fP and does exactly the same thing. .TP .B \fBdvdread://...:\fP Play a DVD using the old libdvdread code. This is what MPlayer and older mpv versions use for \fBdvd://\fP\&. Use is discouraged. It\(aqs provided only for compatibility and for transition. .TP .B \fBtv://[channel][/input_id]\fP \fB\-\-tv\-...\fP Analogue TV via V4L. Also useful for webcams. (Linux only.) .TP .B \fBpvr://\fP \fB\-\-pvr\-...\fP PVR. (Linux only.) .TP .B \fBdvb://[cardnumber@]channel\fP \fB\-\-dvbin\-...\fP Digital TV via DVB. (Linux only.) .TP .B \fBmf://[filemask|@listfile]\fP \fB\-\-mf\-...\fP Play a series of images as video. .TP .B \fBcdda://track[\-endtrack][:speed][/device]\fP \fB\-\-cdrom\-device=PATH\fP \fB\-\-cdda\-...\fP Play CD. .TP .B \fBlavf://...\fP Access any FFmpeg/Libav libavformat protocol. Basically, this passed the string after the \fB//\fP directly to libavformat. .TP .B \fBav://type:options\fP This is intended for using libavdevice inputs. \fBtype\fP is the libavdevice demuxer name, and \fBoptions\fP is the (pseudo\-)filename passed to the demuxer. .sp For example, \fBmpv av://lavfi:mandelbrot\fP makes use of the libavfilter wrapper included in libavdevice, and will use the \fBmandelbrot\fP source filter to generate input data. .sp \fBavdevice://\fP is an alias. .TP .B \fBfile://PATH\fP A local path as URL. Might be useful in some special use\-cases. Note that \fBPATH\fP itself should start with a third \fB/\fP to make the path an absolute path. .TP .B \fBedl://[edl specification as in edl\-mpv.rst]\fP Stitch together parts of multiple files and play them. .TP .B \fBnull://\fP Simulate an empty file. .TP .B \fBmemory://data\fP Use the \fBdata\fP part as source data. .UNINDENT .SH OPTIONS .SS Track Selection .INDENT 0.0 .TP .B \fB\-\-alang=\fP Specify a priority list of audio languages to use. Different container formats employ different language codes. DVDs use ISO 639\-1 two\-letter language codes, Matroska, MPEG\-TS and NUT use ISO 639\-2 three\-letter language codes, while OGM uses a free\-form identifier. See also \fB\-\-aid\fP\&. .INDENT 7.0 .INDENT 3.5 .IP "Examples" .INDENT 0.0 .TP .B \fBmpv dvd://1 \-\-alang=hu,en\fP Chooses the Hungarian language track on a DVD and falls back on English if Hungarian is not available. .TP .B \fBmpv \-\-alang=jpn example.mkv\fP Plays a Matroska file in Japanese. .UNINDENT .UNINDENT .UNINDENT .TP .B \fB\-\-slang=\fP Specify a priority list of subtitle languages to use. Different container formats employ different language codes. DVDs use ISO 639\-1 two letter language codes, Matroska uses ISO 639\-2 three letter language codes while OGM uses a free\-form identifier. See also \fB\-\-sid\fP\&. .INDENT 7.0 .INDENT 3.5 .IP "Examples" .INDENT 0.0 .IP \(bu 2 \fBmpv dvd://1 \-\-slang=hu,en\fP chooses the Hungarian subtitle track on a DVD and falls back on English if Hungarian is not available. .IP \(bu 2 \fBmpv \-\-slang=jpn example.mkv\fP plays a Matroska file with Japanese subtitles. .UNINDENT .UNINDENT .UNINDENT .TP .B \fB\-\-aid=\fP Select audio track. \fBauto\fP selects the default, \fBno\fP disables audio. See also \fB\-\-alang\fP\&. mpv normally prints available audio tracks on the terminal when starting playback of a file. .TP .B \fB\-\-sid=\fP Display the subtitle stream specified by \fB\fP\&. \fBauto\fP selects the default, \fBno\fP disables subtitles. .sp See also \fB\-\-slang\fP, \fB\-\-no\-sub\fP\&. .TP .B \fB\-\-vid=\fP Select video channel. \fBauto\fP selects the default, \fBno\fP disables video. .TP .B \fB\-\-edition=\fP (Matroska files only) Specify the edition (set of chapters) to use, where 0 is the first. If set to \fBauto\fP (the default), mpv will choose the first edition declared as a default, or if there is no default, the first edition defined. .UNINDENT .SS Playback Control .INDENT 0.0 .TP .B \fB\-\-start=\fP Seek to given time position. .sp The general format for absolute times is \fB[[hh:]mm:]ss[.ms]\fP\&. If the time is given with a prefix of \fB+\fP or \fB\-\fP, the seek is relative from the start or end of the file. .sp \fBpp%\fP seeks to percent position pp (0\-100). .sp \fB#c\fP seeks to chapter number c. (Chapters start from 1.) .INDENT 7.0 .INDENT 3.5 .IP "Examples" .INDENT 0.0 .TP .B \fB\-\-start=+56\fP, \fB\-\-start=+00:56\fP Seeks to the start time + 56 seconds. .TP .B \fB\-\-start=\-56\fP, \fB\-\-start=\-00:56\fP Seeks to the end time \- 56 seconds. .TP .B \fB\-\-start=01:10:00\fP Seeks to 1 hour 10 min. .TP .B \fB\-\-start=50%\fP Seeks to the middle of the file. .TP .B \fB\-\-start=30 \-\-end=40\fP Seeks to 30 seconds, plays 10 seconds, and exits. .TP .B \fB\-\-start=\-3:20 \-\-length=10\fP Seeks to 3 minutes and 20 seconds before the end of the file, plays 10 seconds, and exits. .TP .B \fB\-\-start=\(aq#2\(aq \-\-end=\(aq#4\(aq\fP Plays chapters 2 and 3, and exits. .UNINDENT .UNINDENT .UNINDENT .TP .B \fB\-\-end=