logo

oasis

Own branch of Oasis Linux (upstream: <https://git.sr.ht/~mcf/oasis/>) git clone https://anongit.hacktivis.me/git/oasis.git
commit: 32371b9bab895202c03e85946efd57627e901684
parent 1e2404d8fde82e512ea50161c85946068c9be6af
Author: Michael Forney <mforney@mforney.org>
Date:   Mon, 27 Aug 2018 15:02:28 -0700

mpv: Update to 0.29.0

Diffstat:

Mpkg/mpv/config.h3++-
Mpkg/mpv/gen.lua9+++++++--
Mpkg/mpv/gensources.awk12+++++-------
Mpkg/mpv/mpv.13282+++++++++++++++++++++++++++++++++++++++++++++----------------------------------
Mpkg/mpv/patch/0001-Add-generated-ebml-sources.patch40++++++++++++++++++++++++++--------------
Mpkg/mpv/rev2+-
Mpkg/mpv/sources.txt195++++++++++++++++++++++++++++++++++++++-----------------------------------------
7 files changed, 2011 insertions(+), 1532 deletions(-)

diff --git a/pkg/mpv/config.h b/pkg/mpv/config.h @@ -76,7 +76,6 @@ #define HAVE_VAPOURSYNTH_CORE 0 #define HAVE_LIBARCHIVE 0 #define HAVE_SDL2 0 -#define HAVE_SDL1 0 #define HAVE_OSS_AUDIO 0 #define HAVE_RSOUND 0 #define HAVE_SNDIO 0 @@ -141,6 +140,7 @@ #define HAVE_D3D_HWACCEL 0 #define HAVE_D3D9_HWACCEL 0 #define HAVE_GL_DXINTEROP_D3D9 0 +#define HAVE_FFNVCODEC 0 #define HAVE_CUDA_HWACCEL 0 #define HAVE_TV 0 #define HAVE_SYS_VIDEOIO_H 0 @@ -152,6 +152,7 @@ #define HAVE_WIN32_EXECUTABLE 0 #define HAVE_APPLE_REMOTE 0 #define HAVE_MACOS_TOUCHBAR 0 +#define HAVE_MACOS_COCOA_CB 0 #define CONFIGURATION "(missing)" #define MPV_CONFDIR "/etc/mpv" #define HAVE_GPL 1 diff --git a/pkg/mpv/gen.lua b/pkg/mpv/gen.lua @@ -33,12 +33,12 @@ pkg.deps = { 'pkg/zlib/headers', } -build('copy', '$outdir/video/out/wayland/xdg-shell-v6.h', '$builddir/pkg/wayland-protocols/include/xdg-shell-unstable-v6-client-protocol.h') +build('copy', '$outdir/video/out/wayland/xdg-shell.h', '$builddir/pkg/wayland-protocols/include/xdg-shell-client-protocol.h') build('copy', '$outdir/video/out/wayland/idle-inhibit-v1.h', '$builddir/pkg/wayland-protocols/include/idle-inhibit-unstable-v1-client-protocol.h') waylandproto('video/out/wayland/server-decoration.xml', 'video/out/wayland/srv-decor.h', nil, 'video/out/wayland/srv-decor.c') table.insert(pkg.deps, { '$outdir/video/out/wayland/idle-inhibit-v1.h', - '$outdir/video/out/wayland/xdg-shell-v6.h', + '$outdir/video/out/wayland/xdg-shell.h', '$outdir/video/out/wayland/srv-decor.h', }) @@ -164,6 +164,11 @@ if options['HAVE_WAYLAND'] then end exe('mpv', { + 'input/ipc-unix.c', + 'osdep/main-fn-unix.c', + 'osdep/subprocess-posix.c', + 'osdep/terminal-unix.c', + 'osdep/timer-linux.c', 'ta/ta.c', 'ta/ta_talloc.c', 'ta/ta_utils.c', diff --git a/pkg/mpv/gensources.awk b/pkg/mpv/gensources.awk @@ -2,18 +2,16 @@ BEGIN { FS = "\"" - ignore["osdep/terminal-dummy.c"] = 1 - ignore["input/ipc-dummy.c"] = 1 - ignore["osdep/subprocess-dummy.c"] = 1 - external["video/out/wayland/xdg-shell-v6.c"] = "$builddir/pkg/wayland-protocols/xdg-shell-unstable-v6-protocol.c.o" + external["video/out/wayland/xdg-shell.c"] = "$builddir/pkg/wayland-protocols/xdg-shell-protocol.c.o" external["video/out/wayland/idle-inhibit-v1.c"] = "$builddir/pkg/wayland-protocols/idle-inhibit-v1-protocol.c.o" external["video/out/wayland/srv-decor.c"] = "video/out/wayland/srv-decor.c.o" } -/ +\(.*\),$/ { +/sources = \[/ { insources = 1 } +insources && /\]/ { insources = 0 } + +insources && / +\(.*\),$/ { src = $2 - if (src in ignore) - next if (src in external) src = external[src] if (NF == 3) diff --git a/pkg/mpv/mpv.1 b/pkg/mpv/mpv.1 @@ -30,6 +30,283 @@ level margin: \\n[rst2man-indent\\n[rst2man-indent-level]] .\" new: \\n[rst2man-indent\\n[rst2man-indent-level]] .in \\n[rst2man-indent\\n[rst2man-indent-level]]u .. +.SS Table of Contents +.INDENT 0.0 +.IP \(bu 2 +\fI\%SYNOPSIS\fP +.IP \(bu 2 +\fI\%DESCRIPTION\fP +.IP \(bu 2 +\fI\%INTERACTIVE CONTROL\fP +.INDENT 2.0 +.IP \(bu 2 +\fI\%Keyboard Control\fP +.IP \(bu 2 +\fI\%Mouse Control\fP +.UNINDENT +.IP \(bu 2 +\fI\%USAGE\fP +.INDENT 2.0 +.IP \(bu 2 +\fI\%Legacy option syntax\fP +.IP \(bu 2 +\fI\%Escaping spaces and other special characters\fP +.IP \(bu 2 +\fI\%Paths\fP +.IP \(bu 2 +\fI\%Per\-File Options\fP +.IP \(bu 2 +\fI\%List Options\fP +.IP \(bu 2 +\fI\%Playing DVDs\fP +.UNINDENT +.IP \(bu 2 +\fI\%CONFIGURATION FILES\fP +.INDENT 2.0 +.IP \(bu 2 +\fI\%Location and Syntax\fP +.IP \(bu 2 +\fI\%Escaping spaces and special characters\fP +.IP \(bu 2 +\fI\%Putting Command Line Options into the Configuration File\fP +.IP \(bu 2 +\fI\%File\-specific Configuration Files\fP +.IP \(bu 2 +\fI\%Profiles\fP +.IP \(bu 2 +\fI\%Auto profiles\fP +.UNINDENT +.IP \(bu 2 +\fI\%TAKING SCREENSHOTS\fP +.IP \(bu 2 +\fI\%TERMINAL STATUS LINE\fP +.IP \(bu 2 +\fI\%LOW LATENCY PLAYBACK\fP +.IP \(bu 2 +\fI\%PROTOCOLS\fP +.IP \(bu 2 +\fI\%PSEUDO GUI MODE\fP +.IP \(bu 2 +\fI\%OPTIONS\fP +.INDENT 2.0 +.IP \(bu 2 +\fI\%Track Selection\fP +.IP \(bu 2 +\fI\%Playback Control\fP +.IP \(bu 2 +\fI\%Program Behavior\fP +.IP \(bu 2 +\fI\%Video\fP +.IP \(bu 2 +\fI\%Audio\fP +.IP \(bu 2 +\fI\%Subtitles\fP +.IP \(bu 2 +\fI\%Window\fP +.IP \(bu 2 +\fI\%Disc Devices\fP +.IP \(bu 2 +\fI\%Equalizer\fP +.IP \(bu 2 +\fI\%Demuxer\fP +.IP \(bu 2 +\fI\%Input\fP +.IP \(bu 2 +\fI\%OSD\fP +.IP \(bu 2 +\fI\%Screenshot\fP +.IP \(bu 2 +\fI\%Software Scaler\fP +.IP \(bu 2 +\fI\%Audio Resampler\fP +.IP \(bu 2 +\fI\%Terminal\fP +.IP \(bu 2 +\fI\%TV\fP +.IP \(bu 2 +\fI\%Cache\fP +.IP \(bu 2 +\fI\%Network\fP +.IP \(bu 2 +\fI\%DVB\fP +.IP \(bu 2 +\fI\%ALSA audio output options\fP +.IP \(bu 2 +\fI\%GPU renderer options\fP +.IP \(bu 2 +\fI\%Miscellaneous\fP +.UNINDENT +.IP \(bu 2 +\fI\%AUDIO OUTPUT DRIVERS\fP +.IP \(bu 2 +\fI\%VIDEO OUTPUT DRIVERS\fP +.IP \(bu 2 +\fI\%AUDIO FILTERS\fP +.IP \(bu 2 +\fI\%VIDEO FILTERS\fP +.IP \(bu 2 +\fI\%ENCODING\fP +.IP \(bu 2 +\fI\%COMMAND INTERFACE\fP +.INDENT 2.0 +.IP \(bu 2 +\fI\%input.conf\fP +.IP \(bu 2 +\fI\%General Input Command Syntax\fP +.IP \(bu 2 +\fI\%List of Input Commands\fP +.IP \(bu 2 +\fI\%Input Commands that are Possibly Subject to Change\fP +.INDENT 2.0 +.IP \(bu 2 +\fI\%Hooks\fP +.IP \(bu 2 +\fI\%Legacy hook API\fP +.UNINDENT +.IP \(bu 2 +\fI\%Input Command Prefixes\fP +.IP \(bu 2 +\fI\%Input Sections\fP +.IP \(bu 2 +\fI\%Properties\fP +.IP \(bu 2 +\fI\%Property list\fP +.IP \(bu 2 +\fI\%Inconsistencies between options and properties\fP +.IP \(bu 2 +\fI\%Property Expansion\fP +.IP \(bu 2 +\fI\%Raw and Formatted Properties\fP +.UNINDENT +.IP \(bu 2 +\fI\%ON SCREEN CONTROLLER\fP +.INDENT 2.0 +.IP \(bu 2 +\fI\%Using the OSC\fP +.INDENT 2.0 +.IP \(bu 2 +\fI\%The Interface\fP +.IP \(bu 2 +\fI\%Key Bindings\fP +.UNINDENT +.IP \(bu 2 +\fI\%Configuration\fP +.INDENT 2.0 +.IP \(bu 2 +\fI\%Config Syntax\fP +.IP \(bu 2 +\fI\%Command\-line Syntax\fP +.IP \(bu 2 +\fI\%Configurable Options\fP +.IP \(bu 2 +\fI\%Script Commands\fP +.UNINDENT +.UNINDENT +.IP \(bu 2 +\fI\%STATS\fP +.INDENT 2.0 +.IP \(bu 2 +\fI\%Usage\fP +.INDENT 2.0 +.IP \(bu 2 +\fI\%Font\fP +.UNINDENT +.IP \(bu 2 +\fI\%Configuration\fP +.INDENT 2.0 +.IP \(bu 2 +\fI\%Configurable Options\fP +.IP \(bu 2 +\fI\%Different key bindings\fP +.UNINDENT +.UNINDENT +.IP \(bu 2 +\fI\%LUA SCRIPTING\fP +.INDENT 2.0 +.IP \(bu 2 +\fI\%Example\fP +.IP \(bu 2 +\fI\%Details on the script initialization and lifecycle\fP +.IP \(bu 2 +\fI\%mp functions\fP +.IP \(bu 2 +\fI\%Advanced mp functions\fP +.IP \(bu 2 +\fI\%mp.msg functions\fP +.IP \(bu 2 +\fI\%mp.options functions\fP +.IP \(bu 2 +\fI\%mp.utils functions\fP +.IP \(bu 2 +\fI\%Events\fP +.IP \(bu 2 +\fI\%List of events\fP +.IP \(bu 2 +\fI\%Extras\fP +.UNINDENT +.IP \(bu 2 +\fI\%JAVASCRIPT\fP +.INDENT 2.0 +.IP \(bu 2 +\fI\%Example\fP +.IP \(bu 2 +\fI\%Similarities with Lua\fP +.IP \(bu 2 +\fI\%Differences from Lua\fP +.IP \(bu 2 +\fI\%Language features \- ECMAScript 5\fP +.IP \(bu 2 +\fI\%Unsupported Lua APIs and their JS alternatives\fP +.IP \(bu 2 +\fI\%Scripting APIs \- identical to Lua\fP +.IP \(bu 2 +\fI\%Additional utilities\fP +.IP \(bu 2 +\fI\%Timers (global)\fP +.IP \(bu 2 +\fI\%CommonJS modules and \fBrequire(id)\fP\fP +.IP \(bu 2 +\fI\%The event loop\fP +.UNINDENT +.IP \(bu 2 +\fI\%JSON IPC\fP +.INDENT 2.0 +.IP \(bu 2 +\fI\%Socat example\fP +.IP \(bu 2 +\fI\%Command Prompt example\fP +.IP \(bu 2 +\fI\%Protocol\fP +.IP \(bu 2 +\fI\%Commands\fP +.IP \(bu 2 +\fI\%UTF\-8\fP +.UNINDENT +.IP \(bu 2 +\fI\%CHANGELOG\fP +.IP \(bu 2 +\fI\%EMBEDDING INTO OTHER PROGRAMS (LIBMPV)\fP +.IP \(bu 2 +\fI\%C PLUGINS\fP +.INDENT 2.0 +.IP \(bu 2 +\fI\%C plugins location\fP +.IP \(bu 2 +\fI\%API\fP +.IP \(bu 2 +\fI\%Linkage to libmpv\fP +.IP \(bu 2 +\fI\%Examples\fP +.UNINDENT +.IP \(bu 2 +\fI\%ENVIRONMENT VARIABLES\fP +.IP \(bu 2 +\fI\%EXIT CODES\fP +.IP \(bu 2 +\fI\%FILES\fP +.IP \(bu 2 +\fI\%FILES ON WINDOWS\fP +.UNINDENT .SH SYNOPSIS .nf \fBmpv\fP [options] [file|URL|PLAYLIST|\-] @@ -72,6 +349,10 @@ Seek forward/backward 1 minute. Shift+arrow does a 5 second exact seek (see Seek to the previous/next subtitle. Subject to some restrictions and might not always work; see \fBsub\-seek\fP command. .TP +.B Ctrl+Shift+Left and Ctrl+Shift+Right +Adjust subtitle delay so that the next or previous subtitle is displayed +now. This is especially useful to sync subtitles to audio. +.TP .B [ and ] Decrease/increase current playback speed by 10%. .TP @@ -81,6 +362,17 @@ Halve/double current playback speed. .B BACKSPACE Reset playback speed to normal. .TP +.B Shift+BACKSPACE +Undo the last seek. This works only if the playlist entry was not changed. +Hitting it a second time will go back to the original position. +See \fBrevert\-seek\fP command for details. +.TP +.B Shift+Ctrl+BACKSPACE +Mark the current position. This will then be used by \fBShift+BACKSPACE\fP +as revert position (once you seek back, the marker will be reset). You can +use this to seek around in the file and then return to the exact position +where you left off. +.TP .B < and > Go backward/forward in the playlist. .TP @@ -131,8 +423,9 @@ Exit fullscreen mode. .B T Toggle stay\-on\-top (see also \fB\-\-ontop\fP). .TP -.B w and e -Decrease/increase pan\-and\-scan range. +.B w and W +Decrease/increase pan\-and\-scan range. The \fBe\fP key does the same as +\fBW\fP currently, but use is discouraged. .TP .B o (also P) Show progression bar, elapsed time and total duration on the OSD. @@ -146,8 +439,9 @@ Toggle subtitle visibility. .B j and J Cycle through the available subtitles. .TP -.B x and z -Adjust subtitle delay by +/\- 0.1 seconds. +.B z and Z +Adjust subtitle delay by +/\- 0.1 seconds. The \fBx\fP key does the same as +\fBZ\fP currently, but use is discouraged. .TP .B l Set/clear A\-B loop points. See \fBab\-loop\fP command for details. @@ -167,8 +461,9 @@ overriding them almost completely with the normal subtitle style. See Toggle subtitle VSFilter aspect compatibility mode. See \fB\-\-sub\-ass\-vsfilter\-aspect\-compat\fP for more info. .TP -.B r and t -Move subtitles up/down. +.B r and R +Move subtitles up/down. The \fBt\fP key does the same as \fBR\fP currently, but +use is discouraged. .TP .B s Take a screenshot. @@ -195,10 +490,30 @@ Activate/deactivate deinterlacer. .TP .B A Cycle aspect ratio override. +.TP +.B Ctrl h +Toggle hardware video decoding on/off. +.TP +.B Alt+LEFT, Alt+RIGHT, Alt+UP, Alt+DOWN +Move the video rectangle (panning). +.TP +.B Alt + and Alt \- +Combining \fBAlt\fP with the \fB+\fP or \fB\-\fP keys changes video zoom. +.TP +.B Alt+BACKSPACE +Reset the pan/zoom settings. +.TP +.B F9 +Show the playlist and the current position in it (useful only if a UI window +is used, broken on the terminal). +.TP +.B F10 +Show the list of audio and subtitle streams (useful only if a UI window is +used, broken on the terminal). .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).) +corresponding adjustment.) .INDENT 0.0 .TP .B 1 and 2 @@ -580,6 +895,12 @@ T} T{ Set a list of items T} _ +T{ +\-toggle +T} T{ +Append an item, or remove if if it already exists +T} +_ .TE .sp Although some operations allow specifying multiple \fB,\fP\-separated items, using @@ -587,9 +908,14 @@ this is strongly discouraged and deprecated, except for \fB\-set\fP\&. .sp Without suffix, the action taken is normally \fB\-set\fP\&. .sp -Some options (like \fB\-\-sub\-file\fP, \fB\-\-audio\-file\fP, \fB\-\-opengl\-shader\fP) are +Some options (like \fB\-\-sub\-file\fP, \fB\-\-audio\-file\fP, \fB\-\-glsl\-shader\fP) are aliases for the proper option with \fB\-append\fP action. For example, \fB\-\-sub\-file\fP is an alias for \fB\-\-sub\-files\-append\fP\&. +.sp +Some options only support a subset of the above. +.sp +Options of this type can be changed at runtime using the \fBchange\-list\fP +command, which takes the suffix as separate operation parameter. .SS Playing DVDs .sp DVDs can be played with the \fBdvd://[title]\fP syntax. The optional @@ -661,8 +987,8 @@ setting them to \fIno\fP\&. Even suboptions can be specified in this way. .sp .nf .ft C -# Use opengl video output by default. -vo=opengl +# Use GPU\-accelerated video output by default. +vo=gpu # Use quotes for text that can contain spaces: status\-msg="Time: ${time\-pos}" .ft P @@ -740,6 +1066,11 @@ 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. +.sp +You can list profiles with \fB\-\-profile=help\fP, and show the contents of a +profile with \fB\-\-show\-profile=<name>\fP (replace \fB<name>\fP with the profile +name). You can apply profiles on start with the \fB\-\-profile=<name>\fP option, +or at runtime with the \fBapply\-profile <name>\fP command. .INDENT 0.0 .INDENT 3.5 .IP "Example mpv config file with profiles" @@ -759,7 +1090,7 @@ demuxer\-readahead\-secs=20 [slow] profile\-desc="some profile name" # reference a builtin profile -profile=opengl\-hq +profile=gpu\-hq [fast] vo=vdpau @@ -882,8 +1213,51 @@ decoder frame dropping is enabled with the \fB\-\-framedrop\fP options. .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 \fBcache\-used\fP properties.) +the second value shows the sum of the demuxer forward cache size and the +\fIadditional\fP data buffered in the stream cache in kilobytes. +(\fBdemuxer\-cache\-duration\fP, \fBdemuxer\-cache\-state\fP, \fBcache\-used\fP +properties.) +.UNINDENT +.SH LOW LATENCY PLAYBACK +.sp +mpv is optimized for normal video playback, meaning it actually tries to buffer +as much data as it seems to make sense. This will increase latency. Reducing +latency is possible only by specifically disabling features which increase +latency. +.sp +The builtin \fBlow\-latency\fP profile tries to apply some of the options which can +reduce latency. You can use \fB\-\-profile=low\-latency\fP to apply all of them. You +can list the contents with \fB\-\-show\-profile=low\-latency\fP (some of the options +are quite obscure, and may change every mpv release). +.sp +Be aware that some of the options can reduce playback quality. +.sp +Most latency is actually caused by inconvenient timing behavior. You can disable +this with \fB\-\-untimed\fP, but it will likely break, unless the stream has no +audio, and the input feeds data to the player at a constant rate. +.sp +Another common problem is with MJPEG streams. These do not signal the correct +framerate. Using \fB\-\-untimed\fP or \fB\-\-no\-correct\-pts \-\-fps=60\fP might help. +.sp +For livestreams, data can build up due to pausing the stream, due to slightly +lower playback rate, or "buffering" pauses. If the demuxer cache is enabled, +these can be skipped manually. The experimental \fBdrop\-buffers\fP command can +be used to discard any buffered data, though it\(aqs very disruptive. +.sp +In some cases, manually tuning TCP buffer sizes and such can help to reduce +latency. +.sp +Additional options that can be tried: +.INDENT 0.0 +.IP \(bu 2 +\fB\-\-opengl\-glfinish=yes\fP, can reduce buffering in the graphics driver +.IP \(bu 2 +\fB\-\-opengl\-swapinterval=0\fP, same +.IP \(bu 2 +\fB\-\-vo=xv\fP, same +.IP \(bu 2 +without audio \fB\-\-framedrop=no \-\-speed=1.01\fP may help for live sources +(results can be mixed) .UNINDENT .SH PROTOCOLS .sp @@ -934,14 +1308,15 @@ Play a path from Samba share. \fBbd://[title][/device]\fP \fB\-\-bluray\-device=PATH\fP .INDENT 0.0 .INDENT 3.5 -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 directory directly. +Play a Blu\-ray disc. Since libbluray 1.0.1, you can read from ISO files +by passing them to \fB\-\-bluray\-device\fP\&. .sp \fBtitle\fP can be: \fBlongest\fP or \fBfirst\fP (selects the default playlist); \fBmpls/<number>\fP (selects <number>.mpls playlist); -\fB<number>\fP (select playlist with the same index). You can list -the available playlists with \fB\-\-msg\-level=bd=v\fP\&. +\fB<number>\fP (select playlist with the same index). mpv will list +the available playlists on loading. +.sp +\fBbluray://\fP is an alias. .UNINDENT .UNINDENT .sp @@ -960,7 +1335,7 @@ thing. .INDENT 0.0 .INDENT 3.5 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 +older mpv versions used for \fBdvd://\fP\&. Use is discouraged. It\(aqs provided only for compatibility and for transition, and to work around outstanding dvdnav bugs (see "DVD library choices" above). .UNINDENT @@ -1033,11 +1408,29 @@ absolute path. .UNINDENT .UNINDENT .sp +\fBappending://PATH\fP +.INDENT 0.0 +.INDENT 3.5 +Play a local file, but assume it\(aqs being appended to. This is useful for +example for files that are currently being downloaded to disk. This will +block playback, and stop playback only if no new data was appended after +a timeout of about 2 seconds. +.sp +Using this is still a bit of a bad idea, because there is no way to detect +if a file is actually being appended, or if it\(aqs still written. If you\(aqre +trying to play the output of some program, consider using a pipe +(\fBsomething | mpv \-\fP). If it really has to be a file on disk, use tail to +make it wait forever, e.g. \fBtail \-f \-c +0 file.mkv | mpv \-\fP\&. +.UNINDENT +.UNINDENT +.sp \fBfd://123\fP .INDENT 0.0 .INDENT 3.5 Read data from the given file descriptor (for example 123). This is similar to piping data to stdin via \fB\-\fP, but can use an arbitrary file descriptor. +mpv may modify some file descriptor properties when the stream layer "opens" +it. .UNINDENT .UNINDENT .sp @@ -1173,6 +1566,9 @@ subtitles. .UNINDENT .UNINDENT .TP +.B \fB\-\-vlang=<...>\fP +Equivalent to \fB\-\-alang\fP and \fB\-\-slang\fP, for video tracks. +.TP .B \fB\-\-aid=<ID|auto|no>\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 @@ -1204,15 +1600,6 @@ If video is disabled, mpv will try to download the audio only if media is streamed with youtube\-dl, because it saves bandwidth. This is done by setting the ytdl_format to "bestaudio/best" in the ytdl_hook.lua script. .TP -.B \fB\-\-ff\-aid=<ID|auto|no>\fP, \fB\-\-ff\-sid=<ID|auto|no>\fP, \fB\-\-ff\-vid=<ID|auto|no>\fP -Select audio/subtitle/video streams by the FFmpeg stream index. The FFmpeg -stream index is relatively arbitrary, but useful when interacting with -other software using FFmpeg (consider \fBffprobe\fP). -.sp -Note that with external tracks (added with \fB\-\-sub\-files\fP and similar -options), there will be streams with duplicate IDs. In this case, the -first stream in order is selected. -.TP .B \fB\-\-edition=<ID|auto>\fP (Matroska files only) Specify the edition (set of chapters) to use, where 0 is the first. If set @@ -1245,6 +1632,8 @@ considered 0.) \fBpp%\fP seeks to percent position pp (0\-100). .sp \fB#c\fP seeks to chapter number c. (Chapters start from 1.) +.sp +\fBnone\fP resets any previously set option (useful for libmpv). .INDENT 7.0 .INDENT 3.5 .IP "Examples" @@ -1275,13 +1664,16 @@ Plays chapters 2 and 3, and exits. .UNINDENT .UNINDENT .TP -.B \fB\-\-end=<time>\fP -Stop at given absolute time. Use \fB\-\-length\fP if the time should be relative +.B \fB\-\-end=<relative time>\fP +Stop at given time. Use \fB\-\-length\fP if the time should be relative to \fB\-\-start\fP\&. See \fB\-\-start\fP for valid option values and examples. .TP .B \fB\-\-length=<relative time>\fP Stop after a given time relative to the start time. See \fB\-\-start\fP for valid option values and examples. +.sp +If both \fB\-\-end\fP and \fB\-\-length\fP are provided, playback will stop when it +reaches either of the two endpoints. .TP .B \fB\-\-rebase\-start\-time=<yes|no>\fP Whether to move the file start time to \fB00:00:00\fP (default: yes). This @@ -1489,8 +1881,9 @@ Set loop points. If playback passes the \fBb\fP timestamp, it will seek to the \fBa\fP timestamp. Seeking past the \fBb\fP point doesn\(aqt loop (this is intentional). .sp -If both options are set to \fBno\fP, looping is disabled. Otherwise, the -start/end of the file is used if one of the options is set to \fBno\fP\&. +If both options are set to \fBno\fP or unset, looping is disabled. +Otherwise, the start/end of playback is used if one of the options +is set to \fBno\fP or unset. .sp The loop\-points can be adjusted at runtime with the corresponding properties. See also \fBab\-loop\fP command. @@ -1532,11 +1925,10 @@ Without \fB\-\-hr\-seek\fP, skipping will snap to keyframes. .UNINDENT .TP .B \fB\-\-stop\-playback\-on\-init\-failure=<yes|no>\fP -Stop playback if either audio or video fails to initialize. Currently, -the default behavior is \fBno\fP for the command line player, but \fByes\fP -for libmpv. With \fBno\fP, playback will continue in video\-only or audio\-only -mode if one of them fails. This doesn\(aqt affect playback of audio\-only or -video\-only files. +Stop playback if either audio or video fails to initialize (default: no). +With \fBno\fP, playback will continue in video\-only or audio\-only mode if one +of them fails. This doesn\(aqt affect playback of audio\-only or video\-only +files. .UNINDENT .SS Program Behavior .INDENT 0.0 @@ -1582,8 +1974,9 @@ Print a list of the supported protocols. .TP .B \fB\-\-log\-file=<path>\fP Opens the given path for writing, and print log messages to it. Existing -files will be truncated. The log level always corresponds to \fB\-v\fP, -regardless of terminal verbosity levels. +files will be truncated. The log level is at least \fB\-v \-v\fP, but +can be raised via \fB\-\-msg\-level\fP (the option cannot lower it below the +forced minimum log level). .TP .B \fB\-\-config\-dir=<path>\fP Force a different configuration directory. If this is set, the given @@ -1628,7 +2021,7 @@ This option is useful for debugging only. .B \fB\-\-idle=<no|yes|once>\fP Makes mpv wait idly instead of quitting when there is no file to play. Mostly useful in input mode, where mpv can be controlled through input -commands. +commands. (Default: \fBno\fP) .sp \fBonce\fP will only idle at start and let the player close once the first playlist has finished playing back. @@ -1713,6 +2106,7 @@ disabled by default. .TP .B \fB\-\-ignore\-path\-in\-watch\-later\-config\fP Ignore path (i.e. use filename only) when using watch later feature. +(Default: disabled) .TP .B \fB\-\-show\-profile=<profile>\fP Show the description and content of a profile. @@ -1732,15 +2126,23 @@ May be dangerous if playing from untrusted media. Enable the youtube\-dl hook\-script. It will look at the input URL, and will play the video located on the website. This works with many streaming sites, not just the one that the script is named after. This requires a recent -version of youtube\-dl to be installed on the system. (Enabled by default, -except when the client API / libmpv is used.) +version of youtube\-dl to be installed on the system. (Enabled by default.) .sp If the script can\(aqt do anything with an URL, it will do nothing. .sp +The \fItry_ytdl_first\fP script option accepts a boolean \(aqyes\(aq or \(aqno\(aq, and if +\(aqyes\(aq will try parsing the URL with youtube\-dl first, instead of the default +where it\(aqs only after mpv failed to open it. This mostly depends on whether +most of your URLs need youtube\-dl parsing. +.sp The \fIexclude\fP script option accepts a \fB|\fP\-separated list of URL patterns which mpv should not use with youtube\-dl. The patterns are matched after the \fBhttp(s)://\fP part of the URL. .sp +The \fIuse_manifests\fP script option makes mpv use the master manifest URL for +formats like HLS and DASH, if available, allowing for video/audio selection +in runtime. It\(aqs disabled ("no") by default for performance reasons. +.sp \fB^\fP matches the beginning of the URL, \fB$\fP matches its end, and you should use \fB%\fP before any of the characters \fB^$()%|,.[]*+\-?\fP to match that character. @@ -1775,6 +2177,12 @@ passed as a key\-value pair. Options without argument must include \fB=\fP\&. .sp There is no sanity checking so it\(aqs possible to break things (i.e. passing invalid parameters to youtube\-dl). +.sp +A proxy URL can be passed for youtube\-dl to use it in parsing the website. +This is useful for geo\-restricted URLs. After youtube\-dl parsing, some +URLs also require a proxy for playback, so this can pass that proxy +information to mpv. Take note that SOCKS proxies aren\(aqt supported and +https URLs also bypass the proxy. This is a limitation in FFmpeg. .INDENT 7.0 .INDENT 3.5 .IP "Example" @@ -1783,10 +2191,19 @@ passing invalid parameters to youtube\-dl). \fB\-\-ytdl\-raw\-options=username=user,password=pass\fP .IP \(bu 2 \fB\-\-ytdl\-raw\-options=force\-ipv6=\fP +.IP \(bu 2 +\fB\-\-ytdl\-raw\-options=proxy=[http://127.0.0.1:3128]\fP +.IP \(bu 2 +\fB\-\-ytdl\-raw\-options\-append=proxy=http://127.0.0.1:3128\fP .UNINDENT .UNINDENT .UNINDENT .TP +.B \fB\-\-load\-stats\-overlay=<yes|no>\fP +Enable the builtin script that shows useful playback information on a key +binding (default: yes). By default, the \fBi\fP key is used (\fBI\fP to make +the overlay permanent). +.TP .B \fB\-\-player\-operation\-mode=<cplayer|pseudo\-gui>\fP For enabling "pseudo GUI mode", which means that the defaults for some options are changed. This option should not normally be used directly, but @@ -1865,6 +2282,28 @@ differences to other VOs are possible. .UNINDENT .UNINDENT .TP +.B \fB\-\-video\-latency\-hacks=<yes|no>\fP +Enable some things which tend to reduce video latency by 1 or 2 frames +(default: no). Note that this option might be removed without notice once +the player\(aqs timing code does not inherently need to do these things +anymore. +.sp +This does: +.INDENT 7.0 +.IP \(bu 2 +Use the demuxer reported FPS for frame dropping. This avoids that the +player needs to decode 1 frame in advance, lowering total latency in +effect. This also means that if the demuxer reported FPS is wrong, or +the video filter chain changes FPS (e.g. deinterlacing), then it could +drop too many or not enough frames. +.IP \(bu 2 +Disable waiting for the first video frame. Normally the player waits for +the first video frame to be fully rendered before starting playback +properly. Some VOs will lazily initialize stuff when rendering the first +frame, so if this is not done, there is some likeliness that the VO has +to drop some frames if rendering the first frame takes longer than needed. +.UNINDENT +.TP .B \fB\-\-display\-fps=<fps>\fP Set the display FPS used with the \fB\-\-video\-sync=display\-*\fP modes. By default, a detected value is used. Keep in mind that setting an incorrect @@ -1896,85 +2335,100 @@ exactly the same as \fBauto\fP enable best hw decoder with copy\-back (see below) .TP .B vdpau -requires \fB\-\-vo=vdpau\fP or \fB\-\-vo=opengl\fP (Linux only) +requires \fB\-\-vo=gpu\fP or \fB\-\-vo=vdpau\fP (Linux only) .TP .B vdpau\-copy copies video back into system RAM (Linux with some GPUs only) .TP .B vaapi -requires \fB\-\-vo=opengl\fP or \fB\-\-vo=vaapi\fP (Linux only) +requires \fB\-\-vo=gpu\fP or \fB\-\-vo=vaapi\fP (Linux only) .TP .B vaapi\-copy -copies video back into system RAM (Linux with Intel GPUs only) +copies video back into system RAM (Linux with some GPUs only) .TP .B videotoolbox -requires \fB\-\-vo=opengl\fP (OS X 10.8 and up), +requires \fB\-\-vo=gpu\fP (OS X 10.8 and up), or \fB\-\-vo=opengl\-cb\fP (iOS 9.0 and up) .TP .B videotoolbox\-copy copies video back into system RAM (OS X 10.8 or iOS 9.0 and up) .TP .B dxva2 -requires \fB\-\-vo=opengl\fP with \fB\-\-opengl\-backend=angle\fP or -\fB\-\-opengl\-backend=dxinterop\fP (Windows only) +requires \fB\-\-vo=gpu\fP with \fB\-\-gpu\-context=d3d11\fP, +\fB\-\-gpu\-context=angle\fP or \fB\-\-gpu\-context=dxinterop\fP +(Windows only) .TP .B dxva2\-copy copies video back to system RAM (Windows only) .TP .B d3d11va -requires \fB\-\-vo=opengl\fP with \fB\-\-opengl\-backend=angle\fP -(Windows 8+ only) +requires \fB\-\-vo=gpu\fP with \fB\-\-gpu\-context=d3d11\fP or +\fB\-\-gpu\-context=angle\fP (Windows 8+ only) .TP .B d3d11va\-copy copies video back to system RAM (Windows 8+ only) .TP .B mediacodec +requires \fB\-\-vo=mediacodec_embed\fP (Android only) +.TP +.B mediacodec\-copy copies video back to system RAM (Android only) .TP -.B rpi -requires \fB\-\-vo=opengl\fP (Raspberry Pi only \- default if available) +.B mmal +requires \fB\-\-vo=gpu\fP (Raspberry Pi only \- default if available) .TP -.B rpi\-copy +.B mmal\-copy copies video back to system RAM (Raspberry Pi only) .TP .B cuda -requires \fB\-\-vo=opengl\fP (Any platform CUDA is available) +requires \fB\-\-vo=gpu\fP (Any platform CUDA is available) .TP .B cuda\-copy copies video back to system RAM (Any platform CUDA is available) .TP +.B nvdec +requires \fB\-\-vo=gpu\fP (Any platform CUDA is available) +.TP +.B nvdec\-copy +copies video back to system RAM (Any platform CUDA is available) +.TP .B crystalhd copies video back to system RAM (Any platform supported by hardware) +.TP +.B rkmpp +requires \fB\-\-vo=gpu\fP (some RockChip devices only) .UNINDENT .sp \fBauto\fP tries to automatically enable hardware decoding using the first available method. This still depends what VO you are using. For example, -if you are not using \fB\-\-vo=vdpau\fP or \fB\-\-vo=opengl\fP, vdpau decoding will +if you are not using \fB\-\-vo=gpu\fP or \fB\-\-vo=vdpau\fP, vdpau decoding will never be enabled. Also note that if the first found method doesn\(aqt actually work, it will always fall back to software decoding, instead of trying the next method (might matter on some Linux systems). .sp \fBauto\-copy\fP selects only modes that copy the video data back to system -memory after decoding. Currently, this selects only one of the following -modes: \fBvaapi\-copy\fP, \fBdxva2\-copy\fP, \fBd3d11va\-copy\fP, \fBmediacodec\fP\&. +memory after decoding. This selects modes like \fBvaapi\-copy\fP (and so on). If none of these work, hardware decoding is disabled. This mode is always guaranteed to incur no additional loss compared to software decoding, and will allow CPU processing with video filters. .sp -The \fBvaapi\fP mode, if used with \fB\-\-vo=opengl\fP, requires Mesa 11 and most -likely works with Intel GPUs only. It also requires the opengl EGL backend -(automatically used if available). You can also try the old GLX backend by -forcing it with \fB\-\-opengl\-backend=x11\fP, but the vaapi/GLX interop is -said to be slower than \fBvaapi\-copy\fP\&. +The \fBvaapi\fP mode, if used with \fB\-\-vo=gpu\fP, requires Mesa 11 and most +likely works with Intel GPUs only. It also requires the opengl EGL backend. .sp The \fBcuda\fP and \fBcuda\-copy\fP modes provides deinterlacing in the decoder which is useful as there is no other deinterlacing mechanism in the opengl output path. To use this deinterlacing you must pass the option: \fBvd\-lavc\-o=deint=[weave|bob|adaptive]\fP\&. Pass \fBweave\fP (or leave the option unset) to not attempt any -deinterlacing. \fBcuda\fP should always be preferred unless the \fBopengl\fP +deinterlacing. \fBcuda\fP should always be preferred unless the \fBgpu\fP vo is not being used or filters are required. .sp +\fBnvdec\fP is a newer implementation of CUVID/CUDA decoding, which uses the +FFmpeg decoders for file parsing. Experimental, is known not to correctly +check whether decoding is supported by the hardware at all. Deinterlacing +is not supported. Since this uses FFmpeg\(aqs codec parsers, it is expected +that this generally causes fewer issues than \fBcuda\fP\&. +.sp Most video filters will not work with hardware decoding as they are primarily implemented on the CPU. Some exceptions are \fBvdpaupp\fP, \fBvdpaurb\fP and \fBvavpp\fP\&. See \fI\%VIDEO FILTERS\fP for more details. @@ -2003,8 +2457,8 @@ output APIs, as well as bugs in the actual hardware decoders, there can be some loss, or even blatantly incorrect results. .sp In some cases, RGB conversion is forced, which means the RGB conversion -is performed by the hardware decoding API, instead of the OpenGL code -used by \fB\-\-vo=opengl\fP\&. This means certain colorspaces may not display +is performed by the hardware decoding API, instead of the shaders +used by \fB\-\-vo=gpu\fP\&. This means certain colorspaces may not display correctly, and certain filtering (such as debanding) cannot be applied in an ideal way. This will also usually force the use of low quality chroma scalers instead of the one specified by \fB\-\-cscale\fP\&. In other @@ -2023,10 +2477,11 @@ logs. If \fBvaapi\-glx\fP is indicated, and the video colorspace is either BT.601 or BT.709, a forced, low\-quality but correct RGB conversion is performed. Otherwise, the result will be totally incorrect. .sp -\fBd3d11va\fP is usually safe (if used with ANGLE builds that support -\fBEGL_KHR_stream path\fP \- otherwise, it converts to RGB), except that -10 bit input (HEVC main 10 profiles) will be rounded down to 8 bits, -which results in reduced quality. +\fBd3d11va\fP is safe when used with the \fBd3d11\fP backend. If used with +\fBangle\fP is it usually safe, except that 10 bit input (HEVC main 10 +profiles) will be rounded down to 8 bits, which will result in reduced +quality. Also note that with very old ANGLE builds (without +\fBEGL_KHR_stream path\fP,) all input will be converted to RGB. .sp \fBdxva2\fP is not safe. It appears to always use BT.601 for forced RGB conversion, but actual behavior depends on the GPU drivers. Some drivers @@ -2036,7 +2491,7 @@ affect this additionally. This can give incorrect results even with completely ordinary video sources. .sp \fBrpi\fP always uses the hardware overlay renderer, even with -\fB\-\-vo=opengl\fP\&. +\fB\-\-vo=gpu\fP\&. .sp \fBcuda\fP should be safe, but it has been reported to corrupt the timestamps causing glitched, flashing frames on some files. It can also @@ -2065,44 +2520,58 @@ the first thing you should try is disabling it. .UNINDENT .UNINDENT .TP -.B \fB\-\-opengl\-hwdec\-interop=<name>\fP -This is useful for the \fBopengl\fP and \fBopengl\-cb\fP VOs for creating the -hardware decoding OpenGL interop context, but without actually enabling -hardware decoding itself (like \fB\-\-hwdec\fP does). +.B \fB\-\-gpu\-hwdec\-interop=<auto|all|no|name>\fP +This option is for troubleshooting hwdec interop issues. Since it\(aqs a +debugging option, its semantics may change at any time. +.sp +This is useful for the \fBgpu\fP and \fBopengl\-cb\fP VOs for selecting which +hwdec interop context to use exactly. Effectively it also can be used +to block loading of certain backends. .sp -If set to an empty string (default), the \fB\-\-hwdec\fP option is used. +If set to \fBauto\fP (default), the behavior depends on the VO: for \fBgpu\fP, +it does nothing, and the interop context is loaded on demand (when the +decoder probes for \fB\-\-hwdec\fP support). For \fBopengl\-cb\fP, which has +has no on\-demand loading, this is equivalent to \fBall\fP\&. .sp -For \fBopengl\fP, if set, do not create the interop context on demand, but -when the VO is created. +The empty string is equivalent to \fBauto\fP\&. .sp -For \fBopengl\-cb\fP, if set, load the interop context as soon as the OpenGL -context is created. Since \fBopengl\-cb\fP has no on\-demand loading, this -allows enabling hardware decoding at runtime at all, without having -to temporarily set the \fBhwdec\fP option just during OpenGL context -initialization with \fBmpv_opengl_cb_init_gl()\fP\&. +If set to \fBall\fP, it attempts to load all interop contexts at GL context +creation time. +.sp +Other than that, a specific backend can be set, and the list of them can +be queried with \fBhelp\fP (mpv CLI only). +.sp +Runtime changes to this are ignored (the current option value is used +whenever the renderer is created). +.sp +The old aliases \fB\-\-opengl\-hwdec\-interop\fP and \fB\-\-hwdec\-preload\fP are +barely related to this anymore, but will be somewhat compatible in some +cases. +.TP +.B \fB\-\-hwdec\-image\-format=<name>\fP +Set the internal pixel format used by hardware decoding via \fB\-\-hwdec\fP +(default \fBno\fP). The special value \fBno\fP selects an implementation +specific standard format. Most decoder implementations support only one +format, and will fail to initialize if the format is not supported. .sp -See \fB\-\-opengl\-hwdec\-interop=help\fP for accepted values. This lists the -interop backend, with the \fB\-\-hwdec\fP alias after it in \fB[...]\fP\&. Consider -all values except the proper interop backend name, \fBauto\fP, and \fBno\fP as -silently deprecated and subject to change. Also, if you use this in -application code (e.g. via libmpv), any value other than \fBauto\fP and \fBno\fP -should be avoided, as backends can change. +Some implementations might support multiple formats. In particular, +videotoolbox is known to require \fBuyvy422\fP for good performance on some +older hardware. d3d11va can always use \fByuv420p\fP, which uses an opaque +format, with likely no advantages. +.TP +.B \fB\-\-cuda\-decode\-device=<auto|0..>\fP +Choose the GPU device used for decoding when using the \fBcuda\fP hwdec. .sp -Currently the option sets a single value. It is possible that the option -type changes to a list in the future. +By default, the device that is being used to provide OpenGL output will +also be used for decoding (and in the vast majority of cases, only one +GPU will be present). .sp -The old alias \fB\-\-hwdec\-preload\fP has different behavior if the option value -is \fBno\fP\&. +Note that when using the \fBcuda\-copy\fP hwdec, a different option must be +passed: \fB\-\-vd\-lavc\-o=gpu=<0..>\fP\&. .TP -.B \fB\-\-videotoolbox\-format=<name>\fP -Set the internal pixel format used by \fB\-\-hwdec=videotoolbox\fP on OSX. The -choice of the format can influence performance considerably. On the other -hand, there doesn\(aqt appear to be a good way to detect the best format for -the given hardware. \fBnv12\fP, the default, works better on modern hardware, -while \fBuyvy422\fP appears to be better for old hardware. \fByuv420p\fP also -works. -Since mpv 0.25.0, \fBno\fP is an accepted value, which lets the decoder pick -the format on newer FFmpeg versions (will use \fBnv12\fP on older versions). +.B \fB\-\-vaapi\-device=<device file>\fP +Choose the DRM device for \fBvaapi\-copy\fP\&. This should be the path to a +DRM device file. (Default: \fB/dev/dri/renderD128\fP) .TP .B \fB\-\-panscan=<0.0\-1.0>\fP Enables pan\-and\-scan functionality (cropping the sides of e.g. a 16:9 @@ -2201,8 +2670,8 @@ which means the value \fB0\fP would rotate the video according to the rotation metadata.) .TP .B \fB\-\-video\-stereo\-mode=<no|mode>\fP -Set the stereo 3D output mode (default: \fBmono\fP). This is done by inserting -the \fBstereo3d\fP conversion filter. +Set the stereo 3D output mode (default: \fBmono\fP). This is mostly broken and +thus deprecated. .sp The pseudo\-mode \fBno\fP disables automatic conversion completely. .sp @@ -2241,8 +2710,8 @@ This option is disabled if the \fB\-\-no\-keepaspect\fP option is used. determined using a fixed framerate value (either using the \fB\-\-fps\fP option, or using file information). Sometimes, files with very broken timestamps can be played somewhat well in this mode. Note that video -filters, subtitle rendering and audio synchronization can be completely -broken in this mode. +filters, subtitle rendering, seeking (including hr\-seeks and backstepping), +and audio synchronization can be completely broken in this mode. .TP .B \fB\-\-fps=<float>\fP Override video framerate. Useful if the original value is wrong or missing. @@ -2269,6 +2738,8 @@ deinterlacing filters, unless you take care. (Since mpv 0.27.0, even the hardware deinterlace filters will conflict. Also since that version, \fB\-\-deinterlace=auto\fP was removed, which used to mean that the default interlacing option of possibly inserted video filters was used.) +.sp +Note that this will make video look worse if it\(aqs not actually interlaced. .TP .B \fB\-\-frames=<number>\fP Play/convert only first \fB<number>\fP video frames, then quit. @@ -2347,7 +2818,7 @@ Fallback to software decoding if the hardware\-accelerated decoder fails N frames fail to decode in a row. 1 is equivalent to \fByes\fP\&. .TP .B \fB\-\-vd\-lavc\-dr=<yes|no>\fP -Enable direct rendering (default: no). If this is set to \fByes\fP, the +Enable direct rendering (default: yes). If this is set to \fByes\fP, the video will be decoded directly to GPU video memory (or staging buffers). This can speed up video upload, and may help with large resolutions or slow hardware. This works only with the following VOs: @@ -2355,19 +2826,16 @@ slow hardware. This works only with the following VOs: .INDENT 3.5 .INDENT 0.0 .IP \(bu 2 -\fBopengl\fP: requires at least OpenGL 4.4. +\fBgpu\fP: requires at least OpenGL 4.4 or Vulkan. .UNINDENT .UNINDENT .UNINDENT .sp -(In particular, this can\(aqt be made work with \fBopengl\-cb\fP\&.) +(In particular, this can\(aqt be made work with \fBopengl\-cb\fP, but the libmpv +render API has optional support.) .sp Using video filters of any kind that write to the image data (or output newly allocated frames) will silently disable the DR code path. -.sp -There are some corner cases that will result in undefined behavior (crashes -and other strange behavior) if this option is enabled. These are pending -towards being fixed properly at a later point. .TP .B \fB\-\-vd\-lavc\-bitexact\fP Only use bit\-exact algorithms in all decoding steps (for codec testing). @@ -2446,6 +2914,19 @@ Number of threads to use for decoding. Whether threading is actually supported depends on codec (default: 0). 0 means autodetect number of cores on the machine and use that, up to the maximum of 16. You can set more than 16 threads manually. +.TP +.B \fB\-\-vd\-lavc\-assume\-old\-x264=<yes|no>\fP +Assume the video was encoded by an old, buggy x264 version (default: no). +Normally, this is autodetected by libavcodec. But if the bitstream contains +no x264 version info (or it was somehow skipped), and the stream was in fact +encoded by an old x264 version (build 150 or earlier), and if the stream +uses \fB4:4:4\fP chroma, then libavcodec will by default show corrupted video. +This option sets the libavcodec \fBx264_build\fP option to \fB150\fP, which +means that if the stream contains no version info, or was not encoded by +x264 at all, it assumes it was encoded by the old version. Enabling this +option is pretty safe if you want your broken files to work, but in theory +this can break on streams not encoded by x264, or if a stream encoded by a +newer x264 version contains no version info. .UNINDENT .SS Audio .INDENT 0.0 @@ -2469,7 +2950,9 @@ can be retrieved by API by using the \fBaudio\-device\-list\fP property. While the option normally takes one of the strings as indicated by the methods above, you can also force the device for most AOs by building it manually. For example \fBname/foobar\fP forces the AO \fBname\fP to use the -device \fBfoobar\fP\&. +device \fBfoobar\fP\&. However, the \fB\-\-ao\fP option will strictly force a +specific AO. To avoid confusion, don\(aqt use \fB\-\-ao\fP and \fB\-\-audio\-device\fP +together. .INDENT 7.0 .INDENT 3.5 .IP "Example for ALSA" @@ -2524,11 +3007,11 @@ should not need these for typical use. List of codecs for which compressed audio passthrough should be used. This works for both classic S/PDIF and HDMI. .sp -Possible codecs are \fBac3\fP, \fBdts\fP, \fBdts\-hd\fP\&. Multiple codecs can be -specified by separating them with \fB,\fP\&. \fBdts\fP refers to low bitrate DTS -core, while \fBdts\-hd\fP refers to DTS MA (receiver and OS support varies). -If both \fBdts\fP and \fBdts\-hd\fP are specified, it behaves equivalent to -specifying \fBdts\-hd\fP only. +Possible codecs are \fBac3\fP, \fBdts\fP, \fBdts\-hd\fP, \fBeac3\fP, \fBtruehd\fP\&. +Multiple codecs can be specified by separating them with \fB,\fP\&. \fBdts\fP +refers to low bitrate DTS core, while \fBdts\-hd\fP refers to DTS MA (receiver +and OS support varies). If both \fBdts\fP and \fBdts\-hd\fP are specified, it +behaves equivalent to specifying \fBdts\-hd\fP only. .sp In earlier mpv versions you could use \fB\-\-ad\fP to force the spdif wrapper. This does not work anymore. @@ -2600,14 +3083,6 @@ Gain in dB to apply if the file has no replay gain tags. This option is always applied if the replaygain logic is somehow inactive. If this is applied, no other replaygain options are applied. .TP -.B \fB\-\-balance=<value>\fP -How much left/right channels contribute to the audio. (The implementation -of this feature is rather odd. It doesn\(aqt change the volumes of each -channel, but instead sets up a pan matrix to mix the left and right -channels.) -.sp -Deprecated. -.TP .B \fB\-\-audio\-delay=<sec>\fP Audio delay in seconds (positive or negative float value). Positive values delay the audio, and negative values delay the video. @@ -2740,6 +3215,10 @@ before the audio device is opened. .sp If the channel layout of the media file (i.e. the decoder) and the AO\(aqs channel layout don\(aqt match, mpv will attempt to insert a conversion filter. +You may need to change the channel layout of the system mixer to achieve +your desired output as mpv does not have control over it. Another +work\-around for this on some AOs is to use \fB\-\-audio\-exclusive=yes\fP to +circumvent the system mixer entirely. .INDENT 7.0 .INDENT 3.5 .IP "Warning" @@ -2756,16 +3235,6 @@ do 7.1 would be served by: \fB\-\-audio\-channels=7.1,5.1,stereo\fP .UNINDENT .UNINDENT .TP -.B \fB\-\-audio\-normalize\-downmix=<yes|no>\fP -Enable/disable normalization if surround audio is downmixed to stereo -(default: no). If this is disabled, downmix can cause clipping. If it\(aqs -enabled, the output might be too silent. It depends on the source audio. -.sp -Technically, this changes the \fBnormalize\fP suboption of the -\fBlavrresample\fP audio filter, which performs the downmixing. -.sp -If downmix happens outside of mpv for some reason, this has no effect. -.TP .B \fB\-\-audio\-display=<no|attachment>\fP Setting this option to \fBattachment\fP (default) will display image attachments (e.g. album cover art) when playing audio files. It will @@ -2822,9 +3291,10 @@ first initialized with). If the audio format the decoder output changes, the audio device is closed and reopened. This means that you will normally get gapless audio with files that were encoded using the same settings, but might not be gapless in other cases. -(Unlike with \fByes\fP, you don\(aqt have to worry about corner cases -like the first file setting a very low quality output format, and -ruining the playback of higher quality files that follow.) +The exact conditions under which the audio device is kept open is +an implementation detail, and can change from version to version. +Currently, the device is kept even if the sample format changes, +but the sample formats are convertible. .UNINDENT .sp \fBNOTE:\fP @@ -2941,7 +3411,7 @@ printed by \fB\-\-sub\-demuxer=help\fP\&. .B \fB\-\-sub\-delay=<sec>\fP Delays subtitles by \fB<sec>\fP seconds. Can be negative. .TP -.B \fB\-\-sub\-files=<file\-list>\fP +.B \fB\-\-sub\-files=<file\-list>\fP, \fB\-\-sub\-file=<filename>\fP Add a subtitle file to the list of external subtitles. .sp If you use \fB\-\-sub\-file\fP only once, this subtitle file is displayed by @@ -2953,7 +3423,11 @@ two subtitles at once: use \fB\-\-sid\fP to select the first subtitle index, and \fB\-\-secondary\-sid\fP to select the second index. (The index is printed on the terminal output after the \fB\-\-sid=\fP in the list of streams.) .sp -This is a list option. See \fI\%List Options\fP for details. +\fB\-\-sub\-files\fP is a list option (see \fI\%List Options\fP for details), and +can take multiple file names separated by \fB:\fP (Unix) or \fB;\fP (Windows), +while \fB\-\-sub\-file\fP takes a single filename, but can be used multiple +times to add multiple files. Technically, \fB\-\-sub\-file\fP is a CLI/config +file only alias for \fB\-\-sub\-files\-append\fP\&. .TP .B \fB\-\-secondary\-sid=<ID|auto|no>\fP Select a secondary subtitle stream. This is similar to \fB\-\-sid\fP\&. If a @@ -3479,7 +3953,8 @@ of the text increases or decreases as well. Default: 55. .TP .B \fB\-\-sub\-back\-color=<color>\fP -See \fB\-\-sub\-color\fP\&. Color used for sub text background. +See \fB\-\-sub\-color\fP\&. Color used for sub text background. You can use +\fB\-\-sub\-shadow\-offset\fP to change its size relative to the text. .TP .B \fB\-\-sub\-blur=<0..20.0>\fP Gaussian blur factor. 0 means no blur applied (default). @@ -3622,6 +4097,18 @@ Will also remove speaker labels and text within parentheses using both lower and upper case letters. .sp Default: \fBno\fP\&. +.TP +.B \fB\-\-sub\-create\-cc\-track=<yes|no>\fP +For every video stream, create a closed captions track (default: no). The +only purpose is to make the track available for selection at the start of +playback, instead of creating it lazily. This applies only to +\fBATSC A53 Part 4 Closed Captions\fP (displayed by mpv as subtitle tracks +using the codec \fBeia_608\fP). The CC track is marked "default" and selected +according to the normal subtitle track selection rules. You can then use +\fB\-\-sid\fP to explicitly select the correct track too. +.sp +If the video stream contains no closed captions, or if no video is being +decoded, the CC track will remain empty and will not show any text. .UNINDENT .SS Window .INDENT 0.0 @@ -3670,7 +4157,7 @@ depending on what the user provided with the \fBscreen\fP option. .INDENT 3.5 .IP "Note (X11)" .sp -This option does works properly only with window managers which +This option works properly only with window managers which understand the EWMH \fB_NET_WM_FULLSCREEN_MONITORS\fP hint. .UNINDENT .UNINDENT @@ -3750,6 +4237,13 @@ you seek to the last frame. .sp This option does not affect the framerate used for \fBmf://\fP or \fB\-\-merge\-files\fP\&. For that, use \fB\-\-mf\-fps\fP instead. +.sp +Setting \fB\-\-image\-display\-duration\fP hides the OSC and does not track +playback time on the command\-line output, and also does not duplicate +the image frame when encoding. To force the player into "dumb mode" +and actually count out seconds, or to duplicate the image when +encoding, you need to use \fB\-\-demuxer=lavf \-\-demuxer\-lavf\-o=loop=1\fP, +and use \fB\-\-length\fP or \fB\-\-frames\fP to stop after a particular time. .TP .B \fB\-\-force\-window=<yes|no|immediate>\fP Create a video output window even if there is no video. This can be useful @@ -3989,8 +4483,8 @@ multiple files (one (un)initialization for each file). .B \fB\-\-force\-rgba\-osd\-rendering\fP Change how some video outputs render the OSD and text subtitles. This does not change appearance of the subtitles and only has performance -implications. For VOs which support native ASS rendering (like \fBvdpau\fP, -\fBopengl\fP, \fBdirect3d\fP), this can be slightly faster or slower, +implications. For VOs which support native ASS rendering (like \fBgpu\fP, +\fBvdpau\fP, \fBdirect3d\fP), this can be slightly faster or slower, depending on GPU drivers and hardware. For other VOs, this just makes rendering slower. .TP @@ -3998,70 +4492,6 @@ rendering slower. Forcefully move mpv\(aqs video output window to default location whenever there is a change in video parameters, video stream or file. This used to be the default behavior. Currently only affects X11 VOs. -.UNINDENT -.sp -\fB\-\-heartbeat\-cmd=<command>\fP -.INDENT 0.0 -.INDENT 3.5 -.sp -\fBWARNING:\fP -.INDENT 0.0 -.INDENT 3.5 -This option is redundant with Lua scripting. Further, it shouldn\(aqt be -needed for disabling screensaver anyway, since mpv will call -\fBxdg\-screensaver\fP when using X11 backend. As a consequence this -option has been deprecated with no direct replacement. -.UNINDENT -.UNINDENT -.sp -Command that is executed every 30 seconds during playback via \fIsystem()\fP \- -i.e. using the shell. The time between the commands can be customized with -the \fB\-\-heartbeat\-interval\fP option. The command is not run while playback -is paused. -.sp -\fBNOTE:\fP -.INDENT 0.0 -.INDENT 3.5 -mpv uses this command without any checking. It is your responsibility to -ensure it does not cause security problems (e.g. make sure to use full -paths if "." is in your path like on Windows). It also only works when -playing video (i.e. not with \fB\-\-no\-video\fP but works with -\fB\-\-vo=null\fP). -.UNINDENT -.UNINDENT -.sp -This can be "misused" to disable screensavers that do not support the -proper X API (see also \fB\-\-stop\-screensaver\fP). If you think this is too -complicated, ask the author of the screensaver program to support the -proper X APIs. Note that the \fB\-\-stop\-screensaver\fP does not influence the -heartbeat code at all. -.INDENT 0.0 -.INDENT 3.5 -.IP "Example for xscreensaver" -.sp -\fBmpv \-\-heartbeat\-cmd="xscreensaver\-command \-deactivate" file\fP -.UNINDENT -.UNINDENT -.INDENT 0.0 -.INDENT 3.5 -.IP "Example for GNOME screensaver" -.sp -\fBmpv \-\-heartbeat\-cmd="gnome\-screensaver\-command \-\-deactivate" file\fP -.UNINDENT -.UNINDENT -.UNINDENT -.UNINDENT -.INDENT 0.0 -.TP -.B \fB\-\-heartbeat\-interval=<sec>\fP -Time between \fB\-\-heartbeat\-cmd\fP invocations in seconds (default: 30). -.sp -\fBNOTE:\fP -.INDENT 7.0 -.INDENT 3.5 -This does not affect the normal screensaver operation in any way. -.UNINDENT -.UNINDENT .TP .B \fB\-\-no\-keepaspect\fP, \fB\-\-keepaspect\fP \fB\-\-no\-keepaspect\fP will always stretch the video to window size, and will @@ -4115,8 +4545,7 @@ startup and turns it on again on exit (default: yes). The screensaver is always re\-enabled when the player is paused. .sp This is not supported on all video outputs or platforms. Sometimes it is -implemented, but does not work (known to happen with GNOME). You might be -able to work around this using \fB\-\-heartbeat\-cmd\fP instead. +implemented, but does not work (especially with Linux "desktops"). .TP .B \fB\-\-wid=<ID>\fP This tells mpv to attach to an existing window. If a VO is selected that @@ -4138,6 +4567,11 @@ On OSX/Cocoa, the ID is interpreted as \fBNSView*\fP\&. Pass it as value cast to \fBintptr_t\fP\&. mpv will create its own sub\-view. Because OSX does not support window embedding of foreign processes, this works only with libmpv, and will crash when used from the command line. +.sp +On Android, the ID is interpreted as \fBandroid.view.Surface\fP\&. Pass it as a +value cast to \fBintptr_t\fP\&. Use with \fB\-\-vo=mediacodec_embed\fP and +\fB\-\-hwdec=mediacodec\fP for direct rendering using MediaCodec, or with +\fB\-\-vo=gpu \-\-gpu\-context=android\fP (with or without \fB\-\-hwdec=mediacodec\-copy\fP). .TP .B \fB\-\-no\-window\-dragging\fP Don\(aqt move the window when clicking on it and moving the mouse pointer. @@ -4305,7 +4739,7 @@ some checks. Give the demuxer name as printed by \fB\-\-demuxer=help\fP\&. .B \fB\-\-demuxer\-lavf\-analyzeduration=<value>\fP Maximum length in seconds to analyze the stream properties. .TP -.B \fB\-\-demuxer\-lavf\-probe\-info=<yes|no|auto>\fP +.B \fB\-\-demuxer\-lavf\-probe\-info=<yes|no|auto|nostreams>\fP Whether to probe stream information (default: auto). Technically, this controls whether libavformat\(aqs \fBavformat_find_stream_info()\fP function is called. Usually it\(aqs safer to call it, but it can also make startup @@ -4313,6 +4747,10 @@ slower. .sp The \fBauto\fP choice (the default) tries to skip this for a few know\-safe whitelisted formats, while calling it for everything else. +.sp +The \fBnostreams\fP choice only calls it if and only if the file seems to +contain no streams after opening (helpful in cases when calling the function +is needed to detect streams at all, such as with FLV files). .TP .B \fB\-\-demuxer\-lavf\-probescore=<1\-100>\fP Minimum required libavformat probe score. Lower values will require @@ -4337,12 +4775,6 @@ by explicitly checking for them. Most of these compensate for weird or imperfect behavior from libavformat demuxers. Passing \fBno\fP disables these. For debugging and testing only. .TP -.B \fB\-\-demuxer\-lavf\-genpts\-mode=<no|lavf>\fP -Mode for deriving missing packet PTS values from packet DTS. \fBlavf\fP -enables libavformat\(aqs \fBgenpts\fP option. \fBno\fP disables it. This used -to be enabled by default, but then it was deemed as not needed anymore. -Enabling this might help with timestamp problems, or make them worse. -.TP .B \fB\-\-demuxer\-lavf\-o=<key>=<value>[,<key>=<value>[,...]]\fP Pass AVOptions to libavformat demuxer. .sp @@ -4483,7 +4915,7 @@ Set the video codec instead of selecting the rawvideo codec when using .B \fB\-\-demuxer\-rawvideo\-size=<value>\fP Frame size in bytes when using \fB\-\-demuxer=rawvideo\fP\&. .TP -.B \fB\-\-demuxer\-max\-bytes=<bytes>\fP +.B \fB\-\-demuxer\-max\-bytes=<bytesize>\fP This controls how much the demuxer is allowed to buffer ahead. The demuxer will normally try to read ahead as much as necessary, or as much is requested with \fB\-\-demuxer\-readahead\-secs\fP\&. The option can be used to @@ -4495,19 +4927,49 @@ slightly overstepped due to technical reasons.) Set these limits higher if you get a packet queue overflow warning, and you think normal playback would be possible with a larger packet queue. .sp +See \fB\-\-list\-options\fP for defaults and value range. \fB<bytesize>\fP options +accept suffixes such as \fBKiB\fP and \fBMiB\fP\&. +.TP +.B \fB\-\-demuxer\-max\-back\-bytes=<bytesize>\fP +This controls how much past data the demuxer is allowed to preserve. This +is useful only if the \fB\-\-demuxer\-seekable\-cache\fP option is enabled. +Unlike the forward cache, there is no control how many seconds are actually +cached \- it will simply use as much memory this option allows. Setting this +option to 0 will strictly disable any back buffer, but this will lead to +the situation that the forward seek range starts after the current playback +position (as it removes past packets that are seek points). +.sp +Keep in mind that other buffers in the player (like decoders) will cause the +demuxer to cache "future" frames in the back buffer, which can skew the +impression about how much data the backbuffer contains. +.sp See \fB\-\-list\-options\fP for defaults and value range. .TP -.B \fB\-\-demuxer\-max\-packets=<packets>\fP -Quite similar \fB\-\-demuxer\-max\-bytes=<bytes>\fP\&. Deprecated, because the -other option does basically the same job. Since mpv 0.25.0, the code -tries to account for per\-packet overhead, which is why this option becomes -rather pointless. +.B \fB\-\-demuxer\-seekable\-cache=<yes|no|auto>\fP +This controls whether seeking can use the demuxer cache (default: auto). If +enabled, short seek offsets will not trigger a low level demuxer seek +(which means for example that slow network round trips or FFmpeg seek bugs +can be avoided). If a seek cannot happen within the cached range, a low +level seek will be triggered. Seeking outside of the cache will start a new +cached range, but can discard the old cache range if the demuxer exhibits +certain unsupported behavior. +.sp +Keep in mind that some events can flush the cache or force a low level +seek anyway, such as switching tracks, or attempting to seek before the +start or after the end of the file. +.sp +The special value \fBauto\fP means \fByes\fP in the same situation as +\fB\-\-cache\-secs\fP is used (i.e. when the stream appears to be a network +stream or the stream cache is enabled). .TP .B \fB\-\-demuxer\-thread=<yes|no>\fP Run the demuxer in a separate thread, and let it prefetch a certain amount -of packets (default: yes). Having this enabled may lead to smoother -playback, but on the other hand can add delays to seeking or track -switching. +of packets (default: yes). Having this enabled leads to smoother playback, +enables features like prefetching, and prevents that stuck network freezes +the player. On the other hand, it can add overhead, or the background +prefetching can hog CPU resources. +.sp +Disabling this option is not recommended. Use it for debugging only. .TP .B \fB\-\-demuxer\-readahead\-secs=<seconds>\fP If \fB\-\-demuxer\-thread\fP is enabled, this controls how much the demuxer @@ -4683,13 +5145,18 @@ the mpv default key bindings. Whether to load the on\-screen\-controller (default: yes). .TP .B \fB\-\-no\-osd\-bar\fP, \fB\-\-osd\-bar\fP -Disable display of the OSD bar. This will make some things (like seeking) -use OSD text messages instead of the bar. +Disable display of the OSD bar. .sp You can configure this on a per\-command basis in input.conf using \fBosd\-\fP -prefixes, see \fBInput command prefixes\fP\&. If you want to disable the OSD +prefixes, see \fBInput Command Prefixes\fP\&. If you want to disable the OSD completely, use \fB\-\-osd\-level=0\fP\&. .TP +.B \fB\-\-osd\-on\-seek=<no,bar,msg,msg\-bar>\fP +Set what is displayed on the OSD during seeks. The default is \fBbar\fP\&. +.sp +You can configure this on a per\-command basis in input.conf using \fBosd\-\fP +prefixes, see \fBInput Command Prefixes\fP\&. +.TP .B \fB\-\-osd\-duration=<time>\fP Set the duration of the OSD messages in ms (default: 1000). .TP @@ -4714,30 +5181,31 @@ Default: 55. .TP .B \fB\-\-osd\-msg1=<string>\fP Show this string as message on OSD with OSD level 1 (visible by default). -The message will be visible by default, and as long no other message +The message will be visible by default, and as long as no other message covers it, and the OSD level isn\(aqt changed (see \fB\-\-osd\-level\fP). Expands properties; see \fI\%Property Expansion\fP\&. .TP .B \fB\-\-osd\-msg2=<string>\fP -Similar as \fB\-\-osd\-msg1\fP, but for OSD level 2. If this is an empty string +Similar to \fB\-\-osd\-msg1\fP, but for OSD level 2. If this is an empty string (default), then the playback time is shown. .TP .B \fB\-\-osd\-msg3=<string>\fP -Similar as \fB\-\-osd\-msg1\fP, but for OSD level 3. If this is an empty string +Similar to \fB\-\-osd\-msg1\fP, but for OSD level 3. If this is an empty string (default), then the playback time, duration, and some more information is shown. .sp -This is also used for the \fBshow\-progress\fP command (by default mapped to -\fBP\fP), or in some non\-default cases when seeking. +This is used for the \fBshow\-progress\fP command (by default mapped to \fBP\fP), +and when seeking if enabled with \fB\-\-osd\-on\-seek\fP or by \fBosd\-\fP prefixes +in input.conf (see \fBInput Command Prefixes\fP). .sp \fB\-\-osd\-status\-msg\fP is a legacy equivalent (but with a minor difference). .TP .B \fB\-\-osd\-status\-msg=<string>\fP Show a custom string during playback instead of the standard status text. This overrides the status text used for \fB\-\-osd\-level=3\fP, when using the -\fBshow\-progress\fP command (by default mapped to \fBP\fP), or in some -non\-default cases when seeking. Expands properties. See -\fI\%Property Expansion\fP\&. +\fBshow\-progress\fP command (by default mapped to \fBP\fP), and when seeking if +enabled with \fB\-\-osd\-on\-seek\fP or \fBosd\-\fP prefixes in input.conf (see +\fBInput Command Prefixes\fP). Expands properties. See \fI\%Property Expansion\fP\&. .sp This option has been replaced with \fB\-\-osd\-msg3\fP\&. The only difference is that this option implicitly includes \fB${osd\-sym\-cc}\fP\&. This option is @@ -4910,7 +5378,8 @@ Default: \fBno\fP\&. .B \fB\-\-screenshot\-high\-bit\-depth=<yes|no>\fP If possible, write screenshots with a bit depth similar to the source video (default: yes). This is interesting in particular for PNG, as this -sometimes triggers writing 16 bit PNGs with huge file sizes. +sometimes triggers writing 16 bit PNGs with huge file sizes. This will also +include an unused alpha channel in the resulting files if 16 bit is used. .TP .B \fB\-\-screenshot\-template=<template>\fP Specify the filename template used to save screenshots. The template @@ -5087,6 +5556,54 @@ Software scaler chroma horizontal shifting. See \fB\-\-sws\-scaler\fP\&. .B \fB\-\-sws\-cvs=<v>\fP Software scaler chroma vertical shifting. See \fB\-\-sws\-scaler\fP\&. .UNINDENT +.SS Audio Resampler +.sp +This controls the default options of any resampling done by mpv (but not within +libavfilter, within the system audio API resampler, or any other places). +.sp +It also sets the defaults for the \fBlavrresample\fP audio filter. +.INDENT 0.0 +.TP +.B \fB\-\-audio\-resample\-filter\-size=<length>\fP +Length of the filter with respect to the lower sampling rate. (default: +16) +.TP +.B \fB\-\-audio\-resample\-phase\-shift=<count>\fP +Log2 of the number of polyphase entries. (..., 10\->1024, 11\->2048, +12\->4096, ...) (default: 10\->1024) +.TP +.B \fB\-\-audio\-resample\-cutoff=<cutoff>\fP +Cutoff frequency (0.0\-1.0), default set depending upon filter length. +.TP +.B \fB\-\-audio\-resample\-linear=<yes|no>\fP +If set then filters will be linearly interpolated between polyphase +entries. (default: no) +.TP +.B \fB\-\-audio\-normalize\-downmix=<yes|no>\fP +Enable/disable normalization if surround audio is downmixed to stereo +(default: no). If this is disabled, downmix can cause clipping. If it\(aqs +enabled, the output might be too quiet. It depends on the source audio. +.sp +Technically, this changes the \fBnormalize\fP suboption of the +\fBlavrresample\fP audio filter, which performs the downmixing. +.sp +If downmix happens outside of mpv for some reason, or in the decoder +(decoder downmixing), or in the audio output (system mixer), this has no +effect. +.TP +.B \fB\-\-audio\-resample\-max\-output\-size=<length>\fP +Limit maximum size of audio frames filtered at once, in ms (default: 40). +The output size size is limited in order to make resample speed changes +react faster. This is necessary especially if decoders or filters output +very large frame sizes (like some lossless codecs or some DRC filters). +This option does not affect the resampling algorithm in any way. +.sp +For testing/debugging only. Can be removed or changed any time. +.TP +.B \fB\-\-audio\-swresample\-o=<string>\fP +Set AVOptions on the SwrContext or AVAudioResampleContext. These should +be documented by FFmpeg or Libav. +.UNINDENT .SS Terminal .INDENT 0.0 .TP @@ -5113,12 +5630,16 @@ Disable colorful console output on terminals. .TP .B \fB\-\-msg\-level=<module1=level1,module2=level2,...>\fP Control verbosity directly for each module. The \fBall\fP module changes the -verbosity of all the modules not explicitly specified on the command line. +verbosity of all the modules. The verbosity changes from this option are +applied in order from left to right, and each item can override a previous +one. .sp Run mpv with \fB\-\-msg\-level=all=trace\fP to see all messages mpv outputs. You can use the module names printed in the output (prefixed to each line in \fB[...]\fP) to limit the output to interesting modules. .sp +This also affects \fB\-\-log\-file\fP, and in certain cases libmpv API logging. +.sp \fBNOTE:\fP .INDENT 7.0 .INDENT 3.5 @@ -5478,7 +5999,7 @@ seeking back. The actual maximum percentage will usually be the ratio between readahead and backbuffer sizes. .TP .B \fB\-\-cache\-default=<kBytes|no>\fP -Set the size of the cache in kilobytes (default: 75000 KB). Using \fBno\fP +Set the size of the cache in kilobytes (default: 10000 KB). Using \fBno\fP will not automatically enable the cache e.g. when playing from a network stream. Note that using \fB\-\-cache\fP will always override this option. .TP @@ -5499,7 +6020,7 @@ on the situation, either of these might be slower than the other method. This option allows control over this. .TP .B \fB\-\-cache\-backbuffer=<kBytes>\fP -Size of the cache back buffer (default: 75000 KB). This will add to the total +Size of the cache back buffer (default: 10000 KB). This will add to the total cache size, and reserved the amount for seeking back. The reserved amount will not be used for readahead, and instead preserves already read data to enable fast seeking back. @@ -5564,11 +6085,37 @@ Turn off input stream caching. See \fB\-\-cache\fP\&. .B \fB\-\-cache\-secs=<seconds>\fP How many seconds of audio/video to prefetch if the cache is active. This overrides the \fB\-\-demuxer\-readahead\-secs\fP option if and only if the cache -is enabled and the value is larger. (Default: 10.) -.TP -.B \fB\-\-cache\-pause\fP, \fB\-\-no\-cache\-pause\fP -Whether the player should automatically pause when the cache runs low, -and unpause once more data is available ("buffering"). +is enabled and the value is larger. The default value is set to something +very high, so the actually achieved readahead will usually be limited by +the value of the \fB\-\-demuxer\-max\-bytes\fP option. +.TP +.B \fB\-\-cache\-pause=<yes|no>\fP +Whether the player should automatically pause when the cache runs out of +data and stalls decoding/playback (default: yes). If enabled, it will +pause and unpause once more data is available, aka "buffering". +.TP +.B \fB\-\-cache\-pause\-wait=<seconds>\fP +Number of seconds the packet cache should have buffered before starting +playback again if "buffering" was entered (default: 1). This can be used +to control how long the player rebuffers if \fB\-\-cache\-pause\fP is enabled, +and the demuxer underruns. If the given time is higher than the maximum +set with \fB\-\-cache\-secs\fP or \fB\-\-demuxer\-readahead\-secs\fP, or prefetching +ends before that for some other reason (like file end), playback resumes +earlier. +.TP +.B \fB\-\-cache\-pause\-initial=<yes|no>\fP +Enter "buffering" mode before starting playback (default: no). This can be +used to ensure playback starts smoothly, in exchange for waiting some time +to prefetch network data (as controlled by \fB\-\-cache\-pause\-wait\fP). For +example, some common behavior is that playback starts, but network caches +immediately underrun when trying to decode more data as playback progresses. +.sp +Another thing that can happen is that the network prefetching is so CPU +demanding (due to demuxing in the background) that playback drops frames +at first. In these cases, it helps enabling this option, and setting +\fB\-\-cache\-secs\fP and \fB\-\-cache\-pause\-wait\fP to roughly the same value. +.sp +This option also triggers when playback is restarted after seeking. .UNINDENT .SS Network .INDENT 0.0 @@ -5620,6 +6167,13 @@ Connection: close .UNINDENT .UNINDENT .TP +.B \fB\-\-http\-proxy=<proxy>\fP +URL of the HTTP/HTTPS proxy. If this is set, the \fBhttp_proxy\fP environment +is ignored. The \fBno_proxy\fP environment variable is still respected. This +option is silently ignored if it does not start with \fBhttp://\fP\&. Proxies +are not used for https URLs. Setting this option does not try to make the +ytdl script use the proxy. +.TP .B \fB\-\-tls\-ca\-file=<filename>\fP Certificate authority database file for use with TLS. (Silently fails with older FFmpeg or Libav versions.) @@ -5642,6 +6196,19 @@ Specify a referrer path or URL for HTTP requests. Specify the network timeout in seconds. This affects at least HTTP. The special value 0 (default) uses the FFmpeg/Libav defaults. If a protocol is used which does not support timeouts, this option is silently ignored. +.sp +\fBWARNING:\fP +.INDENT 7.0 +.INDENT 3.5 +This breaks the RTSP protocol, because of inconsistent FFmpeg API +regarding its internal timeout option. Not only does the RTSP timeout +option accept different units (seconds instead of microseconds, causing +mpv to pass it huge values), it will also overflow FFmpeg internal +calculations. The worst is that merely setting the option will put RTSP +into listening mode, which breaks any client uses. Do not use this +option with RTSP URLs. +.UNINDENT +.UNINDENT .TP .B \fB\-\-rtsp\-transport=<lavf|udp|tcp|http>\fP Select RTSP transport method (default: tcp). This selects the underlying @@ -5744,10 +6311,24 @@ or for static setups with a specially engineered ALSA configuration (in this case you should always force the same layout with \fB\-\-audio\-channels\fP, or it will work only for files which use the layout implicit to your ALSA device). +.TP +.B \fB\-\-alsa\-buffer\-time=<microseconds>\fP +Set the requested buffer time in microseconds. A value of 0 skips requesting +anything from the ALSA API. This and the \fB\-\-alsa\-periods\fP option uses the +ALSA \fBnear\fP functions to set the requested parameters. If doing so results +in an empty configuration set, setting these parameters is skipped. +.sp +Both options control the buffer size. A low buffer size can lead to higher +CPU usage and audio dropouts, while a high buffer size can lead to higher +latency in volume changes and other filtering. +.TP +.B \fB\-\-alsa\-periods=<number>\fP +Number of periods requested from the ALSA API. See \fB\-\-alsa\-buffer\-time\fP +for further remarks. .UNINDENT -.SS OpenGL renderer options +.SS GPU renderer options .sp -The following video options are currently all specific to \fB\-\-vo=opengl\fP and +The following video options are currently all specific to \fB\-\-vo=gpu\fP and \fB\-\-vo=opengl\-cb\fP only, which are the only VOs that implement them. .INDENT 0.0 .TP @@ -5760,7 +6341,7 @@ Bilinear hardware texture filtering (fastest, very low quality). This is the default for compatibility reasons. .TP .B \fBspline36\fP -Mid quality and speed. This is the default when using \fBopengl\-hq\fP\&. +Mid quality and speed. This is the default when using \fBgpu\-hq\fP\&. .TP .B \fBlanczos\fP Lanczos scaling. Provides mid quality and speed. Generally worse than @@ -5827,9 +6408,11 @@ used if \fB\-\-interpolation\fP is enabled. The only valid choices for \fB\-\-tscale\fP are separable convolution filters (use \fB\-\-tscale=help\fP to get a list). The default is \fBmitchell\fP\&. .sp -Note that the maximum supported filter radius is currently 3, due to -limitations in the number of video textures that can be loaded -simultaneously. +Common \fB\-\-tscale\fP choices include \fBoversample\fP, \fBlinear\fP, +\fBcatmull_rom\fP, \fBmitchell\fP, \fBgaussian\fP, or \fBbicubic\fP\&. These are +listed in increasing order of smoothness/blurriness, with \fBbicubic\fP +being the smoothest/blurriest and \fBoversample\fP being the sharpest/least +smooth. .TP .B \fB\-\-scale\-param1=<value>\fP, \fB\-\-scale\-param2=<value>\fP, \fB\-\-cscale\-param1=<value>\fP, \fB\-\-cscale\-param2=<value>\fP, \fB\-\-dscale\-param1=<value>\fP, \fB\-\-dscale\-param2=<value>\fP, \fB\-\-tscale\-param1=<value>\fP, \fB\-\-tscale\-param2=<value>\fP Set filter parameters. Ignored if the filter is not tunable. Currently, @@ -5938,7 +6521,7 @@ Enabled by default. Note that this option never affects \fB\-\-cscale\fP\&. .TP .B \fB\-\-linear\-scaling\fP Scale in linear light. It should only be used with a -\fB\-\-opengl\-fbo\-format\fP that has at least 16 bit precision. This option +\fB\-\-fbo\-format\fP that has at least 16 bit precision. This option has no effect on HDR content. .TP .B \fB\-\-correct\-downscaling\fP @@ -5965,10 +6548,6 @@ This was not required before mpv 0.14.0. This essentially attempts to interpolate the missing frames by convoluting the video along the temporal axis. The filter used can be controlled using the \fB\-\-tscale\fP setting. -.sp -Note that this relies on vsync to work, see \fB\-\-opengl\-swapinterval\fP for -more information. It should also only be used with an \fB\-\-opengl\-fbo\-format\fP -that has at least 16 bit precision. .TP .B \fB\-\-interpolation\-threshold=<0..1,\-1>\fP Threshold below which frame ratio interpolation gets disabled (default: @@ -6035,10 +6614,10 @@ Determines how often the dithering pattern is updated when \fB\-\-temporal\-dither\fP is in use. 1 (the default) will update on every video frame, 2 on every other frame, etc. .TP -.B \fB\-\-opengl\-debug\fP -Check for OpenGL errors, i.e. call \fBglGetError()\fP\&. Also, request a -debug OpenGL context (which does nothing with current graphics drivers -as of this writing). +.B \fB\-\-gpu\-debug\fP +Enables GPU debugging. What this means depends on the API type. For OpenGL, +it calls \fBglGetError()\fP, and requests a debug context. For Vulkan, it +enables validation layers. .TP .B \fB\-\-opengl\-swapinterval=<n>\fP Interval in displayed frames between two buffer swaps. 1 is equivalent to @@ -6051,7 +6630,107 @@ syncs to the right one. Compositing window managers can also lead to bad results, as can missing or incorrect display FPS information (see \fB\-\-display\-fps\fP). .TP -.B \fB\-\-opengl\-shaders=<file\-list>\fP +.B \fB\-\-vulkan\-swap\-mode=<mode>\fP +Controls the presentation mode of the vulkan swapchain. This is similar +to the \fB\-\-opengl\-swapinterval\fP option. +.INDENT 7.0 +.TP +.B auto +Use the preferred swapchain mode for the vulkan context. (Default) +.TP +.B fifo +Non\-tearing, vsync blocked. Similar to "VSync on". +.TP +.B fifo\-relaxed +Tearing, vsync blocked. Late frames will tear instead of stuttering. +.TP +.B mailbox +Non\-tearing, not vsync blocked. Similar to "triple buffering". +.TP +.B immediate +Tearing, not vsync blocked. Similar to "VSync off". +.UNINDENT +.TP +.B \fB\-\-vulkan\-queue\-count=<1..8>\fP +Controls the number of VkQueues used for rendering (limited by how many +your device supports). In theory, using more queues could enable some +parallelism between frames (when using a \fB\-\-swapchain\-depth\fP higher than +1), but it can also slow things down on hardware where there\(aqs no true +parallelism between queues. (Default: 1) +.TP +.B \fB\-\-vulkan\-async\-transfer\fP +Enables the use of async transfer queues on supported vulkan devices. Using +them allows transfer operations like texture uploads and blits to happen +concurrently with the actual rendering, thus improving overall throughput +and power consumption. Enabled by default, and should be relatively safe. +.TP +.B \fB\-\-vulkan\-async\-compute\fP +Enables the use of async compute queues on supported vulkan devices. Using +this, in theory, allows out\-of\-order scheduling of compute shaders with +graphics shaders, thus enabling the hardware to do more effective work while +waiting for pipeline bubbles and memory operations. Not beneficial on all +GPUs. It\(aqs worth noting that if async compute is enabled, and the device +supports more compute queues than graphics queues (bound by the restrictions +set by \fB\-\-vulkan\-queue\-count\fP), mpv will internally try and prefer the +use of compute shaders over fragment shaders wherever possible. Not enabled +by default, since it seems to cause issues with some drivers. +.TP +.B \fB\-\-d3d11\-warp=<yes|no|auto>\fP +Use WARP (Windows Advanced Rasterization Platform) with the D3D11 GPU +backend (default: auto). This is a high performance software renderer. By +default, it is only used when the system has no hardware adapters that +support D3D11. While the extended GPU features will work with WARP, they +can be very slow. +.TP +.B \fB\-\-d3d11\-feature\-level=<12_1|12_0|11_1|11_0|10_1|10_0|9_3|9_2|9_1>\fP +Select a specific feature level when using the D3D11 GPU backend. By +default, the highest available feature level is used. This option can be +used to select a lower feature level, which is mainly useful for debugging. +Most extended GPU features will not work at 9_x feature levels. +.TP +.B \fB\-\-d3d11\-flip=<yes|no>\fP +Enable flip\-model presentation, which avoids unnecessarily copying the +backbuffer by sharing surfaces with the DWM (default: yes). This may cause +performance issues with older drivers. If flip\-model presentation is not +supported (for example, on Windows 7 without the platform update), mpv will +automatically fall back to the older bitblt presentation model. +.TP +.B \fB\-\-d3d11\-sync\-interval=<0..4>\fP +Schedule each frame to be presented for this number of VBlank intervals. +(default: 1) Setting to 1 will enable VSync, setting to 0 will disable it. +.TP +.B \fB\-\-d3d11va\-zero\-copy=<yes|no>\fP +By default, when using hardware decoding with \fB\-\-gpu\-api=d3d11\fP, the +video image will be copied (GPU\-to\-GPU) from the decoder surface to a +shader resource. Set this option to avoid that copy by sampling directly +from the decoder image. This may increase performance and reduce power +usage, but can cause the image to be sampled incorrectly on the bottom and +right edges due to padding, and may invoke driver bugs, since Direct3D 11 +technically does not allow sampling from a decoder surface (though most +drivers support it.) +.sp +Currently only relevant for \fB\-\-gpu\-api=d3d11\fP\&. +.TP +.B \fB\-\-spirv\-compiler=<compiler>\fP +Controls which compiler is used to translate GLSL to SPIR\-V. This is +(currently) only relevant for \fB\-\-gpu\-api=vulkan\fP\&. The possible choices +are: +.INDENT 7.0 +.TP +.B auto +Use the first available compiler. (Default) +.TP +.B shaderc +Use libshaderc, which is an API wrapper around glslang. This is +generally the most preferred, if available. +.TP +.B nvidia +Use nvidia\(aqs built\-in compiler. Only works for nvidia GPUs. Can be +buggy, but also supports some features glslang does not. Only works +with vulkan. +.UNINDENT +.TP +.B \fB\-\-glsl\-shaders=<file\-list>\fP Custom GLSL hooks. These are a flexible way to add custom fragment shaders, which can be injected at almost arbitrary points in the rendering pipeline, and access all previous intermediate textures. Each use of the option will @@ -6105,7 +6784,7 @@ specified. .TP .B FORMAT <name> (required) The texture format for the samples. Supported texture formats are listed -in debug logging when the \fBopengl\fP VO is initialized (look for +in debug logging when the \fBgpu\fP VO is initialized (look for \fBTexture formats:\fP). Usually, this follows OpenGL naming conventions. For example, \fBrgb16\fP provides 3 channels with normalized 16 bit components. One oddity are float formats: for example, \fBrgba16f\fP has @@ -6266,8 +6945,8 @@ cropped) image. Texture offset introduced by user shaders or options like panscan, video\-align\-x/y, video\-pan\-x/y. .UNINDENT .sp -Internally, vo_opengl may generate any number of the following textures. -Whenever a texture is rendered and saved by vo_opengl, all of the passes +Internally, vo_gpu may generate any number of the following textures. +Whenever a texture is rendered and saved by vo_gpu, all of the passes that have hooked into it will run, in the order they were added by the user. This is a list of the legal hook points: .INDENT 7.0 @@ -6315,12 +6994,12 @@ Only the textures labelled with \fBresizable\fP may be transformed by the pass. When overwriting a texture marked \fBfixed\fP, the WIDTH, HEIGHT and OFFSET must be left at their default values. .TP -.B \fB\-\-opengl\-shader=<file>\fP -CLI/config file only alias for \fB\-\-opengl\-shaders\-append\fP\&. +.B \fB\-\-glsl\-shader=<file>\fP +CLI/config file only alias for \fB\-\-glsl\-shaders\-append\fP\&. .TP .B \fB\-\-deband\fP Enable the debanding algorithm. This greatly reduces the amount of visible -banding, blocking and other quantization artifacts, at the expensive of +banding, blocking and other quantization artifacts, at the expense of very slightly blurring some of the finest details. In practice, it\(aqs virtually always an improvement \- the only reason to disable it would be for performance. @@ -6369,9 +7048,9 @@ alternatives like the \fBewa_lanczossharp\fP scale filter, or the \fB\-\-scale\-blur\fP option. .TP .B \fB\-\-opengl\-glfinish\fP -Call \fBglFinish()\fP before and after swapping buffers (default: disabled). -Slower, but might improve results when doing framedropping. Can completely -ruin performance. The details depend entirely on the OpenGL driver. +Call \fBglFinish()\fP before swapping buffers (default: disabled). Slower, +but might improve results when doing framedropping. Can completely ruin +performance. The details depend entirely on the OpenGL driver. .TP .B \fB\-\-opengl\-waitvsync\fP Call \fBglXWaitVideoSyncSGI\fP after each buffer swap (default: disabled). @@ -6380,15 +7059,6 @@ possible that this makes video output slower, or has no effect at all. .sp X11/GLX only. .TP -.B \fB\-\-opengl\-vsync\-fences=<N>\fP -Synchronize the CPU to the Nth past frame using the \fBGL_ARB_sync\fP -extension. A value of 0 disables this behavior (default). A value of 1 -means it will synchronize to the current frame after rendering it. Like -\fB\-\-glfinish\fP and \fB\-\-waitvsync\fP, this can lower or ruin performance. Its -advantage is that it can span multiple frames, and effectively limit the -number of frames the GPU queues ahead (which also has an influence on -vsync). -.TP .B \fB\-\-opengl\-dwmflush=<no|windowed|yes|auto>\fP Calls \fBDwmFlush\fP after swapping buffers on Windows (default: auto). It also sets \fBSwapInterval(0)\fP to ignore the OpenGL timing. Values are: no @@ -6409,7 +7079,7 @@ By default, the highest available feature level is used. This option can be used to select a lower feature level, which is mainly useful for debugging. Note that OpenGL ES 3.0 is only supported at feature level 10_1 or higher. Most extended OpenGL features will not work at lower feature levels -(similar to \fB\-\-opengl\-dumb\-mode\fP). +(similar to \fB\-\-gpu\-dumb\-mode\fP). .sp Windows with ANGLE only. .TP @@ -6449,14 +7119,6 @@ effect. .sp Windows with ANGLE only. .TP -.B \fB\-\-angle\-max\-frame\-latency=<1\-16>\fP -Sets the maximum number of frames that the system is allowed to queue for -rendering with the ANGLE backend (default: 3). Lower values should make -VSync timing more accurate, but a value of \fB1\fP requires powerful -hardware, since the CPU will not be able to "render ahead" of the GPU. -.sp -Windows with ANGLE only. -.TP .B \fB\-\-angle\-renderer=<d3d9|d3d11|auto>\fP Forces a specific renderer when using the ANGLE backend (default: auto). In auto mode this will pick D3D11 for systems that support Direct3D 11 feature @@ -6465,18 +7127,7 @@ debugging purposes. Normally there is no reason to force a specific renderer, though \fB\-\-angle\-renderer=d3d9\fP may give slightly better performance on old hardware. Note that the D3D9 renderer only supports OpenGL ES 2.0, so most extended OpenGL features will not work if this -renderer is selected (similar to \fB\-\-opengl\-dumb\-mode\fP). -.sp -Windows with ANGLE only. -.TP -.B \fB\-\-angle\-swapchain\-length=<2\-16>\fP -Sets the number of buffers in the D3D11 presentation queue when using the -ANGLE backend (default: 6). At least 2 are required, since one is the back -buffer that mpv renders to and the other is the front buffer that is -presented by the DWM. Additional buffers can improve performance, because -for example, mpv will not have to wait on the DWM to release the front -buffer before rendering a new frame to it. For this reason, Microsoft -recommends at least 4. +renderer is selected (similar to \fB\-\-gpu\-dumb\-mode\fP). .sp Windows with ANGLE only. .TP @@ -6486,24 +7137,77 @@ Deactivates the automatic graphics switching and forces the dedicated GPU. .sp OS X only. .TP -.B \fB\-\-opengl\-sw\fP +.B \fB\-\-macos\-title\-bar\-style=<dark|ultradark|light|mediumlight|auto>\fP +Sets the styling of the title bar (default: dark). +OS X and cocoa\-cb only +.INDENT 7.0 +.TP +.B dark +Dark title bar with vibrancy, a subtle blurring effect that +dynamically blends the background (Video) into the title bar. +.TP +.B ultradark +Darker title bar with vibrancy (like QuickTime Player). +.TP +.B light +Bright title bar with vibrancy. +.TP +.B mediumlight +Less bright title bar with vibrancy. +.TP +.B auto +Detects the system settings and sets the title bar styling +appropriately, either ultradark or mediumlight. +.UNINDENT +.TP +.B \fB\-\-macos\-fs\-animation\-duration=<default|0\-1000>\fP +Sets the fullscreen resize animation duration in ms (default: default). +The default value is slightly less than the system\(aqs animation duration +(500ms) to prevent some problems when the end of an async animation happens +at the same time as the end of the system wide fullscreen animation. Setting +anything higher than 500ms will only prematurely cancel the resize animation +after the system wide animation ended. The upper limit is still set at +1000ms since it\(aqs possible that Apple or the user changes the system +defaults. Anything higher than 1000ms though seems too long and shouldn\(aqt be +set anyway. +OS X and cocoa\-cb only +.TP +.B \fB\-\-android\-surface\-size=<WxH>\fP +Set dimensions of the rendering surface used by the Android gpu context. +Needs to be set by the embedding application if the dimensions change during +runtime (i.e. if the device is rotated), via the surfaceChanged callback. +.sp +Android with \fB\-\-gpu\-context=android\fP only. +.TP +.B \fB\-\-swapchain\-depth=<N>\fP +Allow up to N in\-flight frames. This essentially controls the frame +latency. Increasing the swapchain depth can improve pipelining and prevent +missed vsyncs, but increases visible latency. This option only mandates an +upper limit, the implementation can use a lower latency than requested +internally. A setting of 1 means that the VO will wait for every frame to +become visible before starting to render the next frame. (Default: 3) +.TP +.B \fB\-\-gpu\-sw\fP Continue even if a software renderer is detected. .TP -.B \fB\-\-opengl\-backend=<sys>\fP -The value \fBauto\fP (the default) selects the windowing backend. You can -also pass \fBhelp\fP to get a complete list of compiled in backends (sorted -by autoprobe order). +.B \fB\-\-gpu\-context=<sys>\fP +The value \fBauto\fP (the default) selects the GPU context. You can also pass +\fBhelp\fP to get a complete list of compiled in backends (sorted by +autoprobe order). .INDENT 7.0 .TP .B auto auto\-select (default) .TP .B cocoa -Cocoa/OS X +Cocoa/OS X (deprecated, use \-\-vo=opengl\-cb instead) .TP .B win Win32/WGL .TP +.B winvk +VK_KHR_win32_surface +.TP .B angle Direct3D11 through the OpenGL ES translation layer ANGLE. This supports almost everything the \fBwin\fP backend does (if the ANGLE build is new @@ -6514,9 +7218,15 @@ Win32, using WGL for rendering and Direct3D 9Ex for presentation. Works on Nvidia and AMD. Newer Intel chips with the latest drivers may also work. .TP +.B d3d11 +Win32, with native Direct3D 11 rendering. +.TP .B x11 X11/GLX .TP +.B x11vk +VK_KHR_xlib_surface +.TP .B x11probe For internal autoprobing, equivalent to \fBx11\fP otherwise. Don\(aqt use directly, it could be removed without warning as autoprobing is changed. @@ -6524,12 +7234,18 @@ directly, it could be removed without warning as autoprobing is changed. .B wayland Wayland/EGL .TP +.B waylandvk +VK_KHR_wayland_surface +.TP .B drm -DRM/EGL (\fBdrm\-egl\fP is a deprecated alias) +DRM/EGL .TP .B x11egl X11/EGL .TP +.B android +Android/EGL. Requires \fB\-\-wid\fP be set to an \fBandroid.view.Surface\fP\&. +.TP .B mali\-fbdev Direct fbdev/EGL support on some ARM/MALI devices. .TP @@ -6540,59 +7256,83 @@ performance problems), and is for doing experiments only. Will not be used automatically. .UNINDENT .TP -.B \fB\-\-opengl\-es=<mode>\fP -Select whether to use GLES: +.B \fB\-\-gpu\-api=<type>\fP +Controls which type of graphics APIs will be accepted: .INDENT 7.0 .TP -.B yes -Try to prefer ES over Desktop GL +.B auto +Use any available API (default) .TP -.B force2 -Try to request a ES 2.0 context (the driver might ignore this) +.B opengl +Allow only OpenGL (requires OpenGL 2.1+ or GLES 2.0+) .TP -.B no -Try to prefer desktop GL over ES +.B vulkan +Allow only Vulkan (requires a valid/working \fB\-\-spirv\-compiler\fP) +.TP +.B d3d11 +Allow only \fB\-\-gpu\-context=d3d11\fP +.UNINDENT +.TP +.B \fB\-\-opengl\-es=<mode>\fP +Controls which type of OpenGL context will be accepted: +.INDENT 7.0 .TP .B auto -Use the default for each backend (default) +Allow all types of OpenGL (default) +.TP +.B yes +Only allow GLES +.TP +.B no +Only allow desktop/core GL .UNINDENT .TP -.B \fB\-\-opengl\-fbo\-format=<fmt>\fP +.B \fB\-\-opengl\-restrict=<version>\fP +Restricts all OpenGL versions above a certain version. Versions are encoded +in hundreds, i.e. OpenGL 4.5 \-> 450. As an example, \-\-opengl\-restrict=300 +would restrict OpenGL 3.0 and higher, effectively only allowing 2.x +contexts. Note that this only imposes a limit on context creation APIs, the +actual OpenGL context may still have a higher OpenGL version. (Default: 0) +.TP +.B \fB\-\-fbo\-format=<fmt>\fP Selects the internal format of textures used for FBOs. The format can influence performance and quality of the video output. \fBfmt\fP can be one of: rgb8, rgb10, rgb10_a2, rgb16, rgb16f, rgb32f, rgba12, rgba16, rgba16f, -rgba32f. Default: \fBauto\fP, which maps to rgba16 on desktop GL, and rgba16f -or rgb10_a2 on GLES (e.g. ANGLE), unless GL_EXT_texture_norm16 is -available. +rgba16hf, rgba32f. +.sp +Default: \fBauto\fP, which first attempts to utilize 16bit float +(rgba16f, rgba16hf), and falls back to rgba16 if those are not available. +Finally, attempts to utilize rgb10_a2 or rgba8 if all of the previous formats +are not available. .TP -.B \fB\-\-opengl\-gamma=<0.1..2.0>\fP -Set a gamma value (default: 1.0). If gamma is adjusted in other ways (like -with the \fB\-\-gamma\fP option or key bindings and the \fBgamma\fP property), -the value is multiplied with the other gamma value. +.B \fB\-\-gamma\-factor=<0.1..2.0>\fP +Set an additional raw gamma factor (default: 1.0). If gamma is adjusted in +other ways (like with the \fB\-\-gamma\fP option or key bindings and the +\fBgamma\fP property), the value is multiplied with the other gamma value. .sp Recommended values based on the environmental brightness: .INDENT 7.0 .TP .B 1.0 -Brightly illuminated (default) +Pitch black or dimly lit room (default) .TP -.B 0.9 -Slightly dim +.B 1.1 +Moderately lit room, home .TP -.B 0.8 -Pitch black room +.B 1.2 +Brightly illuminated room, office .UNINDENT .sp -NOTE: Typical movie content (Blu\-ray etc.) already contains a gamma drop of -about 0.8, so specifying it here as well will result in even darker -image than intended! +NOTE: This is based around the assumptions of typical movie content, which +contains an implicit end\-to\-end of about 0.8 from scene to display. For +bright environments it can be useful to cancel that out. .TP .B \fB\-\-gamma\-auto\fP Automatically corrects the gamma value depending on ambient lighting -conditions (adding a gamma boost for dark rooms). +conditions (adding a gamma boost for bright rooms). .sp -With ambient illuminance of 64lux, mpv will pick the 1.0 gamma value (no -boost), and slightly increase the boost up until 0.8 for 16lux. +With ambient illuminance of 16 lux, mpv will pick the 1.0 gamma value (no +boost), and slightly increase the boost up until 1.2 for 256 lux. .sp NOTE: Only implemented on OS X. .TP @@ -6603,7 +7343,9 @@ are: .INDENT 7.0 .TP .B auto -Disable any adaptation (default) +Disable any adaptation, except for atypical color spaces. Specifically, +wide/unusual gamuts get automatically adapted to BT.709, while standard +gamut (i.e. BT.601 and BT.709) content is not touched. (default) .TP .B bt.470m ITU\-R BT.470 M @@ -6649,7 +7391,9 @@ Valid values are: .INDENT 7.0 .TP .B auto -Disable any adaptation (default) +Disable any adaptation, except for atypical transfers. Specifically, +HDR or linear light source material gets automatically converted to +gamma 2.2, while SDR content is not touched. (default) .TP .B bt.1886 ITU\-R BT.1886 curve (assuming infinite contrast) @@ -6699,6 +7443,42 @@ formats for display. .UNINDENT .UNINDENT .TP +.B \fB\-\-target\-peak=<nits>\fP +Specifies the measured peak brightness of the output display, in cd/m^2 +(AKA nits). The interpretation of this brightness depends on the configured +\fB\-\-target\-trc\fP\&. In all cases, it imposes a limit on the signal values +that will be sent to the display. If the source exceeds this brightness +level, a tone mapping filter will be inserted. For HLG, it has the +additional effect of parametrizing the inverse OOTF, in order to get +colorimetrically consistent results with the mastering display. For SDR, or +when using an ICC (profile (\fB\-\-icc\-profile\fP), setting this to a value +above 100 essentially causes the display to be treated as if it were an HDR +display in disguise. (See the note below) +.sp +By default, the chosen peak defaults to an appropriate value based on the +TRC in use. For SDR curves, it defaults to 100. For HDR curves, it +defaults to 100 * the transfer function\(aqs nominal peak. +.sp +\fBNOTE:\fP +.INDENT 7.0 +.INDENT 3.5 +When using an SDR transfer function, this is normally not needed, and +setting it may lead to very unexpected results. The one time it \fIis\fP +useful is if you want to calibrate a HDR display using traditional +transfer functions and calibration equipment. In such cases, you can +set your HDR display to a high brightness such as 800 cd/m^2, and then +calibrate it to a standard curve like gamma2.8. Setting this value to +800 would then instruct mpv to essentially treat it as an HDR display +with the given peak. This may be a good alternative in environments +where PQ or HLG input to the display is not possible, and makes it +possible to use HDR displays with mpv regardless of operating system +support for HDMI HDR metadata. +.sp +In such a configuration, we highly recommend setting \fB\-\-tone\-mapping\fP +to \fBmobius\fP or even \fBclip\fP\&. +.UNINDENT +.UNINDENT +.TP .B \fB\-\-tone\-mapping=<value>\fP Specifies the algorithm used for tone\-mapping images onto the target display. This is relevant for both HDR\->SDR conversion as well as gamut @@ -6717,7 +7497,7 @@ Smoothly maps out\-of\-range values while retaining contrast and colors for in\-range material as much as possible. Use this when you care about color accuracy more than detail preservation. This is somewhere in between \fBclip\fP and \fBreinhard\fP, depending on the value of -\fB\-\-tone\-mapping\-param\fP\&. (default) +\fB\-\-tone\-mapping\-param\fP\&. .TP .B reinhard Reinhard tone mapping algorithm. Very simple continuous curve. @@ -6730,7 +7510,9 @@ better (slightly sigmoidal), at the cost of slightly darkening / desaturating everything. Developed by John Hable for use in video games. Use this when you care about detail preservation more than color/brightness accuracy. This is roughly equivalent to -\fB\-\-hdr\-tone\-mapping=reinhard \-\-tone\-mapping\-param=0.24\fP\&. +\fB\-\-hdr\-tone\-mapping=reinhard \-\-tone\-mapping\-param=0.24\fP\&. If possible, +you should also enable \fB\-\-hdr\-compute\-peak\fP for the best results. +(Default) .TP .B gamma Fits a logarithmic transfer between the tone curves. @@ -6768,23 +7550,27 @@ Specifies the exponent of the function. Defaults to 1.8. Specifies the scale factor to use while stretching. Defaults to 1.0. .UNINDENT .TP -.B \fB\-\-hdr\-compute\-peak\fP -Compute the HDR peak per\-frame of relying on tagged metadata. These values -are averaged over local regions as well as over several frames to prevent -the value from jittering around too much. This option basically gives you -dynamic, per\-scene tone mapping. Requires compute shaders, which is a -fairly recent OpenGL feature, and will probably also perform horribly on -some drivers, so enable at your own risk. +.B \fB\-\-hdr\-compute\-peak=<auto|yes|no>\fP +Compute the HDR peak and frame average brightness per\-frame instead of +relying on tagged metadata. These values are averaged over local regions as +well as over several frames to prevent the value from jittering around too +much. This option basically gives you dynamic, per\-scene tone mapping. +Requires compute shaders, which is a fairly recent OpenGL feature, and will +probably also perform horribly on some drivers, so enable at your own risk. +The special value \fBauto\fP (default) will enable HDR peak computation +automatically if compute shaders and SSBOs are supported. .TP .B \fB\-\-tone\-mapping\-desaturate=<value>\fP -Apply desaturation for highlights that exceed this level of brightness. The -higher the parameter, the more color information will be preserved. This -setting helps prevent unnaturally blown\-out colors for super\-highlights, by -(smoothly) turning into white instead. This makes images feel more natural, -at the cost of reducing information about out\-of\-range colors. +Apply desaturation for highlights. The parameter essentially controls the +steepness of the desaturation curve. The higher the parameter, the more +aggressively colors will be desaturated. This setting helps prevent +unnaturally blown\-out colors for super\-highlights, by (smoothly) turning +into white instead. This makes images feel more natural, at the cost of +reducing information about out\-of\-range colors. .sp -The default of 2.0 is somewhat conservative and will mostly just apply to -skies or directly sunlit surfaces. A setting of 0.0 disables this option. +The default of 0.5 provides a good balance. This value is weaker than the +ACES ODT curves\(aq recommendation, but works better for most content in +practice. A setting of 0.0 disables this option. .TP .B \fB\-\-gamut\-warning\fP If enabled, mpv will mark all clipped/out\-of\-gamut pixels that exceed a @@ -6792,8 +7578,8 @@ given threshold (currently hard\-coded to 101%). The affected pixels will be inverted to make them stand out. Note: This option applies after the effects of all of mpv\(aqs color space transformation / tone mapping options, so it\(aqs a good idea to combine this with \fB\-\-tone\-mapping=clip\fP and use -\fB\-\-target\-gamut\fP to set the gamut to simulate. For example, -\fB\-\-target\-gamut=bt.709\fP would make mpv highlight all pixels that exceed the +\fB\-\-target\-prim\fP to set the gamut to simulate. For example, +\fB\-\-target\-prim=bt.709\fP would make mpv highlight all pixels that exceed the gamut of a standard gamut (sRGB) display. This option also does not work well with ICC profiles, since the 3DLUTs are always generated against the source color space and have chromatically\-accurate clipping built in. @@ -6815,6 +7601,9 @@ display settings of the operating system. .sp NOTE: On Windows, the default profile must be an ICC profile. WCS profiles are not supported. +.sp +Applications using libmpv with the render API need to provide the ICC +profile via \fBMPV_RENDER_PARAM_ICC_PROFILE\fP\&. .TP .B \fB\-\-icc\-cache\-dir=<dirname>\fP Store and load the 3D LUTs created from the ICC profile in this directory. @@ -6847,7 +7636,7 @@ absolute colorimetric Size of the 3D LUT generated from the ICC profile in each dimension. Default is 64x64x64. Sizes may range from 2 to 512. .TP -.B \fB\-\-icc\-contrast=<0\-100000>\fP +.B \fB\-\-icc\-contrast=<0\-1000000>\fP Specifies an upper limit on the target device\(aqs contrast ratio. This is detected automatically from the profile if possible, but for some profiles it might be missing, causing the contrast to be assumed as infinite. As a @@ -6858,7 +7647,7 @@ content. The default of 0 means no limit. Blend subtitles directly onto upscaled video frames, before interpolation and/or color management (default: no). Enabling this causes subtitles to be affected by \fB\-\-icc\-profile\fP, \fB\-\-target\-prim\fP, \fB\-\-target\-trc\fP, -\fB\-\-interpolation\fP, \fB\-\-opengl\-gamma\fP and \fB\-\-post\-shader\fP\&. It also +\fB\-\-interpolation\fP, \fB\-\-gamma\-factor\fP and \fB\-\-glsl\-shaders\fP\&. It also increases subtitle performance when using \fB\-\-interpolation\fP\&. .sp The downside of enabling this is that it restricts subtitles to the visible @@ -6896,7 +7685,7 @@ Try to create a framebuffer with alpha component. This only makes sense if the video contains alpha information (which is extremely rare). May not be supported on all platforms. If alpha framebuffers are unavailable, it silently falls back on a normal framebuffer. Note that -if you set the \fB\-\-opengl\-fbo\-format\fP option to a non\-default value, a +if you set the \fB\-\-fbo\-format\fP option to a non\-default value, a format with alpha must be specified, or this won\(aqt work. This does not work on X11 with EGL and Mesa (freedesktop bug 67676). .TP @@ -6913,7 +7702,7 @@ this flag. Could be removed any time. Color used to draw parts of the mpv window not covered by video. See \fB\-\-osd\-color\fP option how colors are defined. .TP -.B \fB\-\-opengl\-tex\-pad\-x\fP, \fB\-\-opengl\-tex\-pad\-y\fP +.B \fB\-\-gpu\-tex\-pad\-x\fP, \fB\-\-gpu\-tex\-pad\-y\fP Enlarge the video source textures by this many pixels. For debugging only (normally textures are sized exactly, but due to hardware decoding interop we may have to deal with additional padding, which can be tested with these @@ -6926,9 +7715,12 @@ probably causes it. The \fBauto\fP mode will call \fBglFlush()\fP only if the renderer is going to wait for a while after rendering, instead of flipping GL front and backbuffers immediately (i.e. it doesn\(aqt call it in display\-sync mode). +.sp +On OSX this is always deactivated because it only causes performance +problems and other regressions. .TP -.B \fB\-\-opengl\-dumb\-mode=<yes|no|auto>\fP -This mode is extremely restricted, and will disable most extended OpenGL +.B \fB\-\-gpu\-dumb\-mode=<yes|no|auto>\fP +This mode is extremely restricted, and will disable most extended features. That includes high quality scalers and custom shaders! .sp It is intended for hardware that does not support FBOs (including GLES, @@ -6941,27 +7733,15 @@ if nothing uses features which require FBOs. .sp This option might be silently removed in the future. .TP -.B \fB\-\-opengl\-shader\-cache\-dir=<dirname>\fP -Store and load compiled GL shaders in this directory. Normally, shader -compilation is very fast, so this is usually not needed. But some GL -implementations (notably ANGLE, the default on Windows) have relatively -slow shader compilation, and can cause startup delays. +.B \fB\-\-gpu\-shader\-cache\-dir=<dirname>\fP +Store and load compiled GLSL shaders in this directory. Normally, shader +compilation is very fast, so this is usually not needed. It mostly matters +for GPU APIs that require internally recompiling shaders to other languages, +for example anything based on ANGLE or Vulkan. Enabling this can improve +startup performance on these platforms. .sp NOTE: This is not cleaned automatically, so old, unused cache files may stick around indefinitely. -.sp -This option might be silently removed in the future, if ANGLE fixes shader -compilation speed. -.TP -.B \fB\-\-cuda\-decode\-device=<auto|0..>\fP -Choose the GPU device used for decoding when using the \fBcuda\fP hwdec. -.sp -By default, the device that is being used to provide OpenGL output will -also be used for decoding (and in the vast majority of cases, only one -GPU will be present). -.sp -Note that when using the \fBcuda\-copy\fP hwdec, a different option must be -passed: \fB\-\-vd\-lavc\-o=gpu=<0..>\fP\&. .UNINDENT .SS Miscellaneous .INDENT 0.0 @@ -6992,6 +7772,26 @@ sync offsets occur, they will only take about 1 or 2 seconds to settle out. This delay in reaction time to sudden A/V offsets should be the only side effect of turning this option on, for all sound drivers. .TP +.B \fB\-\-video\-timing\-offset=<seconds>\fP +Control how long before video display target time the frame should be +rendered (default: 0.050). If a video frame should be displayed at a +certain time, the VO will start rendering the frame earlier, and then will +perform a blocking wait until the display time, and only then "swap" the +frame to display. The rendering cannot start before the previous frame is +displayed, so this value is implicitly limited by the video framerate. With +normal video frame rates, the default value will ensure that rendering is +always immediately started after the previous frame was displayed. On the +other hand, setting a too high value can reduce responsiveness with low +FPS value. +.sp +For client API users using the render API (or the deprecated \fBopengl\-cb\fP +API), this option is interesting, because you can stop the render API +from limiting your FPS (see \fBmpv_render_context_render()\fP documentation). +.sp +This applies only to audio timing modes (e.g. \fB\-\-video\-sync=audio\fP). In +other modes (\fB\-\-video\-sync=display\-...\fP), video timing relies on vsync +blocking, and this option is not used. +.TP .B \fB\-\-video\-sync=<audio|...>\fP How the player synchronizes audio and video. .sp @@ -7009,7 +7809,10 @@ Behavior can depend on the VO and the system\(aqs video and audio drivers. Media files must use constant framerate. Section\-wise VFR might work as well with some container formats (but not e.g. mkv). If the sync code detects severe A/V desync, or the framerate cannot be detected, the player -automatically reverts to \fBaudio\fP mode for some time or permanently. +automatically reverts to \fBaudio\fP mode for some time or permanently. These +modes also require a vsync blocked presentation mode. For OpenGL, this +translates to \fB\-\-opengl\-swapinterval=1\fP\&. For Vulkan, it translates to +\fB\-\-vulkan\-swap\-mode=fifo\fP (or \fBfifo\-relaxed\fP). .sp The modes with \fBdesync\fP in their names do not attempt to keep audio/video in sync. They will slowly (or quickly) desync, until e.g. the next seek @@ -7143,7 +7946,8 @@ the same time). .sp Unlike \fB\-\-sub\-files\fP and \fB\-\-audio\-files\fP, this includes all tracks, and does not cause default stream selection over the "proper" file. This makes -it slightly less intrusive. +it slightly less intrusive. (In mpv 0.28.0 and before, this was not quite +strictly enforced.) .sp This is a list option. See \fI\%List Options\fP for details. .TP @@ -7224,10 +8028,6 @@ the complex graphs (e.g. \fBao\fP label) and the actual output. .IP "Examples" .INDENT 0.0 .IP \(bu 2 -\fB\-\-lavfi\-complex=\(aq[aid1] asplit [ao] [t] ; [t] aphasemeter [vo]\(aq\fP -Play audio track 1, and visualize it as video using the \fBaphasemeter\fP -filter. -.IP \(bu 2 \fB\-\-lavfi\-complex=\(aq[aid1] [aid2] amix [ao]\(aq\fP Play audio track 1 and 2 at the same time. .IP \(bu 2 @@ -7236,16 +8036,15 @@ Stack video track 1 and 2 and play them at the same time. Note that both tracks need to have the same width, or filter initialization will fail (you can add \fBscale\fP filters before the \fBvstack\fP filter to fix the size). -.IP \(bu 2 -\fB\-\-lavfi\-complex=\(aq[aid1] asplit [ao] [t] ; [t] aphasemeter [t2] ; [vid1] [t2] overlay [vo]\(aq\fP -Play audio track 1, and overlay its visualization over video track 1. +To load a video track from another file, you can use +\fB\-\-external\-file=other.mkv\fP\&. .IP \(bu 2 \fB\-\-lavfi\-complex=\(aq[aid1] asplit [t1] [ao] ; [t1] showvolume [t2] ; [vid1] [t2] overlay [vo]\(aq\fP Play audio track 1, and overlay the measured volume for each speaker over video track 1. .IP \(bu 2 \fBnull:// \-\-lavfi\-complex=\(aqlife [vo]\(aq\fP -Conways\(aq Life Game. +A libavfilter source\-only filter (Conways\(aq Life Game). .UNINDENT .UNINDENT .UNINDENT @@ -7288,7 +8087,7 @@ See \fI\%ALSA audio output options\fP for options specific to this AO. .INDENT 7.0 .INDENT 3.5 To get multichannel/surround audio, use \fB\-\-audio\-channels=auto\fP\&. The -default for this option is \fBauto\-safe\fP, which makes this audio otuput +default for this option is \fBauto\-safe\fP, which makes this audio output explicitly reject multichannel output, as there is no way to detect whether a certain channel layout is actually supported. .sp @@ -7383,14 +8182,22 @@ Native Mac OS X audio output driver using direct device access and exclusive mode (bypasses the sound server). .TP .B \fBopenal\fP -Experimental OpenAL audio output driver -.sp -\fBNOTE:\fP +OpenAL audio output driver .INDENT 7.0 -.INDENT 3.5 -This driver is not very useful. Playing multi\-channel audio with -it is slow. -.UNINDENT +.TP +.B \fB\-\-openal\-num\-buffers=<2\-128>\fP +Specify the number of audio buffers to use. Lower values are better for +lower CPU usage. Default: 4. +.TP +.B \fB\-\-openal\-num\-samples=<256\-32768>\fP +Specify the number of complete samples to use for each buffer. Higher +values are better for lower CPU usage. Default: 8192. +.TP +.B \fB\-\-openal\-direct\-channels=<yes|no>\fP +Enable OpenAL Soft\(aqs direct channel extension when available to avoid +tinting the sound with ambisonics or HRTF. +Channels are dropped when when they are not available as downmixing +will be disabled. Default: no. .UNINDENT .TP .B \fBpulse\fP @@ -7407,7 +8214,7 @@ Specify the host to use. An empty <host> string uses a local connection, Set the audio buffer size in milliseconds. A higher value buffers more data, and has a lower probability of buffer underruns. A smaller value makes the audio stream react faster, e.g. to playback speed -changes. Default: 250. +changes. .TP .B \fB\-\-pulse\-latency\-hacks=<yes|no>\fP Enable hacks to workaround PulseAudio timing bugs (default: no). If @@ -7485,6 +8292,9 @@ Simulate broken audio drivers, which don\(aqt report latency correctly. .B \fB\-\-ao\-null\-channel\-layouts\fP If not empty, this is a \fB,\fP separated list of channel layouts the AO allows. This can be used to test channel layout selection. +.TP +.B \fB\-\-ao\-null\-format\fP +Force the audio output format the AO will accept. If unset accepts any. .UNINDENT .TP .B \fBpcm\fP @@ -7555,7 +8365,7 @@ in the list. .INDENT 3.5 See \fB\-\-vo=help\fP for a list of compiled\-in video output drivers. .sp -The recommended output driver is \fB\-\-vo=opengl\fP, which is the default. All +The recommended output driver is \fB\-\-vo=gpu\fP, which is the default. All other drivers are for compatibility or special purposes. If the default does not work, it will fallback to other drivers (in the same order as listed by \fB\-\-vo=help\fP). @@ -7880,37 +8690,34 @@ Might be slower too, as it must(?) clear every frame. Always resize the backbuffer to window size. .UNINDENT .TP -.B \fBopengl\fP -OpenGL video output driver. It supports extended scaling methods, dithering -and color management. +.B \fBgpu\fP +General purpose, customizable, GPU\-accelerated video output driver. It +supports extended scaling methods, dithering, color management, custom +shaders, HDR, and more. .sp -See \fI\%OpenGL renderer options\fP for options specific to this VO. +See \fI\%GPU renderer options\fP for options specific to this VO. .sp By default, it tries to use fast and fail\-safe settings. Use the -\fBopengl\-hq\fP profile to use this driver with defaults set to high -quality rendering. (This profile is also the replacement for -\fB\-\-vo=opengl\-hq\fP\&.) The profile can be applied with \fB\-\-profile=opengl\-hq\fP -and its contents can be viewed with \fB\-\-show\-profile=opengl\-hq\fP\&. -.sp -Requires at least OpenGL 2.1. -.sp -Some features are available with OpenGL 3 capable graphics drivers only -(or if the necessary extensions are available). +\fBgpu\-hq\fP profile to use this driver with defaults set to high quality +rendering. The profile can be applied with \fB\-\-profile=gpu\-hq\fP and its +contents can be viewed with \fB\-\-show\-profile=gpu\-hq\fP\&. .sp -OpenGL ES 2.0 and 3.0 are supported as well. +This VO abstracts over several possible graphics APIs and windowing +contexts, which can be influenced using the \fB\-\-gpu\-api\fP and +\fB\-\-gpu\-context\fP options. .sp Hardware decoding over OpenGL\-interop is supported to some degree. Note that in this mode, some corner case might not be gracefully handled, and color space conversion and chroma upsampling is generally in the hand of the hardware decoder APIs. .sp -\fBopengl\fP makes use of FBOs by default. Sometimes you can achieve better -quality or performance by changing the \fB\-\-opengl\-fbo\-format\fP option to +\fBgpu\fP makes use of FBOs by default. Sometimes you can achieve better +quality or performance by changing the \fB\-\-gpu\-fbo\-format\fP option to \fBrgb16f\fP, \fBrgb32f\fP or \fBrgb\fP\&. Known problems include Mesa/Intel not accepting \fBrgb16\fP, Mesa sometimes not being compiled with float texture support, and some OS X setups being very slow with \fBrgb16\fP but fast with \fBrgb32f\fP\&. If you have problems, you can also try enabling the -\fB\-\-opengl\-dumb\-mode=yes\fP option. +\fB\-\-gpu\-dumb\-mode=yes\fP option. .TP .B \fBsdl\fP SDL 2.0+ Render video output driver, depending on system with or without @@ -7944,7 +8751,7 @@ This is low quality, and has issues with OSD. .INDENT 7.0 .INDENT 3.5 This driver is for compatibility with crappy systems. You can -use vaapi hardware decoding with \fB\-\-vo=opengl\fP too. +use vaapi hardware decoding with \fB\-\-vo=gpu\fP too. .UNINDENT .UNINDENT .sp @@ -8084,46 +8891,21 @@ JPEG optimization factor (default: 100) Specify the directory to save the image files to (default: \fB\&./\fP). .UNINDENT .TP -.B \fBwayland\fP (Wayland only) -Wayland shared memory video output as fallback for \fBopengl\fP\&. +.B \fBlibmpv\fP +For use with libmpv direct embedding. As a special case, on OS X it +is used like a normal VO within mpv (cocoa\-cb). Otherwise useless in any +other contexts. +(See \fB<mpv/render.h>\fP\&.) .sp -\fBNOTE:\fP -.INDENT 7.0 -.INDENT 3.5 -This driver is for compatibility with systems that don\(aqt provide -working OpenGL drivers. -.UNINDENT -.UNINDENT -.sp -The following global options are supported by this video output: -.INDENT 7.0 -.TP -.B \fB\-\-vo\-wayland\-alpha\fP -Use a buffer format that supports videos and images with alpha -information -.TP -.B \fB\-\-vo\-wayland\-rgb565\fP -Use RGB565 as buffer format. This format is implemented on most -platforms, especially on embedded where it is far more efficient then -RGB8888. -.TP -.B \fB\-\-vo\-wayland\-triple\-buffering\fP -Use 3 buffers instead of 2. This can lead to more fluid playback, but -uses more memory. -.UNINDENT -.TP -.B \fBopengl\-cb\fP -For use with libmpv direct OpenGL embedding; useless in any other contexts. -(See \fB<mpv/opengl_cb.h>\fP\&.) -.sp -This also supports many of the options the \fBopengl\fP VO has. +This also supports many of the options the \fBgpu\fP VO has, depending on the +backend. .TP .B \fBrpi\fP (Raspberry Pi) Native video output on the Raspberry Pi using the MMAL API. .sp -This is deprecated. Use \fB\-\-vo=opengl\fP instead, which is the default and +This is deprecated. Use \fB\-\-vo=gpu\fP instead, which is the default and provides the same functionality. The \fBrpi\fP VO will be removed in -mpv 0.23.0. Its functionality was folded into \-\-vo=opengl, which now uses +mpv 0.23.0. Its functionality was folded into \-\-vo=gpu, which now uses RPI hardware decoding by treating it as a hardware overlay (without applying GL filtering). Also to be changed in 0.23.0: the \-\-fs flag will be reset to "no" by default (like on the other platforms). @@ -8155,7 +8937,7 @@ This also means there will be no subtitles rendered. Video output driver using Kernel Mode Setting / Direct Rendering Manager. Should be used when one doesn\(aqt want to install full\-blown graphical environment (e.g. no X). Does not support hardware acceleration (if you -need this, check the \fBdrm\fP backend for \fBopengl\fP VO). +need this, check the \fBdrm\fP backend for \fBgpu\fP VO). .sp The following global options are supported by this video output: .INDENT 7.0 @@ -8169,9 +8951,55 @@ argument to disambiguate. (default: empty) .TP .B \fB\-\-drm\-mode=<number>\fP -Mode ID to use (resolution, bit depth and frame rate). +Mode ID to use (resolution and frame rate). (default: 0) -.UNINDENT +.TP +.B \fB\-\-drm\-osd\-plane\-id=<number>\fP +Select the DRM plane index to use for OSD (or OSD and video). +Index is zero based, and related to crtc. +When using this option with the drm_prime renderer, it will only affect +the OSD contents. Otherwise it will set OSD & video plane. +(default: primary plane) +.TP +.B \fB\-\-drm\-video\-plane\-id=<number>\fP +Select the DRM plane index to use for video layer. +Index is zero based, and related to crtc. +This option only has effect when using the drm_prime renderer (which +supports several layers) together with \fBvo=gpu\fP and \fBgpu\-context=drm\fP\&. +(default: first overlay plane) +.TP +.B \fB\-\-drm\-format=<xrgb8888,xrgb2101010>\fP +Select the DRM format to use (default: xrgb8888). This allows you to +choose the bit depth of the DRM mode. xrgb8888 is your usual 24 bit per +pixel/8 bits per channel packed RGB format with 8 bits of padding. +xrgb2101010 is a packed 30 bits per pixel/10 bits per channel packed RGB +format with 2 bits of padding. +.sp +Unless you have an intel graphics card, a recent kernel and a recent +version of mesa (>=18) xrgb2101010 is unlikely to work for you. +.sp +This currently only has an effect when used together with the \fBdrm\fP +backend for the \fBgpu\fP VO. The \fBdrm\fP VO always uses xrgb8888. +.TP +.B \fB\-\-drm\-osd\-size=<[WxH]>\fP +Sets the OSD OpenGL size to the specified size. OSD will then be upscaled +to the current screen resolution. This option can be useful when using +several layers in high resolutions with a GPU which cannot handle it. +Note : this option is only available with DRM atomic support. +(default: display resolution) +.UNINDENT +.TP +.B \fBmediacodec_embed\fP (Android) +Renders \fBIMGFMT_MEDIACODEC\fP frames directly to an \fBandroid.view.Surface\fP\&. +Requires \fB\-\-hwdec=mediacodec\fP for hardware decoding, along with +\fB\-\-vo=mediacodec_embed\fP and \fB\-\-wid=(intptr_t)(*android.view.Surface)\fP\&. +.sp +Since this video output driver uses native decoding and rendering routines, +many of mpv\(aqs features (subtitle rendering, OSD/OSC, video filters, etc) +are not available with this driver. +.sp +To use hardware decoding with \fB\-\-vo\-gpu\fP instead, use +\fB\-\-hwdec=mediacodec\-copy\fP along with \fB\-\-gpu\-context=android\fP\&. .UNINDENT .SH AUDIO FILTERS .sp @@ -8180,7 +9008,8 @@ syntax is: .INDENT 0.0 .TP .B \fB\-\-af=...\fP -Setup a chain of audio filters. See \fB\-\-vf\fP for the syntax. +Setup a chain of audio filters. See \fB\-\-vf\fP (\fI\%VIDEO FILTERS\fP) for the +full syntax. .UNINDENT .sp \fBNOTE:\fP @@ -8209,6 +9038,15 @@ to change sample rate, sample format, or channel layout of the audio stream. This filter is automatically enabled if the audio output does not support the audio configuration of the file being played. .sp +\fBWARNING:\fP +.INDENT 7.0 +.INDENT 3.5 +Deprecated. Either use the \fB\-\-audio\-resample\-...\fP options to customize +resampling, or the libavfilter \fB\-\-af=aresample\fP filter, which has its +own options. +.UNINDENT +.UNINDENT +.sp It supports only the following sample formats: u8, s16, s32, float. .INDENT 7.0 .TP @@ -8231,7 +9069,8 @@ entries. (default: no) Do not detach if input and output audio format/rate/channels match. (If you just want to set defaults for this filter that will be used even by automatically inserted lavrresample instances, you should -prefer setting them with \fB\-\-af\-defaults=lavrresample:...\fP\&.) +prefer setting them with the \fB\-\-audio\-resample\-...\fP options.) This +does not do anything anymore and the filter will never detach. .TP .B \fBnormalize=<yes|no|auto>\fP Whether to normalize when remixing channel layouts (default: auto). @@ -8294,156 +9133,7 @@ Select the libavcodec encoder used. Currently, this should be an AC\-3 encoder, and using another codec will fail horribly. .UNINDENT .TP -.B \fBequalizer=g1:g2:g3:...:g10\fP -10 octave band graphic equalizer, implemented using 10 IIR band\-pass -filters. This means that it works regardless of what type of audio is -being played back. The center frequencies for the 10 bands are: -.TS -center; -|l|l|. -_ -T{ -No. -T} T{ -frequency -T} -_ -T{ -0 -T} T{ -31.25 Hz -T} -_ -T{ -1 -T} T{ -62.50 Hz -T} -_ -T{ -2 -T} T{ -125.00 Hz -T} -_ -T{ -3 -T} T{ -250.00 Hz -T} -_ -T{ -4 -T} T{ -500.00 Hz -T} -_ -T{ -5 -T} T{ -1.00 kHz -T} -_ -T{ -6 -T} T{ -2.00 kHz -T} -_ -T{ -7 -T} T{ -4.00 kHz -T} -_ -T{ -8 -T} T{ -8.00 kHz -T} -_ -T{ -9 -T} T{ -16.00 kHz -T} -_ -.TE -.sp -If the sample rate of the sound being played is lower than the center -frequency for a frequency band, then that band will be disabled. A known -bug with this filter is that the characteristics for the uppermost band -are not completely symmetric if the sample rate is close to the center -frequency of that band. This problem can be worked around by upsampling -the sound using a resampling filter before it reaches this filter. -.INDENT 7.0 -.TP -.B \fB<g1>:<g2>:<g3>:...:<g10>\fP -floating point numbers representing the gain in dB for each frequency -band (\-12\-12) -.UNINDENT -.INDENT 7.0 -.INDENT 3.5 -.IP "Example" -.INDENT 0.0 -.TP -.B \fBmpv \-\-af=equalizer=11:11:10:5:0:\-12:0:5:12:12 media.avi\fP -Would amplify the sound in the upper and lower frequency region -while canceling it almost completely around 1 kHz. -.UNINDENT -.UNINDENT -.UNINDENT -.TP -.B \fBchannels=nch[:routes]\fP -Can be used for adding, removing, routing and copying audio channels. If -only \fB<nch>\fP is given, the default routing is used. It works as follows: -If the number of output channels is greater than the number of input -channels, empty channels are inserted (except when mixing from mono to -stereo; then the mono channel is duplicated). If the number of output -channels is less than the number of input channels, the exceeding -channels are truncated. -.INDENT 7.0 -.TP -.B \fB<nch>\fP -number of output channels (1\-8) -.TP -.B \fB<routes>\fP -List of \fB,\fP separated routes, in the form \fBfrom1\-to1,from2\-to2,...\fP\&. -Each pair defines where to route each channel. There can be at most -8 routes. Without this argument, the default routing is used. Since -\fB,\fP is also used to separate filters, you must quote this argument -with \fB[...]\fP or similar. -.UNINDENT -.INDENT 7.0 -.INDENT 3.5 -.IP "Examples" -.INDENT 0.0 -.TP -.B \fBmpv \-\-af=channels=4:[0\-1,1\-0,2\-2,3\-3] media.avi\fP -Would change the number of channels to 4 and set up 4 routes that -swap channel 0 and channel 1 and leave channel 2 and 3 intact. -Observe that if media containing two channels were played back, -channels 2 and 3 would contain silence but 0 and 1 would still be -swapped. -.TP -.B \fBmpv \-\-af=channels=6:[0\-0,0\-1,0\-2,0\-3] media.avi\fP -Would change the number of channels to 6 and set up 4 routes that -copy channel 0 to channels 0 to 3. Channel 4 and 5 will contain -silence. -.UNINDENT -.UNINDENT -.UNINDENT -.sp -\fBNOTE:\fP -.INDENT 7.0 -.INDENT 3.5 -You should probably not use this filter. If you want to change the -output channel layout, try the \fBformat\fP filter, which can make mpv -automatically up\- and downmix standard channel layouts. -.UNINDENT -.UNINDENT -.TP -.B \fBformat=format:srate:channels:out\-format:out\-srate:out\-channels\fP +.B \fBformat=format:srate:channels:out\-srate:out\-channels\fP Does not do any format conversion itself. Rather, it may cause the filter system to insert necessary conversion filters before or after this filter if needed. It is primarily useful for controlling the audio format @@ -8474,8 +9164,6 @@ Force mixing to a specific channel layout. See \fB\-\-audio\-channels\fP option for possible values. .UNINDENT .sp -\fB<out\-format>\fP -.sp \fB<out\-srate>\fP .sp \fB<out\-channels>\fP @@ -8484,135 +9172,6 @@ for possible values. used to do conversion itself, unlike this one which lets the filter system handle the conversion. .TP -.B \fBvolume[=<volumedb>[:...]]\fP -Implements software volume control. Use this filter with caution since it -can reduce the signal to noise ratio of the sound. In most cases it is -best to use the \fIMaster\fP volume control of your sound card or the volume -knob on your amplifier. -.sp -\fIWARNING\fP: This filter is deprecated. Use the top\-level options like -\fB\-\-volume\fP and \fB\-\-replaygain...\fP instead. -.sp -\fINOTE\fP: This filter is not reentrant and can therefore only be enabled -once for every audio stream. -.INDENT 7.0 -.TP -.B \fB<volumedb>\fP -Sets the desired gain in dB for all channels in the stream from \-200 dB -to +60 dB, where \-200 dB mutes the sound completely and +60 dB equals a -gain of 1000 (default: 0). -.TP -.B \fBreplaygain\-track\fP -Adjust volume gain according to the track\-gain replaygain value stored -in the file metadata. -.TP -.B \fBreplaygain\-album\fP -Like replaygain\-track, but using the album\-gain value instead. -.TP -.B \fBreplaygain\-preamp\fP -Pre\-amplification gain in dB to apply to the selected replaygain gain -(default: 0). -.TP -.B \fBreplaygain\-clip=yes|no\fP -Prevent clipping caused by replaygain by automatically lowering the -gain (default). Use \fBreplaygain\-clip=no\fP to disable this. -.TP -.B \fBreplaygain\-fallback\fP -Gain in dB to apply if the file has no replay gain tags. This option -is always applied if the replaygain logic is somehow inactive. If this -is applied, no other replaygain options are applied. -.TP -.B \fBsoftclip\fP -Turns soft clipping on. Soft\-clipping can make the -sound more smooth if very high volume levels are used. Enable this -option if the dynamic range of the loudspeakers is very low. -.sp -\fIWARNING\fP: This feature creates distortion and should be considered a -last resort. -.TP -.B \fBs16\fP -Force S16 sample format if set. Lower quality, but might be faster -in some situations. -.TP -.B \fBdetach\fP -Remove the filter if the volume is not changed at audio filter config -time. Useful with replaygain: if the current file has no replaygain -tags, then the filter will be removed if this option is enabled. -(If \fB\-\-softvol=yes\fP is used and the player volume controls are used -during playback, a different volume filter will be inserted.) -.UNINDENT -.INDENT 7.0 -.INDENT 3.5 -.IP "Example" -.INDENT 0.0 -.TP -.B \fBmpv \-\-af=volume=10.1 media.avi\fP -Would amplify the sound by 10.1 dB and hard\-clip if the sound level -is too high. -.UNINDENT -.UNINDENT -.UNINDENT -.TP -.B \fBpan=n:[<matrix>]\fP -Mixes channels arbitrarily. Basically a combination of the volume and the -channels filter that can be used to down\-mix many channels to only a few, -e.g. stereo to mono, or vary the "width" of the center speaker in a -surround sound system. This filter is hard to use, and will require some -tinkering before the desired result is obtained. The number of options for -this filter depends on the number of output channels. An example how to -downmix a six\-channel file to two channels with this filter can be found -in the examples section near the end. -.INDENT 7.0 -.TP -.B \fB<n>\fP -Number of output channels (1\-8). -.TP -.B \fB<matrix>\fP -A list of values \fB[L00,L01,L02,...,L10,L11,L12,...,Ln0,Ln1,Ln2,...]\fP, -where each element \fBLij\fP means how much of input channel i is mixed -into output channel j (range 0\-1). So in principle you first have n -numbers saying what to do with the first input channel, then n numbers -that act on the second input channel etc. If you do not specify any -numbers for some input channels, 0 is assumed. -Note that the values are separated by \fB,\fP, which is already used -by the option parser to separate filters. This is why you must quote -the value list with \fB[...]\fP or similar. -.UNINDENT -.INDENT 7.0 -.INDENT 3.5 -.IP "Examples" -.INDENT 0.0 -.TP -.B \fBmpv \-\-af=pan=1:[0.5,0.5] media.avi\fP -Would downmix from stereo to mono. -.TP -.B \fBmpv \-\-af=pan=3:[1,0,0.5,0,1,0.5] media.avi\fP -Would give 3 channel output leaving channels 0 and 1 intact, and mix -channels 0 and 1 into output channel 2 (which could be sent to a -subwoofer for example). -.UNINDENT -.UNINDENT -.UNINDENT -.sp -\fBNOTE:\fP -.INDENT 7.0 -.INDENT 3.5 -If you just want to force remixing to a certain output channel layout, -it is easier to use the \fBformat\fP filter. For example, -\fBmpv \(aq\-\-af=format=channels=5.1\(aq \(aq\-\-audio\-channels=5.1\(aq\fP would always force -remixing audio to 5.1 and output it like this. -.UNINDENT -.UNINDENT -.sp -This filter supports the following \fBaf\-command\fP commands: -.INDENT 7.0 -.TP -.B \fBset\-matrix\fP -Set the \fB<matrix>\fP argument dynamically. This can be used to change -the mixing matrix at runtime, without reinitializing the entire filter -chain. -.UNINDENT -.TP .B \fBscaletempo[=option1:option2:...]\fP Scales audio tempo without altering pitch, optionally synced to playback speed (default). @@ -8731,6 +9290,12 @@ This filter supports the following \fBaf\-command\fP commands: Set the \fB<pitch\-scale>\fP argument dynamically. This can be used to change the playback pitch at runtime. Note that speed is controlled using the standard \fBspeed\fP property, not \fBaf\-command\fP\&. +.TP +.B \fBmultiply\-pitch <factor>\fP +Multiply the current value of \fB<pitch\-scale>\fP dynamically. For +example: 0.5 to go down by an octave, 1.5 to go up by a perfect fifth. +If you want to go up or down by semi\-tones, use 1.059463094352953 and +0.9438743126816935 .UNINDENT .TP .B \fBlavfi=graph\fP @@ -8751,12 +9316,28 @@ video filter section. .TP .B \fBo=<string>\fP AVOptions. +.TP +.B \fBfix\-pts=<yes|no>\fP +Determine PTS based on sample count (default: no). If this is enabled, +the player won\(aqt rely on libavfilter passing through PTS accurately. +Instead, it pass a sample count as PTS to libavfilter, and compute the +PTS used by mpv based on that and the input PTS. This helps with filters +which output a recomputed PTS instead of the original PTS (including +filters which require the PTS to start at 0). mpv normally expects +filters to not touch the PTS (or only to the extent of changing frame +boundaries), so this is not the default, but it will be needed to use +broken filters. In practice, these broken filters will either cause slow +A/V desync over time (with some files), or break playback completely if +you seek or start playback from the middle of a file. .UNINDENT .UNINDENT .SH VIDEO FILTERS .sp -Video filters allow you to modify the video stream and its properties. The -syntax is: +Video filters allow you to modify the video stream and its properties. All of +the information described in this section applies to audio filters as well +(generally using the prefix \fB\-\-af\fP instead of \fB\-\-vf\fP). +.sp +The exact syntax is: .INDENT 0.0 .TP .B \fB\-\-vf=<filter1[=parameter1:parameter2:...],filter2,...>\fP @@ -8809,12 +9390,19 @@ the \fBlavfi\fP filter, which uses a very similar syntax as mpv (MPlayer historically) to specify filters and their parameters. .UNINDENT .sp +Filters can be manipulated at run time. You can use \fB@\fP labels as described +above in combination with the \fBvf\fP command (see \fI\%COMMAND INTERFACE\fP) to get +more control over this. Initially disabled filters with \fB!\fP are useful for +this as well. +.sp You can also set defaults for each filter. The defaults are applied before the -normal filter parameters. +normal filter parameters. This is deprecated and never worked for the +libavfilter bridge. .INDENT 0.0 .TP .B \fB\-\-vf\-defaults=<filter1[=parameter1:parameter2:...],filter2,...>\fP -Set defaults for each filter. +Set defaults for each filter. (Deprecated. \fB\-\-af\-defaults\fP is deprecated +as well.) .UNINDENT .sp \fBNOTE:\fP @@ -8849,15 +9437,20 @@ Video filters are managed in lists. There are a few commands to manage the filter list. .INDENT 0.0 .TP -.B \fB\-\-vf\-add=<filter1[,filter2,...]>\fP -Appends the filters given as arguments to the filter list. +.B \fB\-\-vf\-add=filter\fP +Appends the filter given as arguments to the filter list. (Passing multiple +filters is currently still possible, but deprecated.) .TP -.B \fB\-\-vf\-pre=<filter1[,filter2,...]>\fP -Prepends the filters given as arguments to the filter list. +.B \fB\-\-vf\-pre=filter\fP +Prepends the filters given as arguments to the filter list. (Passing +multiple filters is currently still possible, but deprecated.) .TP -.B \fB\-\-vf\-del=<index1[,index2,...]>\fP -Deletes the filters at the given indexes. Index numbers start at 0, -negative numbers address the end of the list (\-1 is the last). +.B \fB\-\-vf\-del=filter\fP +Deletes the filter. The filter can even given the way it was added (filter +name and its full argument list), by label (prefixed with \fB@\fP), or as +index number. Index numbers start at 0, negative numbers address the end of +the list (\-1 is the last). (Passing multiple filters is currently still +possible, but deprecated.) .TP .B \fB\-\-vf\-clr\fP Completely empties the filter list. @@ -8869,257 +9462,11 @@ With filters that support it, you can access parameters by their name. .B \fB\-\-vf=<filter>=help\fP Prints the parameter names and parameter value ranges for a particular filter. -.TP -.B \fB\-\-vf=<filter=named_parameter1=value1[:named_parameter2=value2:...]>\fP -Sets a named parameter to the given value. Use on and off or yes and no to -set flag parameters. .UNINDENT .sp Available mpv\-only filters are: .INDENT 0.0 .TP -.B \fBcrop[=w:h:x:y]\fP -Crops the given part of the image and discards the rest. Useful to remove -black bands from widescreen videos. -.INDENT 7.0 -.TP -.B \fB<w>,<h>\fP -Cropped width and height, defaults to original width and height. -.TP -.B \fB<x>,<y>\fP -Position of the cropped picture, defaults to center. -.UNINDENT -.TP -.B \fBexpand[=w:h:x:y:aspect:round]\fP -Expands (not scales) video resolution to the given value and places the -unscaled original at coordinates x, y. -.INDENT 7.0 -.TP -.B \fB<w>,<h>\fP -Expanded width,height (default: original width,height). Negative -values for w and h are treated as offsets to the original size. -.INDENT 7.0 -.INDENT 3.5 -.IP "Example" -.INDENT 0.0 -.TP -.B \fBexpand=0:\-50:0:0\fP -Adds a 50 pixel border to the bottom of the picture. -.UNINDENT -.UNINDENT -.UNINDENT -.TP -.B \fB<x>,<y>\fP -position of original image on the expanded image (default: center) -.TP -.B \fB<aspect>\fP -Expands to fit an aspect instead of a resolution (default: 0). -.INDENT 7.0 -.INDENT 3.5 -.IP "Example" -.INDENT 0.0 -.TP -.B \fBexpand=800::::4/3\fP -Expands to 800x600, unless the source is higher resolution, in -which case it expands to fill a 4/3 aspect. -.UNINDENT -.UNINDENT -.UNINDENT -.TP -.B \fB<round>\fP -Rounds up to make both width and height divisible by <r> (default: 1). -.UNINDENT -.TP -.B \fBflip\fP -Flips the image upside down. -.TP -.B \fBmirror\fP -Mirrors the image on the Y axis. -.TP -.B \fBrotate[=0|90|180|270]\fP -Rotates the image by a multiple of 90 degrees clock\-wise. -.TP -.B \fBscale[=w:h:param:param2:chr\-drop:noup:arnd\fP -Scales the image with the software scaler (slow) and performs a YUV<\->RGB -color space conversion (see also \fB\-\-sws\fP). -.sp -All parameters are optional. -.INDENT 7.0 -.TP -.B \fB<w>:<h>\fP -scaled width/height (default: original width/height) -.INDENT 7.0 -.TP -.B 0 -scaled d_width/d_height -.TP -.B \-1 -original width/height -.TP -.B \-2 -Calculate w/h using the other dimension and the prescaled -aspect ratio. -.TP -.B \-3 -Calculate w/h using the other dimension and the original -aspect ratio. -.TP -.B \-(n+8) -Like \-n above, but rounding the dimension to the closest -multiple of 16. -.UNINDENT -.TP -.B \fB<param>[:<param2>]\fP (see also \fB\-\-sws\fP) -Set some scaling parameters depending on the type of scaler selected -with \fB\-\-sws\fP: -.INDENT 7.0 -.INDENT 3.5 -.sp -.nf -.ft C -\-\-sws=2 (bicubic): B (blurring) and C (ringing) - 0.00:0.60 default - 0.00:0.75 VirtualDub\(aqs "precise bicubic" - 0.00:0.50 Catmull\-Rom spline - 0.33:0.33 Mitchell\-Netravali spline - 1.00:0.00 cubic B\-spline - -\-\-sws=7 (Gaussian): sharpness (0 (soft) \- 100 (sharp)) - -\-\-sws=9 (Lanczos): filter length (1\-10) -.ft P -.fi -.UNINDENT -.UNINDENT -.TP -.B \fB<chr\-drop>\fP -chroma skipping -.INDENT 7.0 -.TP -.B 0 -Use all available input lines for chroma (default). -.TP -.B 1 -Use only every 2. input line for chroma. -.TP -.B 2 -Use only every 4. input line for chroma. -.TP -.B 3 -Use only every 8. input line for chroma. -.UNINDENT -.TP -.B \fB<noup>\fP -Disallow upscaling past the original dimensions. -.INDENT 7.0 -.TP -.B 0 -Allow upscaling (default). -.TP -.B 1 -Disallow upscaling if one dimension exceeds its original value. -.TP -.B 2 -Disallow upscaling if both dimensions exceed their original values. -.UNINDENT -.TP -.B \fB<arnd>\fP -Accurate rounding for the vertical scaler, which may be faster or -slower than the default rounding. -.INDENT 7.0 -.TP -.B no -Disable accurate rounding (default). -.TP -.B yes -Enable accurate rounding. -.UNINDENT -.UNINDENT -.TP -.B \fBdsize[=w:h:aspect\-method:r:aspect]\fP -Changes the intended display aspect at an arbitrary point in the -filter chain. Aspect can be given as a fraction (4/3) or floating point -number (1.33). Note that this filter does \fInot\fP do any scaling itself; it -just affects what later scalers (software or hardware) will do when -auto\-scaling to the correct aspect. -.INDENT 7.0 -.TP -.B \fB<w>,<h>\fP -New aspect ratio given by a display width and height. Unlike older mpv -versions or MPlayer, this does not set the display size. -.sp -Can also be these special values: -.INDENT 7.0 -.TP -.B 0 -original display width and height -.TP -.B \-1 -original video width and height (default) -.TP -.B \-2 -Calculate w/h using the other dimension and the original display -aspect ratio. -.TP -.B \-3 -Calculate w/h using the other dimension and the original video -aspect ratio. -.UNINDENT -.INDENT 7.0 -.INDENT 3.5 -.IP "Example" -.INDENT 0.0 -.TP -.B \fBdsize=800:\-2\fP -Specifies a display resolution of 800x600 for a 4/3 aspect -video, or 800x450 for a 16/9 aspect video. -.UNINDENT -.UNINDENT -.UNINDENT -.TP -.B \fB<aspect\-method>\fP -Modifies width and height according to original aspect ratios. -.INDENT 7.0 -.TP -.B \-1 -Ignore original aspect ratio (default). -.TP -.B 0 -Keep display aspect ratio by using \fB<w>\fP and \fB<h>\fP as maximum -resolution. -.TP -.B 1 -Keep display aspect ratio by using \fB<w>\fP and \fB<h>\fP as minimum -resolution. -.TP -.B 2 -Keep video aspect ratio by using \fB<w>\fP and \fB<h>\fP as maximum -resolution. -.TP -.B 3 -Keep video aspect ratio by using \fB<w>\fP and \fB<h>\fP as minimum -resolution. -.UNINDENT -.INDENT 7.0 -.INDENT 3.5 -.IP "Example" -.INDENT 0.0 -.TP -.B \fBdsize=800:600:0\fP -Specifies a display resolution of at most 800x600, or smaller, -in order to keep aspect. -.UNINDENT -.UNINDENT -.UNINDENT -.TP -.B \fB<r>\fP -Rounds up to make both width and height divisible by \fB<r>\fP -(default: 1). -.TP -.B \fB<aspect>\fP -Force an aspect ratio. -.UNINDENT -.TP .B \fBformat=fmt=<value>:colormatrix=<value>:...\fP Restricts the color space for the next filter without doing any conversion. Use together with the scale filter for a real conversion. @@ -9135,10 +9482,6 @@ For a list of available formats, see \fBformat=fmt=help\fP\&. .B \fB<fmt>\fP Format name, e.g. rgb15, bgr24, 420p, etc. (default: don\(aqt change). .TP -.B \fB<outfmt>\fP -Format name that should be substituted for the output. If they do not -have the same bytes per pixel and chroma subsampling, it will fail. -.TP .B \fB<colormatrix>\fP Controls the YUV to RGB color space conversion when playing video. There are various standards. Normally, BT.601 should be used for SD video, and @@ -9146,7 +9489,7 @@ BT.709 for HD video. (This is done by default.) Using incorrect color space results in slightly under or over saturated and shifted colors. .sp These options are not always supported. Different video outputs provide -varying degrees of support. The \fBopengl\fP and \fBvdpau\fP video output +varying degrees of support. The \fBgpu\fP and \fBvdpau\fP video output drivers usually offer full support. The \fBxv\fP output can set the color space if the system video driver supports it, but not input and output levels. The \fBscale\fP video filter can configure color space and input @@ -9209,7 +9552,7 @@ in the file header, but when playing broken or mistagged files this can be used to override the setting. .sp This option only affects video output drivers that perform color -management, for example \fBopengl\fP with the \fBtarget\-prim\fP or +management, for example \fBgpu\fP with the \fBtarget\-prim\fP or \fBicc\-profile\fP suboptions set. .sp If this option is set to \fBauto\fP (which is the default), the video\(aqs @@ -9393,23 +9736,6 @@ Unknown projection Reference angle in degree, if spherical video is used. .UNINDENT .TP -.B \fBnoformat[=fmt]\fP -Restricts the color space for the next filter without doing any conversion. -Unlike the format filter, this will allow any color space except the one -you specify. -.sp -\fBNOTE:\fP -.INDENT 7.0 -.INDENT 3.5 -For a list of available formats, see \fBnoformat=fmt=help\fP\&. -.UNINDENT -.UNINDENT -.INDENT 7.0 -.TP -.B \fB<fmt>\fP -Format name, e.g. rgb15, bgr24, 420p, etc. (default: 420p). -.UNINDENT -.TP .B \fBlavfi=graph[:sws\-flags[:o=opts]]\fP Filter video using FFmpeg\(aqs libavfilter. .INDENT 7.0 @@ -9426,7 +9752,10 @@ filters. .INDENT 3.5 If you want to use the full filter syntax with this option, you have to quote the filter graph in order to prevent mpv\(aqs syntax and the -filter graph syntax from clashing. +filter graph syntax from clashing. To prevent a quoting and escaping +mess, consider using \fB\-\-lavfi\-complex\fP if you know which video +track you want to use from the input file. (There is only one video +track for nearly all video files anyway.) .UNINDENT .UNINDENT .INDENT 7.0 @@ -9434,7 +9763,7 @@ filter graph syntax from clashing. .IP "Examples" .INDENT 0.0 .TP -.B \fB\-vf lavfi=[gradfun=20:30,vflip]\fP +.B \fB\-\-vf=lavfi=[gradfun=20:30,vflip]\fP \fBgradfun\fP filter with nonsense parameters, followed by a \fBvflip\fP filter. (This demonstrates how libavfilter takes a graph and not just a single filter.) The filter graph string is @@ -9474,82 +9803,6 @@ forces a specific threading configuration. .UNINDENT .UNINDENT .TP -.B \fBpullup[=jl:jr:jt:jb:sb:mp]\fP -Pulldown reversal (inverse telecine) filter, capable of handling mixed -hard\-telecine, 24000/1001 fps progressive, and 30000/1001 fps progressive -content. The \fBpullup\fP filter makes use of future context in making its -decisions. It is stateless in the sense that it does not lock onto a pattern -to follow, but it instead looks forward to the following fields in order to -identify matches and rebuild progressive frames. -.INDENT 7.0 -.TP -.B \fBjl\fP, \fBjr\fP, \fBjt\fP, and \fBjb\fP -These options set the amount of "junk" to ignore at the left, right, -top, and bottom of the image, respectively. Left/right are in units of -8 pixels, while top/bottom are in units of 2 lines. The default is 8 -pixels on each side. -.TP -.B \fBsb\fP (strict breaks) -Setting this option to 1 will reduce the chances of \fBpullup\fP -generating an occasional mismatched frame, but it may also cause an -excessive number of frames to be dropped during high motion sequences. -Conversely, setting it to \-1 will make \fBpullup\fP match fields more -easily. This may help process video with slight blurring between the -fields, but may also cause interlaced frames in the output. -.TP -.B \fBmp\fP (metric plane) -This option may be set to \fBu\fP or \fBv\fP to use a chroma plane instead of the -luma plane for doing \fBpullup\fP\(aqs computations. This may improve accuracy -on very clean source material, but more likely will decrease accuracy, -especially if there is chroma noise (rainbow effect) or any grayscale -video. The main purpose of setting \fBmp\fP to a chroma plane is to reduce -CPU load and make pullup usable in realtime on slow machines. -.UNINDENT -.TP -.B \fByadif=[mode:interlaced\-only]\fP -Yet another deinterlacing filter -.INDENT 7.0 -.TP -.B \fB<mode>\fP -.INDENT 7.0 -.TP -.B frame -Output 1 frame for each frame. -.TP -.B field -Output 1 frame for each field (default). -.TP -.B frame\-nospatial -Like \fBframe\fP but skips spatial interlacing check. -.TP -.B field\-nospatial -Like \fBfield\fP but skips spatial interlacing check. -.UNINDENT -.TP -.B \fB<interlaced\-only>\fP -.INDENT 7.0 -.TP -.B no -Deinterlace all frames. -.TP -.B yes -Only deinterlace frames marked as interlaced (default). -.UNINDENT -.UNINDENT -.sp -This filter is automatically inserted when using the \fBd\fP key (or any -other key that toggles the \fBdeinterlace\fP property or when using the -\fB\-\-deinterlace\fP switch), assuming the video output does not have native -deinterlacing support. -.sp -If you just want to set the default mode, put this filter and its options -into \fB\-\-vf\-defaults\fP instead, and enable deinterlacing with \fBd\fP or -\fB\-\-deinterlace\fP\&. -.sp -Also, note that the \fBd\fP key is stupid enough to insert a deinterlacer twice -when inserting yadif with \fB\-\-vf\fP, so using the above methods is -recommended. -.TP .B \fBsub=[=bottom\-margin:top\-margin]\fP Moves subtitle rendering to an arbitrary point in the filter chain, or force subtitle rendering in the video filter as opposed to using video output OSD @@ -9576,117 +9829,6 @@ settings. .UNINDENT .UNINDENT .TP -.B \fBstereo3d[=in:out]\fP -Stereo3d converts between different stereoscopic image formats. -.INDENT 7.0 -.TP -.B \fB<in>\fP -Stereoscopic image format of input. Possible values: -.INDENT 7.0 -.TP -.B \fBsbsl\fP or \fBside_by_side_left_first\fP -side by side parallel (left eye left, right eye right) -.TP -.B \fBsbsr\fP or \fBside_by_side_right_first\fP -side by side crosseye (right eye left, left eye right) -.TP -.B \fBabl\fP or \fBabove_below_left_first\fP -above\-below (left eye above, right eye below) -.TP -.B \fBabr\fP or \fBabove_below_right_first\fP -above\-below (right eye above, left eye below) -.TP -.B \fBab2l\fP or \fBabove_below_half_height_left_first\fP -above\-below with half height resolution (left eye above, right eye -below) -.TP -.B \fBab2r\fP or \fBabove_below_half_height_right_first\fP -above\-below with half height resolution (right eye above, left eye -below) -.UNINDENT -.TP -.B \fB<out>\fP -Stereoscopic image format of output. Possible values are all the input -formats as well as: -.INDENT 7.0 -.TP -.B \fBarcg\fP or \fBanaglyph_red_cyan_gray\fP -anaglyph red/cyan gray (red filter on left eye, cyan filter on -right eye) -.TP -.B \fBarch\fP or \fBanaglyph_red_cyan_half_color\fP -anaglyph red/cyan half colored (red filter on left eye, cyan filter -on right eye) -.TP -.B \fBarcc\fP or \fBanaglyph_red_cyan_color\fP -anaglyph red/cyan color (red filter on left eye, cyan filter on -right eye) -.TP -.B \fBarcd\fP or \fBanaglyph_red_cyan_dubois\fP -anaglyph red/cyan color optimized with the least\-squares -projection of Dubois (red filter on left eye, cyan filter on right -eye) -.TP -.B \fBagmg\fP or \fBanaglyph_green_magenta_gray\fP -anaglyph green/magenta gray (green filter on left eye, magenta -filter on right eye) -.TP -.B \fBagmh\fP or \fBanaglyph_green_magenta_half_color\fP -anaglyph green/magenta half colored (green filter on left eye, -magenta filter on right eye) -.TP -.B \fBagmc\fP or \fBanaglyph_green_magenta_color\fP -anaglyph green/magenta colored (green filter on left eye, magenta -filter on right eye) -.TP -.B \fBaybg\fP or \fBanaglyph_yellow_blue_gray\fP -anaglyph yellow/blue gray (yellow filter on left eye, blue filter -on right eye) -.TP -.B \fBaybh\fP or \fBanaglyph_yellow_blue_half_color\fP -anaglyph yellow/blue half colored (yellow filter on left eye, blue -filter on right eye) -.TP -.B \fBaybc\fP or \fBanaglyph_yellow_blue_color\fP -anaglyph yellow/blue colored (yellow filter on left eye, blue -filter on right eye) -.TP -.B \fBirl\fP or \fBinterleave_rows_left_first\fP -Interleaved rows (left eye has top row, right eye starts on next -row) -.TP -.B \fBirr\fP or \fBinterleave_rows_right_first\fP -Interleaved rows (right eye has top row, left eye starts on next -row) -.TP -.B \fBml\fP or \fBmono_left\fP -mono output (left eye only) -.TP -.B \fBmr\fP or \fBmono_right\fP -mono output (right eye only) -.UNINDENT -.UNINDENT -.TP -.B \fBgradfun[=strength[:radius|:size=<size>]]\fP -Fix the banding artifacts that are sometimes introduced into nearly flat -regions by truncation to 8\-bit color depth. Interpolates the gradients that -should go where the bands are, and dithers them. -.INDENT 7.0 -.TP -.B \fB<strength>\fP -Maximum amount by which the filter will change any one pixel. Also the -threshold for detecting nearly flat regions (default: 1.5). -.TP -.B \fB<radius>\fP -Neighborhood to fit the gradient to. Larger radius makes for smoother -gradients, but also prevents the filter from modifying pixels near -detailed regions (default: disabled). -.TP -.B \fB<size>\fP -size of the filter in percent of the image diagonal size. This is -used to calculate the final radius size (default: 1). -.UNINDENT -.TP .B \fBvapoursynth=file:buffered\-frames:concurrent\-frames\fP Loads a VapourSynth filter script. This is intended for streamed processing: mpv actually provides a source filter, instead of using a @@ -9829,7 +9971,7 @@ Clips (VSNodeRef) are passed as light userdata, so trying to pass any other userdata type will result in hard crashes. .TP .B \fBvavpp\fP -VA\-AP\-API video post processing. Works with \fB\-\-vo=vaapi\fP and \fB\-\-vo=opengl\fP +VA\-AP\-API video post processing. Works with \fB\-\-vo=vaapi\fP and \fB\-\-vo=gpu\fP only. Currently deinterlaces. This filter is automatically inserted if deinterlacing is requested (either using the \fBd\fP key, by default mapped to the command \fBcycle deinterlace\fP, or the \fB\-\-deinterlace\fP option). @@ -9842,11 +9984,16 @@ Select the deinterlacing algorithm. .B no Don\(aqt perform deinterlacing. .TP +.B auto +Select the best quality deinterlacing algorithm (default). This +goes by the order of the options as documented, with +\fBmotion\-compensated\fP being considered best quality. +.TP .B first\-field Show only first field. .TP .B bob -bob deinterlacing (default). +bob deinterlacing. .TP .B weave, motion\-adaptive, motion\-compensated Advanced deinterlacing algorithms. Whether these actually work @@ -9858,10 +10005,10 @@ mpv bugs. .INDENT 7.0 .TP .B no -Deinterlace all frames. +Deinterlace all frames (default). .TP .B yes -Only deinterlace frames marked as interlaced (default). +Only deinterlace frames marked as interlaced. .UNINDENT .TP .B \fBreversal\-bug=<yes|no>\fP @@ -9881,12 +10028,12 @@ algorithms. .UNINDENT .TP .B \fBvdpaupp\fP -VDPAU video post processing. Works with \fB\-\-vo=vdpau\fP and \fB\-\-vo=opengl\fP +VDPAU video post processing. Works with \fB\-\-vo=vdpau\fP and \fB\-\-vo=gpu\fP only. This filter is automatically inserted if deinterlacing is requested (either using the \fBd\fP key, by default mapped to the command \fBcycle deinterlace\fP, or the \fB\-\-deinterlace\fP option). When enabling deinterlacing, it is always preferred over software deinterlacer filters -if the \fBvdpau\fP VO is used, and also if \fBopengl\fP is used and hardware +if the \fBvdpau\fP VO is used, and also if \fBgpu\fP is used and hardware decoding was activated at least once (i.e. vdpau was loaded). .INDENT 7.0 .TP @@ -9936,7 +10083,7 @@ Try to apply inverse telecine, needs motion adaptive temporal deinterlacing. .TP .B \fBinterlaced\-only=<yes|no>\fP -If \fByes\fP (default), only deinterlace frames marked as interlaced. +If \fByes\fP, only deinterlace frames marked as interlaced (default: no). .TP .B \fBhqscaling=<0\-9>\fP .INDENT 7.0 @@ -9958,7 +10105,7 @@ decoding for use. Whether deinterlacing is enabled (default: no). .TP .B \fBinterlaced\-only=<yes|no>\fP -If \fByes\fP (default), only deinterlace frames marked as interlaced. +If \fByes\fP, only deinterlace frames marked as interlaced (default: no). .TP .B \fBmode=<blend|bob|adaptive|mocomp|ivctc|none>\fP Tries to select a video processor with the given processing capability. @@ -9967,12 +10114,6 @@ which algorithm is actually selected. \fBnone\fP always falls back. On most if not all hardware, this option will probably do nothing, because a video processor usually supports all modes or none. .UNINDENT -.TP -.B \fBbuffer=<num>\fP -Buffer \fB<num>\fP frames in the filter chain. This filter is probably pretty -useless, except for debugging. (Note that this won\(aqt help to smooth out -latencies with decoding, because the filter will never output a frame if -the buffer isn\(aqt full, except on EOF.) .UNINDENT .SH ENCODING .sp @@ -9984,9 +10125,8 @@ Enables encoding mode and specifies the output file name. .TP .B \fB\-\-of=<format>\fP Specifies the output format (overrides autodetection by the file name -extension of the file specified by \fB\-o\fP). This can be a comma separated -list of possible formats to try. See \fB\-\-of=help\fP for a full list of -supported formats. +extension of the file specified by \fB\-o\fP). See \fB\-\-of=help\fP for a full +list of supported formats. .TP .B \fB\-\-ofopts=<options>\fP Specifies the output format options for libavformat. @@ -9999,51 +10139,17 @@ options list. .B \fB\-\-ofopts\-add=<options1[,options2,...]>\fP Appends the options given as arguments to the options list. .TP -.B \fB\-\-ofopts\-pre=<options1[,options2,...]>\fP -Prepends the options given as arguments to the options list. -.TP -.B \fB\-\-ofopts\-del=<index1[,index2,...]>\fP -Deletes the options at the given indexes. Index numbers start at 0, -negative numbers address the end of the list (\-1 is the last). -.TP -.B \fB\-\-ofopts\-clr\fP +.B \fB\-\-ofopts=""\fP Completely empties the options list. .UNINDENT .TP -.B \fB\-\-ofps=<float value>\fP -Specifies the output format time base (default: 24000). Low values like 25 -limit video fps by dropping frames. -.TP -.B \fB\-\-oautofps\fP -Sets the output format time base to the guessed frame rate of the input -video (simulates MEncoder behavior, useful for AVI; may cause frame drops). -Note that not all codecs and not all formats support VFR encoding, and some -which do have bugs when a target bitrate is specified \- use \fB\-\-ofps\fP or -\fB\-\-oautofps\fP to force CFR encoding in these cases. -.TP -.B \fB\-\-omaxfps=<float value>\fP -Specifies the minimum distance of adjacent frames (default: 0, which means -unset). Content of lower frame rate is not readjusted to this frame rate; -content of higher frame rate is decimated to this frame rate. -.TP -.B \fB\-\-oharddup\fP -If set, the frame rate given by \fB\-\-ofps\fP is attained not by skipping time -codes, but by duplicating frames (constant frame rate mode). -.TP -.B \fB\-\-oneverdrop\fP -If set, frames are never dropped. Instead, time codes of video are -readjusted to always increase. This may cause AV desync, though; to work -around this, use a high\-fps time base using \fB\-\-ofps\fP and absolutely -avoid \fB\-\-oautofps\fP\&. -.TP .B \fB\-\-oac=<codec>\fP -Specifies the output audio codec. This can be a comma separated list of -possible codecs to try. See \fB\-\-oac=help\fP for a full list of supported -codecs. +Specifies the output audio codec. See \fB\-\-oac=help\fP for a full list of +supported codecs. .TP .B \fB\-\-oaoffset=<value>\fP Shifts audio data by the given time (in seconds) by adding/removing -samples at the start. +samples at the start. Deprecated. .TP .B \fB\-\-oacopts=<options>\fP Specifies the output audio codec options for libavcodec. @@ -10066,31 +10172,23 @@ options list. .B \fB\-\-oacopts\-add=<options1[,options2,...]>\fP Appends the options given as arguments to the options list. .TP -.B \fB\-\-oacopts\-pre=<options1[,options2,...]>\fP -Prepends the options given as arguments to the options list. -.TP -.B \fB\-\-oacopts\-del=<index1[,index2,...]>\fP -Deletes the options at the given indexes. Index numbers start at 0, -negative numbers address the end of the list (\-1 is the last). -.TP -.B \fB\-\-oacopts\-clr\fP +.B \fB\-\-oacopts=""\fP Completely empties the options list. .UNINDENT .TP .B \fB\-\-oafirst\fP Force the audio stream to become the first stream in the output. -By default, the order is unspecified. +By default, the order is unspecified. Deprecated. .TP .B \fB\-\-ovc=<codec>\fP -Specifies the output video codec. This can be a comma separated list of -possible codecs to try. See \fB\-\-ovc=help\fP for a full list of supported -codecs. +Specifies the output video codec. See \fB\-\-ovc=help\fP for a full list of +supported codecs. .TP .B \fB\-\-ovoffset=<value>\fP Shifts video data by the given time (in seconds) by shifting the pts -values. +values. Deprecated. .TP -.B \fB\-\-ovcopts <options>\fP +.B \fB\-\-ovcopts=<options>\fP Specifies the output video codec options for libavcodec. See \-\-ovcopts=help for a full list of supported options. .INDENT 7.0 @@ -10114,27 +10212,13 @@ options list. .B \fB\-\-ovcopts\-add=<options1[,options2,...]>\fP Appends the options given as arguments to the options list. .TP -.B \fB\-\-ovcopts\-pre=<options1[,options2,...]>\fP -Prepends the options given as arguments to the options list. -.TP -.B \fB\-\-ovcopts\-del=<index1[,index2,...]>\fP -Deletes the options at the given indexes. Index numbers start at 0, -negative numbers address the end of the list (\-1 is the last). -.TP -.B \fB\-\-ovcopts\-clr\fP +.B \fB\-\-ovcopts=""\fP Completely empties the options list. .UNINDENT .TP .B \fB\-\-ovfirst\fP Force the video stream to become the first stream in the output. -By default, the order is unspecified. -.TP -.B \fB\-\-ocopyts\fP -Copies input pts to the output video (not supported by some output -container formats, e.g. AVI). Discontinuities are still fixed. -By default, audio pts are set to playback time and video pts are -synchronized to match audio pts, as some output formats do not support -anything else. +By default, the order is unspecified. Deprecated. .TP .B \fB\-\-orawts\fP Copies input pts to the output video (not supported by some output @@ -10142,9 +10226,40 @@ container formats, e.g. AVI). In this mode, discontinuities are not fixed and all pts are passed through as\-is. Never seek backwards or use multiple input files in this mode! .TP -.B \fB\-\-no\-ometadata\fP +.B \fB\-\-no\-ocopy\-metadata\fP Turns off copying of metadata from input files to output files when encoding (which is enabled by default). +.TP +.B \fB\-\-oset\-metadata=<metadata\-tag[,metadata\-tag,...]>\fP +Specifies metadata to include in the output file. +Supported keys vary between output formats. For example, Matroska (MKV) and +FLAC allow almost arbitrary keys, while support in MP4 and MP3 is more +limited. +.INDENT 7.0 +.INDENT 3.5 +.IP "Example" +.INDENT 0.0 +.TP +.B "\fB\-\-oset\-metadata=title="Output title",comment="Another tag"\fP" +adds a title and a comment to the output file. +.UNINDENT +.UNINDENT +.UNINDENT +.TP +.B \fB\-\-oremove\-metadata=<metadata\-tag[,metadata\-tag,...]>\fP +Specifies metadata to exclude from the output file when copying from the +input file. +.INDENT 7.0 +.INDENT 3.5 +.IP "Example" +.INDENT 0.0 +.TP +.B "\fB\-\-oremove\-metadata=comment,genre\fP" +excludes copying of the the comment and genre tags to the output +file. +.UNINDENT +.UNINDENT +.UNINDENT .UNINDENT .SH COMMAND INTERFACE .sp @@ -10729,7 +10844,7 @@ be run. Then it can happen that creating the video chain fails. .IP \(bu 2 \fBb vf set ""\fP remove all video filters on \fBb\fP .IP \(bu 2 -\fBc vf toggle lavfi=gradfun\fP toggle debanding on \fBc\fP +\fBc vf toggle gradfun\fP toggle debanding on \fBc\fP .UNINDENT .UNINDENT .UNINDENT @@ -10738,35 +10853,29 @@ be run. Then it can happen that creating the video chain fails. .IP "Example how to toggle disabled filters at runtime" .INDENT 0.0 .IP \(bu 2 -Add something \fBvf\-add=@deband:!lavfi=[gradfun]\fP to \fBmpv.conf\fP\&. The -\fB@deband:\fP is the label, and \fBdeband\fP is an arbitrary, user\-given -name for this filter entry. The \fB!\fP before the filter name disables -the filter by default. Everything after this is the normal filter name -and the filter parameters. +Add something like \fBvf\-add=@deband:!gradfun\fP to \fBmpv.conf\fP\&. +The \fB@deband:\fP is the label, an arbitrary, user\-given name for this +filter entry. The \fB!\fP before the filter name disables the filter by +default. Everything after this is the normal filter name and possibly +filter parameters, like in the normal \fB\-\-vf\fP syntax. .IP \(bu 2 Add \fBa vf toggle @deband\fP to \fBinput.conf\fP\&. This toggles the -"disabled" flag for the filter identified with \fBdeband\fP\&. +"disabled" flag for the filter with the label \fBdeband\fP when the +\fBa\fP key is hit. .UNINDENT .UNINDENT .UNINDENT .TP .B \fBcycle\-values ["!reverse"] <property> "<value1>" "<value2>" ...\fP Cycle through a list of values. Each invocation of the command will set the -given property to the next value in the list. The command maintains an -internal counter which value to pick next, and which is initially 0. It is -reset to 0 once the last value is reached. -.sp -The internal counter is associated using the property name and the value -list. If multiple commands (bound to different keys) use the same name -and value list, they will share the internal counter. +given property to the next value in the list. The command will use the +current value of the property/option, and use it to determine the current +position in the list of values. Once it has found it, it will set the +next value in the list (wrapping around to the first item if needed). .sp The special argument \fB!reverse\fP can be used to cycle the value list in -reverse. Compared with a command that just lists the value in reverse, this -command will actually share the internal counter with the forward\-cycling -key binding (as long as the rest of the arguments are the same). -.sp -Note that there is a static limit of (as of this writing) 10 arguments -(this limit could be raised on demand). +reverse. The only advantage is that you don\(aqt need to reverse the value +list yourself when adding a second key binding for cycling backwards. .TP .B \fBenable\-section "<section>" [flags]\fP Enable all key bindings in the named input section. @@ -10986,7 +11095,28 @@ There is no such thing as "unapplying" a profile \- applying a profile merely sets all option values listed within the profile. .TP .B \fBload\-script "<path>"\fP -Load a script, similar to the \fB\-\-script\fP option. +Load a script, similar to the \fB\-\-script\fP option. Whether this waits for +the script to finish initialization or not changed multiple times, and the +future behavior is left undefined. +.TP +.B \fBchange\-list "<option>" "<operation>" "<value>"\fP +This command changes list options as described in \fI\%List Options\fP\&. The +\fB<option>\fP parameter is the normal option name, while \fB<operation>\fP is +the suffix or action used on the option. +.sp +Some operations take no value, but the command still requires the value +parameter. In these cases, the value must be an empty string. +.INDENT 7.0 +.INDENT 3.5 +.IP "Example" +.sp +\fBchange\-list glsl\-shaders append file.glsl\fP +.sp +Add a filename to the \fBglsl\-shaders\fP list. The command line +equivalent is \fB\-\-glsl\-shaders\-append=file.glsl\fP or alternatively +\fB\-\-glsl\-shader=file.glsl\fP\&. +.UNINDENT +.UNINDENT .UNINDENT .sp Undocumented commands: \fBtv\-last\-channel\fP (TV/DVB only), @@ -11000,6 +11130,52 @@ and obscure way to handle events that require stricter coordination. There are no API stability guarantees made. Not following the protocol exactly can make the player freeze randomly. Basically, nobody should use this API. .sp +The C API is described in the header files. The Lua API is described in the +Lua section. +.sp +The following hooks are currently defined: +.INDENT 0.0 +.TP +.B \fBon_load\fP +Called when a file is to be opened, before anything is actually done. +For example, you could read and write the \fBstream\-open\-filename\fP +property to redirect an URL to something else (consider support for +streaming sites which rarely give the user a direct media URL), or +you could set per\-file options with by setting the property +\fBfile\-local\-options/<option name>\fP\&. The player will wait until all +hooks are run. +.TP +.B \fBon_load_fail\fP +Called after after a file has been opened, but failed to. This can be +used to provide a fallback in case native demuxers failed to recognize +the file, instead of always running before the native demuxers like +\fBon_load\fP\&. Demux will only be retried if \fBstream\-open\-filename\fP +was changed. +.TP +.B \fBon_preloaded\fP +Called after a file has been opened, and before tracks are selected and +decoders are created. This has some usefulness if an API users wants +to select tracks manually, based on the set of available tracks. It\(aqs +also useful to initialize \fB\-\-lavfi\-complex\fP in a specific way by API, +without having to "probe" the available streams at first. +.sp +Note that this does not yet apply default track selection. Which operations +exactly can be done and not be done, and what information is available and +what is not yet available yet, is all subject to change. +.TP +.B \fBon_unload\fP +Run before closing a file, and before actually uninitializing +everything. It\(aqs not possible to resume playback in this state. +.UNINDENT +.SS Legacy hook API +.sp +\fBWARNING:\fP +.INDENT 0.0 +.INDENT 3.5 +The legacy API is deprecated and will be removed soon. +.UNINDENT +.UNINDENT +.sp There are two special commands involved. Also, the client must listen for client messages (\fBMPV_EVENT_CLIENT_MESSAGE\fP in the C API). .INDENT 0.0 @@ -11025,7 +11201,6 @@ used to correctly handle multiple hooks registered by the same client, as long as the \fBid\fP argument is unique in the client) .IP 3. 3 something undefined, used by the hook mechanism to track hook execution -(currently, it\(aqs the hook\-name, but this might change without warning) .UNINDENT .sp Upon receiving this message, the client can handle the event. While doing @@ -11040,34 +11215,6 @@ Run the next hook in the global chain of hooks. The argument is the 3rd argument of the client message that starts hook execution for the current client. .UNINDENT -.sp -The following hooks are currently defined: -.INDENT 0.0 -.TP -.B \fBon_load\fP -Called when a file is to be opened, before anything is actually done. -For example, you could read and write the \fBstream\-open\-filename\fP -property to redirect an URL to something else (consider support for -streaming sites which rarely give the user a direct media URL), or -you could set per\-file options with by setting the property -\fBfile\-local\-options/<option name>\fP\&. The player will wait until all -hooks are run. -.TP -.B \fBon_preloaded\fP -Called after a file has been opened, and before tracks are selected and -decoders are created. This has some usefulness if an API users wants -to select tracks manually, based on the set of available tracks. It\(aqs -also useful to initialize \fB\-\-lavfi\-complex\fP in a specific way by API, -without having to "probe" the available streams at first. -.sp -Note that this does not yet apply default track selection. Which operations -exactly can be done and not be done, and what information is available and -what is not yet available yet, is all subject to change. -.TP -.B \fBon_unload\fP -Run before closing a file, and before actually uninitializing -everything. It\(aqs not possible to resume playback in this state. -.UNINDENT .SS Input Command Prefixes .sp These prefixes are placed between key name and the actual command. Multiple @@ -11188,8 +11335,8 @@ all text after the last \fB\&.\fP\&. Usually this removes the file extension. .TP .B \fBfile\-size\fP Length in bytes of the source file/stream. (This is the same as -\fB${stream\-end}\fP\&. For ordered chapters and such, the -size of the currently played segment is returned.) +\fB${stream\-end}\fP\&. For segmented/multi\-part files, this will return the +size of the main or manifest file, whatever it is.) .TP .B \fBestimated\-frame\-count\fP Total number of frames in current file. @@ -11239,8 +11386,7 @@ Name of the current demuxer. (This is useless.) .TP .B \fBstream\-path\fP Filename (full path) of the stream layer filename. (This is probably -useless. It looks like this can be different from \fBpath\fP only when -using e.g. ordered chapters.) +useless and is almost never different from \fBpath\fP\&.) .TP .B \fBstream\-pos\fP Raw byte position in source stream. Technically, this returns the position @@ -11568,6 +11714,66 @@ data in demuxer. Returns \fByes\fP if the demuxer is idle, which means the demuxer cache is filled to the requested amount, and is currently not reading more data. .TP +.B \fBdemuxer\-cache\-state\fP +Various undocumented or half\-documented things. +.sp +Each entry in \fBseekable\-ranges\fP represents a region in the demuxer cache +that can be seeked to. If there are multiple demuxers active, this only +returns information about the "main" demuxer, but might be changed in +future to return unified information about all demuxers. The ranges are in +arbitrary order. Often, ranges will overlap for a bit, before being joined. +In broken corner cases, ranges may overlap all over the place. +.sp +The end of a seek range is usually smaller than the value returned by the +\fBdemuxer\-cache\-time\fP property, because that property returns the guessed +buffering amount, while the seek ranges represent the buffered data that +can actually be used for cached seeking. +.sp +\fBfw\-bytes\fP is the number of bytes of packets buffered in the range +starting from the current decoding position. +.sp +When querying the property with the client API using \fBMPV_FORMAT_NODE\fP, +or with Lua \fBmp.get_property_native\fP, this will return a mpv_node with +the following contents: +.INDENT 7.0 +.INDENT 3.5 +.sp +.nf +.ft C +MPV_FORMAT_NODE_MAP + "seekable\-ranges" MPV_FORMAT_NODE_ARRAY + MPV_FORMAT_NODE_MAP + "start" MPV_FORMAT_DOUBLE + "end" MPV_FORMAT_DOUBLE + "fw\-bytes" MPV_FORMAT_INT64 +.ft P +.fi +.UNINDENT +.UNINDENT +.sp +Other fields (might be changed or removed in the future): +.INDENT 7.0 +.TP +.B \fBeof\fP +True if the reader thread has hit the end of the file. +.TP +.B \fBunderrun\fP +True if the reader thread could not satisfy a decoder\(aqs request for a +new packet. +.TP +.B \fBidle\fP +True if the thread is currently not reading. +.TP +.B \fBtotal\-bytes\fP +Sum of packet bytes (plus some overhead estimation) of the entire packet +queue, including cached seekable ranges. +.TP +.B \fBfw\-bytes\fP +Sum of packet bytes (plus some overhead estimation) of the readahead +packet queue (packets between current decoder reader positions and +demuxer position). +.UNINDENT +.TP .B \fBdemuxer\-via\-network\fP Returns \fByes\fP if the stream demuxed via the main demuxer is most likely played via network. What constitutes "network" is not always clear, might @@ -11596,8 +11802,8 @@ logically be cleared immediately after it\(aqs set. .B \fBseeking\fP Returns \fByes\fP if the player is currently seeking, or otherwise trying to restart playback. (It\(aqs possible that it returns \fByes\fP while a file -is loaded, or when switching ordered chapter segments. This is because -the same underlying code is used for seeking and resyncing.) +is loadedThis is because the same underlying code is used for seeking and +resyncing.) .TP .B \fBmixer\-active\fP Return \fByes\fP if the audio mixer is active, \fBno\fP otherwise. @@ -11701,9 +11907,9 @@ software decoding. If no decoder is loaded, the property is unavailable. .B \fBhwdec\-interop\fP This returns the currently loaded hardware decoding/output interop driver. This is known only once the VO has opened (and possibly later). With some -VOs (like \fBopengl\fP), this might be never known in advance, but only when +VOs (like \fBgpu\fP), this might be never known in advance, but only when the decoder attempted to create the hw decoder successfully. (Using -\fB\-\-opengl\-hwdec\-interop\fP can load it eagerly.) If there are multiple +\fB\-\-gpu\-hwdec\-interop\fP can load it eagerly.) If there are multiple drivers loaded, they will be separated by \fB,\fP\&. .sp If no VO is active or no interop driver is known, this property is @@ -11712,9 +11918,6 @@ unavailable. This does not necessarily use the same values as \fBhwdec\fP\&. There can be multiple interop drivers for the same hardware decoder, depending on platform and VO. -.sp -This is somewhat similar to the \fB\-\-opengl\-hwdec\-interop\fP option, but -it returns the actually loaded backend, not the value of this option. .TP .B \fBvideo\-format\fP Video format as string. @@ -11843,11 +12046,19 @@ redrawing and frame display being somewhat disconnected, and you might have to pause and force a redraw. .sp Sub\-properties: +.INDENT 7.0 +.INDENT 3.5 .sp -\fBvideo\-frame\-info/picture\-type\fP -\fBvideo\-frame\-info/interlaced\fP -\fBvideo\-frame\-info/tff\fP -\fBvideo\-frame\-info/repeat\fP +.nf +.ft C +video\-frame\-info/picture\-type +video\-frame\-info/interlaced +video\-frame\-info/tff +video\-frame\-info/repeat +.ft P +.fi +.UNINDENT +.UNINDENT .TP .B \fBcontainer\-fps\fP Container FPS. This can easily contain bogus values. For videos that use @@ -12392,10 +12603,6 @@ Current video output driver (name as used with \fB\-\-vo\fP). .B \fBcurrent\-ao\fP Current audio output driver (name as used with \fB\-\-ao\fP). .TP -.B \fBaudio\-out\-detected\-device\fP -Return the audio device selected by the AO driver (only implemented for -some drivers: currently only \fBcoreaudio\fP). -.TP .B \fBworking\-directory\fP Return the working directory of the mpv process. Can be useful for JSON IPC users, because the command line player usually works with relative paths. @@ -12411,9 +12618,6 @@ List of decoders supported. This lists decoders which can be passed to \fB\-\-vd\fP and \fB\-\-ad\fP\&. .INDENT 7.0 .TP -.B \fBfamily\fP -Decoder driver. Usually \fBlavc\fP for libavcodec. -.TP .B \fBcodec\fP Canonical codec name, which identifies the format the decoder can handle. @@ -12437,7 +12641,6 @@ the following contents: .ft C MPV_FORMAT_NODE_ARRAY MPV_FORMAT_NODE_MAP (for each decoder entry) - "family" MPV_FORMAT_STRING "codec" MPV_FORMAT_STRING "driver" MPV_FORMAT_STRING "description" MPV_FORMAT_STRING @@ -12451,6 +12654,10 @@ List of libavcodec encoders. This has the same format as \fBdecoder\-list\fP\&. The encoder names (\fBdriver\fP entries) can be passed to \fB\-\-ovc\fP and \fB\-\-oac\fP (without the \fBlavc:\fP prefix required by \fB\-\-vd\fP and \fB\-\-ad\fP). .TP +.B \fBdemuxer\-lavf\-list\fP +List of available libavformat demuxers\(aq names. This can be used to check +for support for a specific format or use with \fB\-\-demuxer\-lavf\-format\fP\&. +.TP .B \fBmpv\-version\fP Return the mpv version/copyright string. Depending on how the binary was built, it might contain either a release version, or just a git hash. @@ -13019,7 +13226,7 @@ _ .SS Configuration .sp The OSC offers limited configuration through a config file -\fBlua\-settings/osc.conf\fP placed in mpv\(aqs user dir and through the +\fBscript\-opts/osc.conf\fP placed in mpv\(aqs user dir and through the \fB\-\-script\-opts\fP command\-line option. Options provided through the command\-line will override those from the config file. .SS Config Syntax @@ -13072,6 +13279,15 @@ Sets the style of the seekbar, slider (diamond marker), knob (circle marker with guide), or bar (fill). Default pre\-0.21.0 was \(aqslider\(aq. .TP +.B \fBseekbarkeyframes\fP +Default: yes +.sp +Controls the mode used to seek when dragging the seekbar. By default, +keyframes are used. If set to false, exact seeking on mouse drags +will be used instead. Keyframes are preferred, but exact seeks may be +useful in cases where keyframes cannot be found. Note that using exact +seeks can potentially make mouse dragging much slower. +.TP .B \fBdeadzonesize\fP Default: 0.5 .sp @@ -13173,6 +13389,11 @@ Default: no .sp Display timecodes with milliseconds .TP +.B \fBseekranges\fP +Default: yes +.sp +Display seekable ranges on the seekbar +.TP .B \fBvisibility\fP Default: auto (auto hide/show on mouse move) .sp @@ -13222,6 +13443,202 @@ b script\-message osc\-visibility auto Shows a limited view of the respective type of list using the OSC. First argument is duration in seconds. .UNINDENT +.SH STATS +.sp +This builtin script displays information and statistics for the currently +played file. It is enabled by default if mpv was compiled with Lua support. +It can be disabled entirely using the \fB\-\-load\-stats\-overlay=no\fP option. +.SS Usage +.sp +The following key bindings are active by default unless something else is +already bound to them: +.TS +center; +|l|l|. +_ +T{ +i +T} T{ +Show stats for a fixed duration +T} +_ +T{ +I +T} T{ +Toggle stats (shown until toggled again) +T} +_ +.TE +.sp +While the stats are visible on screen the following key bindings are active, +regardless of existing bindings. They allow you to switch between \fIpages\fP of +stats: +.TS +center; +|l|l|. +_ +T{ +1 +T} T{ +Show usual stats +T} +_ +T{ +2 +T} T{ +Show frame timings +T} +_ +.TE +.SS Font +.sp +For optimal visual experience, a font with support for many font weights and +monospaced digits is recommended. By default, the open source font +\fI\%Source Sans Pro\fP is used. +.SS Configuration +.sp +This script can be customized through a config file \fBscript\-opts/stats.conf\fP +placed in mpv\(aqs user directory and through the \fB\-\-script\-opts\fP command\-line +option. The configuration syntax is described in \fI\%ON SCREEN CONTROLLER\fP\&. +.SS Configurable Options +.INDENT 0.0 +.TP +.B \fBkey_oneshot\fP +Default: i +.TP +.B \fBkey_toggle\fP +Default: I +.sp +Key bindings to display stats. +.TP +.B \fBkey_page_1\fP +Default: 1 +.TP +.B \fBkey_page_2\fP +Default: 2 +.sp +Key bindings for page switching while stats are displayed. +.TP +.B \fBduration\fP +Default: 4 +.sp +How long the stats are shown in seconds (oneshot). +.TP +.B \fBredraw_delay\fP +Default: 1 +.sp +How long it takes to refresh the displayed stats in seconds (toggling). +.TP +.B \fBpersistent_overlay\fP +Default: no +.sp +When \fIno\fP, other scripts printing text to the screen can overwrite the +displayed stats. When \fIyes\fP, displayed stats are persistently shown for the +respective duration. This can result in overlapping text when multiple +scripts decide to print text at the same time. +.TP +.B \fBplot_perfdata\fP +Default: yes +.sp +Show graphs for performance data (page 2). +.TP +.B \fBplot_vsync_ratio\fP +Default: yes +.TP +.B \fBplot_vsync_jitter\fP +Default: yes +.sp +Show graphs for vsync and jitter values (page 1). Only when toggled. +.TP +.B \fBflush_graph_data\fP +Default: yes +.sp +Clear data buffers used for drawing graphs when toggling. +.TP +.B \fBfont\fP +Default: Source Sans Pro +.sp +Font name. Should support as many font weights as possible for optimal +visual experience. +.TP +.B \fBfont_mono\fP +Default: Source Sans Pro +.sp +Font name for parts where monospaced characters are necessary to align +text. Currently, monospaced digits are sufficient. +.TP +.B \fBfont_size\fP +Default: 8 +.sp +Font size used to render text. +.TP +.B \fBfont_color\fP +Default: FFFFFF +.sp +Font color. +.TP +.B \fBborder_size\fP +Default: 0.8 +.sp +Size of border drawn around the font. +.TP +.B \fBborder_color\fP +Default: 262626 +.sp +Color of drawn border. +.TP +.B \fBalpha\fP +Default: 11 +.sp +Transparency for drawn text. +.TP +.B \fBplot_bg_border_color\fP +Default: 0000FF +.sp +Border color used for drawing graphs. +.TP +.B \fBplot_bg_color\fP +Default: 262626 +.sp +Background color used for drawing graphs. +.TP +.B \fBplot_color\fP +Default: FFFFFF +.sp +Color used for drawing graphs. +.UNINDENT +.sp +Note: colors are given as hexadecimal values and use ASS tag order: BBGGRR +(blue green red). +.SS Different key bindings +.sp +A different key binding can be defined with the aforementioned options +\fBkey_oneshot\fP and \fBkey_toggle\fP but also with commands in \fBinput.conf\fP, +for example: +.INDENT 0.0 +.INDENT 3.5 +.sp +.nf +.ft C +e script\-binding stats/display\-stats +E script\-binding stats/display\-stats\-toggle +.ft P +.fi +.UNINDENT +.UNINDENT +.sp +Using \fBinput.conf\fP, it is also possible to directly display a certain page: +.INDENT 0.0 +.INDENT 3.5 +.sp +.nf +.ft C +i script\-binding stats/display\-page\-1 +e script\-binding stats/display\-page\-2 +.ft P +.fi +.UNINDENT +.UNINDENT .SH LUA SCRIPTING .sp mpv can load Lua scripts. Scripts passed to the \fB\-\-script\fP option, or found in @@ -13263,7 +13680,10 @@ option. Some scripts are loaded internally (like \fB\-\-osc\fP). Each script run its own thread. Your script is first run "as is", and once that is done, the event loop is entered. This event loop will dispatch events received by mpv and call your own event handlers which you have registered with \fBmp.register_event\fP, or -timers added with \fBmp.add_timeout\fP or similar. +timers added with \fBmp.add_timeout\fP or similar. Note that since the +script starts execution concurrently with player initialization, some properties +may not be populated with meaningful values until the relevant subsystems have +initialized. .sp When the player quits, all scripts will be asked to terminate. This happens via a \fBshutdown\fP event, which by default will make the event loop return. If your @@ -13284,7 +13704,10 @@ the player will more or less hang until the script returns from the main chunk (and \fBmp_event_loop\fP is called), or the script calls \fBmp_event_loop\fP or \fBmp.dispatch_events\fP directly. This is done to make it possible for a script to fully setup event handlers etc. before playback actually starts. In older -mpv versions, this happened asynchronously. +mpv versions, this happened asynchronously. With mpv 0.29.0, this changes +slightly, and it merely waits for scripts to be loaded in this manner before +starting playback as part of the player initialization phase. Scripts run though +initialization in parallel. This might change again. .SS mp functions .sp The \fBmp\fP module is preloaded, although it can be loaded manually with @@ -13689,7 +14112,7 @@ with mpv 0.23.0 (no replacement). .TP .B \fBmp.get_wakeup_pipe()\fP Calls \fBmpv_get_wakeup_pipe()\fP and returns the read end of the wakeup -pipe. (See \fBclient.h\fP for details.) +pipe. This is deprecated, but still works. (See \fBclient.h\fP for details.) .TP .B \fBmp.get_next_timeout()\fP Return the relative time in seconds when the next timer (\fBmp.add_timeout\fP @@ -13749,16 +14172,17 @@ with \fBrequire \(aqmp.msg\(aq\fP\&. .TP .B \fBmsg.log(level, ...)\fP The level parameter is the message priority. It\(aqs a string and one of -\fBfatal\fP, \fBerror\fP, \fBwarn\fP, \fBinfo\fP, \fBv\fP, \fBdebug\fP\&. The user\(aqs -settings will determine which of these messages will be visible. Normally, -all messages are visible, except \fBv\fP and \fBdebug\fP\&. +\fBfatal\fP, \fBerror\fP, \fBwarn\fP, \fBinfo\fP, \fBv\fP, \fBdebug\fP, \fBtrace\fP\&. The +user\(aqs settings will determine which of these messages will be +visible. Normally, all messages are visible, except \fBv\fP, \fBdebug\fP and +\fBtrace\fP\&. .sp The parameters after that are all converted to strings. Spaces are inserted to separate multiple parameters. .sp You don\(aqt need to add newlines. .TP -.B \fBmsg.fatal(...)\fP, \fBmsg.error(...)\fP, \fBmsg.warn(...)\fP, \fBmsg.info(...)\fP, \fBmsg.verbose(...)\fP, \fBmsg.debug(...)\fP +.B \fBmsg.fatal(...)\fP, \fBmsg.error(...)\fP, \fBmsg.warn(...)\fP, \fBmsg.info(...)\fP, \fBmsg.verbose(...)\fP, \fBmsg.debug(...)\fP, \fBmsg.trace(...)\fP All of these are shortcuts and equivalent to the corresponding \fBmsg.log(level, ...)\fP call. .UNINDENT @@ -13799,7 +14223,7 @@ print(options.optionA) .UNINDENT .UNINDENT .sp -The config file will be stored in \fBlua\-settings/identifier.conf\fP in mpv\(aqs user +The config file will be stored in \fBscript\-opts/identifier.conf\fP in mpv\(aqs user folder. Comment lines can be started with # and stray spaces are not removed. Boolean values will be represented with yes/no. .sp @@ -13879,6 +14303,46 @@ List all entries, even device files, dead symlinks, FIFOs, and the .sp On error, \fBnil, error\fP is returned. .TP +.B \fButils.file_info(path)\fP +Stats the given path for information and returns a table with the +following entries: +.INDENT 7.0 +.INDENT 3.5 +.INDENT 0.0 +.TP +.B \fBmode\fP +protection bits (on Windows, always 755 (octal) for directories +and 644 (octal) for files) +.TP +.B \fBsize\fP +size in bytes +.TP +.B \fBatime\fP +time of last access +.TP +.B \fBmtime\fP +time of last modification +.TP +.B \fBctime\fP +time of last metadata change (Linux) / time of creation (Windows) +.TP +.B \fBis_file\fP +Whether \fBpath\fP is a regular file (boolean) +.TP +.B \fBis_dir\fP +Whether \fBpath\fP is a directory (boolean) +.UNINDENT +.UNINDENT +.UNINDENT +.sp +\fBmode\fP and \fBsize\fP are integers. +Timestamps (\fBatime\fP, \fBmtime\fP and \fBctime\fP) are integer seconds since +the Unix epoch (Unix time). +The booleans \fBis_file\fP and \fBis_dir\fP are provided as a convenience; +they can be and are derived from \fBmode\fP\&. +.sp +On error (eg. path does not exist), \fBnil, error\fP is returned. +.TP .B \fButils.split_path(path)\fP Split a path into directory component and filename component, and return them. The first return value is always the directory. The second return @@ -13959,6 +14423,10 @@ Array of strings of the same semantics as the \fBargs\fP used in the .sp The function returns \fBnil\fP\&. .TP +.B \fButils.getpid()\fP +Returns the process ID of the running mpv process. This can be used to identify +the calling mpv when launching (detached) subprocesses. +.TP .B \fButils.parse_json(str [, trail])\fP Parses the given string argument as JSON, and returns it as a Lua table. On error, returns \fBnil, error\fP\&. (Currently, \fBerror\fP is just a string @@ -14169,14 +14637,14 @@ otherwise, the documented Lua options, script directories, loading, etc apply to JavaScript files too. .sp Script initialization and lifecycle is the same as with Lua, and most of the Lua -functions at the modules \fBmp\fP, \fBmp.utils\fP and \fBmp.msg\fP are available to -JavaScript with identical APIs \- including running commands, getting/setting -properties, registering events/key\-bindings/property\-changes/hooks, etc. +functions at the modules \fBmp\fP, \fBmp.utils\fP, \fBmp.msg\fP and \fBmp.options\fP are +available to JavaScript with identical APIs \- including running commands, +getting/setting properties, registering events/key\-bindings/hooks, etc. .SS Differences from Lua .sp -No need to load modules. \fBmp\fP, \fBmp.utils\fP and \fBmp.msg\fP are preloaded, and -you can use e.g. \fBvar cwd = mp.utils.getcwd();\fP without prior setup. -\fBmp.options\fP is currently not implemented, but \fBmp.get_opt(...)\fP is. +No need to load modules. \fBmp\fP, \fBmp.utils\fP, \fBmp.msg\fP and \fBmp.options\fP +are preloaded, and you can use e.g. \fBvar cwd = mp.utils.getcwd();\fP without +prior setup. .sp Errors are slightly different. Where the Lua APIs return \fBnil\fP for error, the JavaScript ones return \fBundefined\fP\&. Where Lua returns \fBsomething, error\fP @@ -14203,10 +14671,6 @@ MuJS pages on language features and platform support \- \fI\%http://mujs.com\fP .sp \fBmp.add_periodic_timer(seconds, fn)\fP JS: \fBid = setInterval(fn, ms)\fP .sp -\fBmp.register_idle(fn)\fP JS: \fBid = setTimeout(fn)\fP -.sp -\fBmp.unregister_idle(fn)\fP JS: \fBclearTimeout(id)\fP -.sp \fButils.parse_json(str [, trail])\fP JS: \fBJSON.parse(str)\fP .sp \fButils.format_json(v)\fP JS: \fBJSON.stringify(v)\fP @@ -14222,8 +14686,6 @@ MuJS pages on language features and platform support \- \fI\%http://mujs.com\fP \fBmp.get_next_timeout()\fP see event loop below. .sp \fBmp.dispatch_events([allow_wait])\fP see event loop below. -.sp -\fBmp.options\fP module is not implemented currently for JS. .SS Scripting APIs \- identical to Lua .sp (LE) \- Last\-Error, indicates that \fBmp.last_error()\fP can be used after the @@ -14278,6 +14740,10 @@ Otherwise, where the Lua APIs return \fBnil\fP on error, JS returns \fBundefined .sp \fBmp.get_wakeup_pipe()\fP .sp +\fBmp.register_idle(fn)\fP +.sp +\fBmp.unregister_idle(fn)\fP +.sp \fBmp.enable_messages(level)\fP .sp \fBmp.register_script_message(name, fn)\fP @@ -14298,10 +14764,14 @@ Otherwise, where the Lua APIs return \fBnil\fP on error, JS returns \fBundefined .sp \fBmp.msg.debug(...)\fP .sp +\fBmp.msg.trace(...)\fP +.sp \fBmp.utils.getcwd()\fP (LE) .sp \fBmp.utils.readdir(path [, filter])\fP (LE) .sp +\fBmp.utils.file_info(path)\fP (LE) +.sp \fBmp.utils.split_path(path)\fP .sp \fBmp.utils.join_path(p1, p2)\fP @@ -14310,7 +14780,11 @@ Otherwise, where the Lua APIs return \fBnil\fP on error, JS returns \fBundefined .sp \fBmp.utils.subprocess_detached(t)\fP .sp +\fBmp.utils.getpid()\fP (LE) +.sp \fBmp.add_hook(type, priority, fn)\fP +.sp +\fBmp.options.read_options(obj [, identifier])\fP (types: string/boolean/number) .SS Additional utilities .INDENT 0.0 .TP @@ -14357,7 +14831,7 @@ Returns the file name of the current script. .TP .B \fBexit()\fP (global) Make the script exit at the end of the current event loop iteration. -Note: please reomve added key bindings before calling \fBexit()\fP\&. +Note: please remove added key bindings before calling \fBexit()\fP\&. .TP .B \fBmp.utils.compile_js(fname, content_str)\fP Compiles the JS code \fBcontent_str\fP as file name \fBfname\fP (without loading @@ -14395,7 +14869,7 @@ event loop iteration or at a later event loop iteration. This is true also for intervals \- which also never call back twice at the same event loop iteration. .sp Additionally, timers are processed after the event queue is empty, so it\(aqs valid -to use \fBsetTimeout(fn)\fP instead of Lua\(aqs \fBmp.register_idle(fn)\fP\&. +to use \fBsetTimeout(fn)\fP as a one\-time idle observer. .SS CommonJS modules and \fBrequire(id)\fP .sp CommonJS Modules are a standard system where scripts can export common functions @@ -14446,6 +14920,10 @@ function mp_event_loop() { wait = 0; } else { wait = mp.process_timers() / 1000; + if (wait != 0) { + mp.notify_idle_observers(); + wait = mp.peek_timers_wait() / 1000; + } } } while (mp.keep_running); } @@ -14468,6 +14946,13 @@ if there are such (event handlers, property observers, script messages, etc). and returns the duration in ms till the next due timer (possibly 0), or \-1 if there are no pending timers. Must not be called recursively. .sp +\fBmp.notify_idle_observers()\fP calls back the idle observers, which we do when +we\(aqre about to sleep (wait != 0), but the observers may add timers or take +non\-negligible duration to complete, so we re\-calculate \fBwait\fP afterwards. +.sp +\fBmp.peek_timers_wait()\fP returns the same values as \fBmp.process_timers()\fP +but without doing anything. Invalid result if called from a timer callback. +.sp Note: \fBexit()\fP is also registered for the \fBshutdown\fP event, and its implementation is a simple \fBmp.keep_running = false\fP\&. .SH JSON IPC @@ -14725,20 +15210,7 @@ Example: .UNINDENT .TP .B \fBset_property_string\fP -Like \fBset_property\fP, but the argument value must be passed as string. -.sp -Example: -.INDENT 7.0 -.INDENT 3.5 -.sp -.nf -.ft C -{ "command": ["set_property_string", "pause", "yes"] } -{ "error": "success" } -.ft P -.fi -.UNINDENT -.UNINDENT +Alias for \fBset_property\fP\&. Both commands accept native values and strings. .TP .B \fBobserve_property\fP Watch a property for changes. If the given property is changed, then an @@ -15142,7 +15614,7 @@ extract the media filename from this hash. However, you can set the \fB\-\-write\-filename\-in\-watch\-later\-config\fP option, and the player will add the media filename to the contents of the resume config file. .TP -.B \fB~/.config/mpv/lua\-settings/osc.conf\fP +.B \fB~/.config/mpv/script\-opts/osc.conf\fP This is loaded by the OSC script. See the \fI\%ON SCREEN CONTROLLER\fP docs for details. .sp diff --git a/pkg/mpv/patch/0001-Add-generated-ebml-sources.patch b/pkg/mpv/patch/0001-Add-generated-ebml-sources.patch @@ -1,4 +1,4 @@ -From e31e68e9600e2e2aff9191b3162ceaecc55f9910 Mon Sep 17 00:00:00 2001 +From 4769ec9ec67b9f0b9d2afa0d0a0d1775877414e1 Mon Sep 17 00:00:00 2001 From: Michael Forney <mforney@mforney.org> Date: Sat, 2 Jul 2016 17:32:27 -0700 Subject: [PATCH] Add generated ebml sources @@ -8,21 +8,23 @@ These require python to generate. $ python TOOLS/matroska.py --generate-header > demux/ebml_types.h $ python TOOLS/matroska.py --generate-definitions > demux/ebml_defs.c --- - demux/ebml_defs.c | 568 +++++++++++++++++++++++++++++++++++++++++++++++ - demux/ebml_types.h | 631 +++++++++++++++++++++++++++++++++++++++++++++++++++++ - 2 files changed, 1199 insertions(+) + demux/ebml_defs.c | 574 ++++++++++++++++++++++++++++++++++++++++ + demux/ebml_types.h | 637 +++++++++++++++++++++++++++++++++++++++++++++ + 2 files changed, 1211 insertions(+) create mode 100644 demux/ebml_defs.c create mode 100644 demux/ebml_types.h diff --git a/demux/ebml_defs.c b/demux/ebml_defs.c new file mode 100644 -index 0000000000..ca45e862d8 +index 0000000000..db4eb9c2a7 --- /dev/null +++ b/demux/ebml_defs.c -@@ -0,0 +1,568 @@ +@@ -0,0 +1,574 @@ +// Generated by TOOLS/matroska.py, do not edit manually + + ++E("TagDefault", tag_default, EBML_TYPE_UINT) ++ +E("TagString", tag_string, EBML_TYPE_STR) + +E("TagLanguage", tag_language, EBML_TYPE_STR) @@ -30,10 +32,11 @@ index 0000000000..ca45e862d8 +E("TagName", tag_name, EBML_TYPE_STR) + +#define N simple_tag -+E_S("SimpleTag", 3) ++E_S("SimpleTag", 4) +F(MATROSKA_ID_TAGNAME, tag_name, 0) +F(MATROSKA_ID_TAGLANGUAGE, tag_language, 0) +F(MATROSKA_ID_TAGSTRING, tag_string, 0) ++F(MATROSKA_ID_TAGDEFAULT, tag_default, 0) +}}; +#undef N + @@ -45,11 +48,14 @@ index 0000000000..ca45e862d8 + +E("TargetTrackUID", target_track_uid, EBML_TYPE_UINT) + ++E("TargetType", target_type, EBML_TYPE_STR) ++ +E("TargetTypeValue", target_type_value, EBML_TYPE_UINT) + +#define N targets -+E_S("Targets", 5) ++E_S("Targets", 6) +F(MATROSKA_ID_TARGETTYPEVALUE, target_type_value, 0) ++F(MATROSKA_ID_TARGETTYPE, target_type, 0) +F(MATROSKA_ID_TARGETTRACKUID, target_track_uid, 0) +F(MATROSKA_ID_TARGETEDITIONUID, target_edition_uid, 0) +F(MATROSKA_ID_TARGETCHAPTERUID, target_chapter_uid, 0) @@ -590,10 +596,10 @@ index 0000000000..ca45e862d8 +#undef N diff --git a/demux/ebml_types.h b/demux/ebml_types.h new file mode 100644 -index 0000000000..8622502d06 +index 0000000000..d32af2d6c1 --- /dev/null +++ b/demux/ebml_types.h -@@ -0,0 +1,631 @@ +@@ -0,0 +1,637 @@ +// Generated by TOOLS/matroska.py, do not edit manually + +#define EBML_ID_EBML 0x1a45dfa3 @@ -746,6 +752,7 @@ index 0000000000..8622502d06 +#define MATROSKA_ID_TAG 0x7373 +#define MATROSKA_ID_TARGETS 0x63c0 +#define MATROSKA_ID_TARGETTYPEVALUE 0x68ca ++#define MATROSKA_ID_TARGETTYPE 0x63ca +#define MATROSKA_ID_TARGETTRACKUID 0x63c5 +#define MATROSKA_ID_TARGETEDITIONUID 0x63c9 +#define MATROSKA_ID_TARGETCHAPTERUID 0x63c4 @@ -754,26 +761,31 @@ index 0000000000..8622502d06 +#define MATROSKA_ID_TAGNAME 0x45a3 +#define MATROSKA_ID_TAGLANGUAGE 0x447a +#define MATROSKA_ID_TAGSTRING 0x4487 ++#define MATROSKA_ID_TAGDEFAULT 0x4484 + + +struct ebml_simple_tag { -+ char * tag_name; -+ char * tag_language; -+ char * tag_string; ++ char * tag_name; ++ char * tag_language; ++ char * tag_string; ++ uint64_t tag_default; + + int n_tag_name; + int n_tag_language; + int n_tag_string; ++ int n_tag_default; +}; + +struct ebml_targets { + uint64_t target_type_value; ++ char * target_type; + uint64_t target_track_uid; + uint64_t target_edition_uid; + uint64_t target_chapter_uid; + uint64_t target_attachment_uid; + + int n_target_type_value; ++ int n_target_type; + int n_target_track_uid; + int n_target_edition_uid; + int n_target_chapter_uid; @@ -1226,5 +1238,5 @@ index 0000000000..8622502d06 + +#define MAX_EBML_SUBELEMENTS 23 -- -2.14.1 +2.18.0 diff --git a/pkg/mpv/rev b/pkg/mpv/rev @@ -1 +1 @@ -14 +15 diff --git a/pkg/mpv/sources.txt b/pkg/mpv/sources.txt @@ -1,46 +1,28 @@ -osdep/main-fn-cocoa.c cocoa -osdep/main-fn-unix.c posix -osdep/main-fn-win.c win32-desktop -osdep/terminal-unix.c posix -osdep/terminal-win.c win32-desktop -osdep/timer-win2.c os-win32 -osdep/timer-darwin.c os-darwin -osdep/timer-linux.c posix -input/ipc-unix.c posix -input/ipc-win.c win32-desktop -osdep/subprocess-posix.c posix-spawn -osdep/subprocess-win.c win32-desktop -audio/aconverter.c -audio/audio.c libaf +audio/aframe.c audio/audio_buffer.c audio/chmap.c audio/chmap_sel.c -audio/fmt-conversion.c -audio/format.c -audio/aframe.c audio/decode/ad_lavc.c audio/decode/ad_spdif.c -audio/decode/dec_audio.c -audio/filter/af.c libaf -audio/filter/af_format.c libaf -audio/filter/af_lavcac3enc.c libaf -audio/filter/af_lavfi.c libaf -audio/filter/af_lavrresample.c libaf +audio/filter/af_format.c +audio/filter/af_lavcac3enc.c +audio/filter/af_lavrresample.c audio/filter/af_rubberband.c rubberband -audio/filter/af_scaletempo.c libaf -audio/filter/tools.c libaf +audio/filter/af_scaletempo.c +audio/fmt-conversion.c +audio/format.c audio/out/ao.c audio/out/ao_alsa.c alsa audio/out/ao_audiounit.m audiounit -audio/out/ao_coreaudio_chmap.c audiounit -audio/out/ao_coreaudio_utils.c audiounit audio/out/ao_coreaudio.c coreaudio +audio/out/ao_coreaudio_chmap.c audiounit audio/out/ao_coreaudio_chmap.c coreaudio audio/out/ao_coreaudio_exclusive.c coreaudio audio/out/ao_coreaudio_properties.c coreaudio +audio/out/ao_coreaudio_utils.c audiounit audio/out/ao_coreaudio_utils.c coreaudio audio/out/ao_jack.c jack -audio/out/ao_lavc.c encoding +audio/out/ao_lavc.c audio/out/ao_null.c audio/out/ao_openal.c openal audio/out/ao_opensles.c opensles @@ -48,23 +30,22 @@ audio/out/ao_oss.c oss-audio audio/out/ao_pcm.c audio/out/ao_pulse.c pulse audio/out/ao_rsound.c rsound -audio/out/ao_sdl.c sdl1 audio/out/ao_sdl.c sdl2 audio/out/ao_sndio.c sndio audio/out/ao_wasapi.c wasapi -audio/out/ao_wasapi_utils.c wasapi audio/out/ao_wasapi_changenotify.c wasapi +audio/out/ao_wasapi_utils.c wasapi audio/out/pull.c audio/out/push.c common/av_common.c common/av_log.c common/codecs.c -common/encode_lavc.c encoding common/common.c -common/tags.c +common/encode_lavc.c common/msg.c common/playlist.c common/recorder.c +common/tags.c common/version.c demux/codec_tags.c demux/cue.c @@ -79,15 +60,27 @@ demux/demux_mkv.c demux/demux_mkv_timeline.c demux/demux_null.c demux/demux_playlist.c -demux/demux_raw.c demux/demux_rar.c +demux/demux_raw.c demux/demux_timeline.c demux/demux_tv.c tv demux/ebml.c demux/packet.c demux/timeline.c -input/cmd_list.c -input/cmd_parse.c +filters/f_autoconvert.c +filters/f_auto_filters.c +filters/f_decoder_wrapper.c +filters/f_demux_in.c +filters/f_hwtransfer.c +filters/f_lavfi.c +filters/f_output_chain.c +filters/f_swresample.c +filters/f_swscale.c +filters/f_utils.c +filters/filter.c +filters/frame.c +filters/user_filters.c +input/cmd.c input/event.c input/input.c input/ipc.c @@ -98,8 +91,8 @@ misc/charset_conv.c misc/dispatch.c misc/json.c misc/node.c -misc/ring.c misc/rendezvous.c +misc/ring.c misc/thread_pool.c options/m_config.c options/m_option.c @@ -113,12 +106,11 @@ player/client.c player/command.c player/configfiles.c player/external_files.c +player/javascript.c javascript player/loadfile.c +player/lua.c lua player/main.c player/misc.c -player/lavfi.c -player/lua.c lua -player/javascript.c javascript player/osd.c player/playloop.c player/screenshot.c @@ -138,6 +130,7 @@ stream/rar.c stream/stream.c stream/stream_avdevice.c stream/stream_bluray.c libbluray +stream/stream_cb.c stream/stream_cdda.c cdda stream/stream_dvb.c dvbin stream/stream_dvd.c dvdread-common @@ -145,7 +138,6 @@ stream/stream_dvd_common.c dvdread-common stream/stream_dvdnav.c dvdnav stream/stream_edl.c stream/stream_file.c -stream/stream_cb.c stream/stream_lavf.c stream/stream_libarchive.c libarchive stream/stream_memory.c @@ -160,6 +152,7 @@ stream/tvi_v4l2.c tv-v4l2 sub/ass_mp.c libass sub/dec_sub.c sub/draw_bmp.c +sub/filter_sdh.c sub/img_convert.c sub/lavc_conv.c sub/osd.c @@ -167,146 +160,144 @@ sub/osd_dummy.c dummy-osd sub/osd_libass.c libass-osd sub/sd_ass.c libass sub/sd_lavc.c -sub/filter_sdh.c video/csputils.c video/d3d.c d3d-hwaccel -video/fmt-conversion.c -video/image_loader.c -video/image_writer.c -video/img_format.c -video/hwdec.c -video/mp_image.c -video/mp_image_pool.c -video/sws_utils.c -video/vaapi.c vaapi -video/vdpau.c vdpau -video/vdpau_mixer.c vdpau -video/decode/dec_video.c video/decode/vd_lavc.c video/filter/refqueue.c -video/filter/vf.c -video/filter/vf_convert.c video/filter/vf_d3d11vpp.c d3d-hwaccel video/filter/vf_format.c -video/filter/vf_lavfi.c video/filter/vf_sub.c video/filter/vf_vapoursynth.c vapoursynth-core video/filter/vf_vavpp.c vaapi video/filter/vf_vdpaupp.c vdpau +video/fmt-conversion.c +video/hwdec.c +video/image_loader.c +video/image_writer.c +video/img_format.c +video/mp_image.c +video/mp_image_pool.c video/out/aspect.c video/out/bitmap_packer.c -video/out/cocoa/video_view.m cocoa video/out/cocoa/events_view.m cocoa +video/out/cocoa/video_view.m cocoa video/out/cocoa/window.m cocoa video/out/cocoa_common.m cocoa -video/out/dither.c -video/out/filter_kernels.c video/out/d3d11/context.c d3d11 video/out/d3d11/hwdec_d3d11va.c d3d11 && d3d-hwaccel +video/out/d3d11/hwdec_dxva2dxgi.c d3d11 && d3d9-hwaccel video/out/d3d11/ra_d3d11.c d3d11 -video/out/opengl/angle_dynamic.c egl-angle +video/out/dither.c +video/out/dr_helper.c +video/out/drm_atomic.c drm +video/out/drm_common.c drm +video/out/drm_prime.c drm && drmprime +video/out/filter_kernels.c video/out/gpu/context.c video/out/gpu/d3d11_helpers.c d3d11 || egl-angle-win32 video/out/gpu/hwdec.c video/out/gpu/lcms.c +video/out/gpu/libmpv_gpu.c video/out/gpu/osd.c video/out/gpu/ra.c +video/out/gpu/shader_cache.c video/out/gpu/spirv.c video/out/gpu/spirv_shaderc.c shaderc -video/out/gpu/shader_cache.c video/out/gpu/user_shaders.c video/out/gpu/utils.c video/out/gpu/video.c video/out/gpu/video_shaders.c +video/out/opengl/angle_dynamic.c egl-angle video/out/opengl/common.c gl -video/out/opengl/formats.c gl -video/out/opengl/utils.c gl -video/out/opengl/ra_gl.c gl video/out/opengl/context.c gl +video/out/opengl/context_android.c android video/out/opengl/context_angle.c egl-angle-win32 video/out/opengl/context_cocoa.c gl-cocoa video/out/opengl/context_drm_egl.c egl-drm video/out/opengl/context_dxinterop.c gl-dxinterop +video/out/opengl/context_glx.c gl-x11 video/out/opengl/context_mali_fbdev.c mali-fbdev -video/out/opengl/context_android.c android video/out/opengl/context_rpi.c rpi video/out/opengl/context_vdpau.c vdpau-gl-x11 video/out/opengl/context_wayland.c gl-wayland video/out/opengl/context_win.c gl-win32 -video/out/opengl/context_glx.c gl-x11 video/out/opengl/context_x11egl.c egl-x11 -video/out/opengl/cuda_dynamic.c cuda-hwaccel video/out/opengl/egl_helpers.c egl-helpers +video/out/opengl/formats.c gl video/out/opengl/hwdec_cuda.c cuda-hwaccel -video/out/opengl/hwdec_d3d11egl.c d3d-hwaccel -video/out/opengl/hwdec_d3d11eglrgb.c d3d-hwaccel +video/out/opengl/hwdec_d3d11egl.c d3d-hwaccel && egl-angle +video/out/opengl/hwdec_d3d11eglrgb.c d3d-hwaccel && egl-angle +video/out/opengl/hwdec_drmprime_drm.c drmprime && drm +video/out/opengl/hwdec_dxva2egl.c d3d9-hwaccel && egl-angle video/out/opengl/hwdec_dxva2gldx.c gl-dxinterop-d3d9 -video/out/opengl/hwdec_dxva2egl.c d3d9-hwaccel -video/out/opengl/hwdec_osx.c videotoolbox-gl video/out/opengl/hwdec_ios.m ios-gl -video/out/opengl/hwdec_drmprime_drm.c drmprime && drm +video/out/opengl/hwdec_osx.c videotoolbox-gl video/out/opengl/hwdec_rpi.c rpi video/out/opengl/hwdec_vaegl.c vaapi-egl video/out/opengl/hwdec_vdpau.c vdpau-gl-x11 +video/out/opengl/libmpv_gl.c gl +video/out/opengl/ra_gl.c gl +video/out/opengl/utils.c gl video/out/vo.c -video/out/vo_mediacodec_embed.c android video/out/vo_caca.c caca -video/out/vo_drm.c drm video/out/vo_direct3d.c direct3d +video/out/vo_drm.c drm +video/out/vo_gpu.c video/out/vo_image.c -video/out/vo_lavc.c encoding -video/out/vo_rpi.c rpi +video/out/vo_lavc.c +video/out/vo_libmpv.c +video/out/vo_mediacodec_embed.c android video/out/vo_null.c -video/out/vo_gpu.c -video/out/vo_opengl_cb.c gl +video/out/vo_rpi.c rpi video/out/vo_sdl.c sdl2 video/out/vo_tct.c video/out/vo_vaapi.c vaapi-x11 && gpl video/out/vo_vdpau.c vdpau video/out/vo_x11.c x11 video/out/vo_xv.c xv -video/out/w32_common.c win32-desktop -video/out/win32/displayconfig.c win32-desktop -video/out/win32/droptarget.c win32-desktop -video/out/vulkan/utils.c vulkan -video/out/vulkan/malloc.c vulkan -video/out/vulkan/formats.c vulkan -video/out/vulkan/ra_vk.c vulkan video/out/vulkan/context.c vulkan -video/out/vulkan/context_xlib.c vulkan && x11 video/out/vulkan/context_wayland.c vulkan && wayland video/out/vulkan/context_win.c vulkan && win32-desktop +video/out/vulkan/context_xlib.c vulkan && x11 +video/out/vulkan/formats.c vulkan +video/out/vulkan/malloc.c vulkan +video/out/vulkan/ra_vk.c vulkan video/out/vulkan/spirv_nvidia.c vulkan -video/out/wayland_common.c wayland -$builddir/pkg/wayland-protocols/xdg-shell-unstable-v6-protocol.c.o wayland +video/out/vulkan/utils.c vulkan +video/out/w32_common.c win32-desktop $builddir/pkg/wayland-protocols/idle-inhibit-v1-protocol.c.o wayland video/out/wayland/srv-decor.c.o wayland +$builddir/pkg/wayland-protocols/xdg-shell-protocol.c.o wayland +video/out/wayland_common.c wayland +video/out/win32/displayconfig.c win32-desktop +video/out/win32/droptarget.c win32-desktop video/out/win_state.c video/out/x11_common.c x11 -video/out/drm_atomic.c drm -video/out/drm_common.c drm -video/out/drm_prime.c drm && drmprime +video/sws_utils.c +video/vaapi.c vaapi +video/vdpau.c vdpau +video/vdpau_mixer.c vdpau osdep/io.c -osdep/timer.c osdep/threads.c +osdep/timer.c osdep/polldev.c posix +osdep/android/posix-spawn.c android +osdep/android/strnlen.c android osdep/ar/HIDRemote.m apple-remote +osdep/glob-win.c glob-win32 osdep/macosx_application.m cocoa osdep/macosx_events.m cocoa osdep/macosx_menubar.m cocoa osdep/macosx_touchbar.m macos-touchbar -osdep/semaphore_osx.c -osdep/subprocess.c +osdep/mpv.rc win32-executable osdep/path-macosx.m cocoa osdep/path-unix.c -osdep/path-win.c win32-desktop osdep/path-uwp.c uwp -osdep/glob-win.c glob-win32 -osdep/w32_keyboard.c os-win32 +osdep/path-win.c win32-desktop +osdep/semaphore_osx.c +osdep/subprocess.c osdep/w32_keyboard.c os-cygwin -osdep/windows_utils.c os-win32 -osdep/windows_utils.c os-cygwin -osdep/mpv.rc win32-executable +osdep/w32_keyboard.c os-win32 osdep/win32/pthread.c win32-internal-pthreads -osdep/android/posix-spawn.c android -osdep/android/strnlen.c android +osdep/windows_utils.c os-cygwin +osdep/windows_utils.c os-win32