From crux at crux.nu Sun Dec 1 00:50:52 2019 From: crux at crux.nu (crux at crux.nu) Date: Sun, 1 Dec 2019 00:50:52 +0000 (UTC) Subject: [crux-commits] ports/opt (3.5): [notify] glslang: fix relative includes, this affects shaderc building Message-ID: <20191201005052.89ED01803DC@crux.nu> commit 39cc5be2112fde70784e5704150c2d6b682ab370 Author: Danny Rawlins Date: Sun Dec 1 11:50:44 2019 +1100 [notify] glslang: fix relative includes, this affects shaderc building diff --git a/glslang/.signature b/glslang/.signature index 769456c21..4b5f9b11d 100644 --- a/glslang/.signature +++ b/glslang/.signature @@ -1,8 +1,9 @@ untrusted comment: verify with /etc/ports/opt.pub -RWSE3ohX2g5d/QLlhAuukp7tLTpJ+I0EvN41ktsooVirif6a6+Xg7I76jyz0TclpB6FsxrjiV5/Lh8itd8Hv0CLylOm8jhK40gI= -SHA256 (Pkgfile) = 98a0bd7ba0420990cdc80178aa9d9b75545d64604ec82c5d534bda0aeb71c1a3 +RWSE3ohX2g5d/Wl4yOBeuZLcrkeqGse0s+C9tXDgSP5B2SGK8yCbXxgnumxicHhthITipqYJQ//WEfXz4MPIisIXoKxnbaKl0QM= +SHA256 (Pkgfile) = d874f9a7bf9103dace28c86de50040eebdab965b888222b1975224ba8ccf419c SHA256 (.footprint) = 1c4f2f5e13c17a3df141b874e8ded6a7ec4c3aed19413ccd65adb87d7e5dc250 SHA256 (glslang-7.13.3496.tar.gz) = 170d1538a670af4cae300e875d7cda9744b1acee1ab7252ecf7c4004186bb922 SHA256 (glslang-default-resource-limits_staticlib.patch) = 1aa1538d9ef5f57153530df8c0f37d471c119e14c6d4ed1efe1bfec80d6b1b83 SHA256 (glslang-lib-install.patch) = 0eacb3ab34de86f324384b5723ebb8854c213604ad5ac7859368562fdb2fe9bc SHA256 (0001-pkg-config-compatibility.patch) = 735e14abb5a6fd6acf9315ed173c901f67785de7862f5d0d491ef2016d2b6f58 +SHA256 (glslang-7.12.3353_pre20191027-fix-relative-includes.patch) = 8af4205a290890d6b30718a947800cf72082c0008193acd77f50123fe9a2c89b diff --git a/glslang/Pkgfile b/glslang/Pkgfile index 85937ec63..393867aa8 100644 --- a/glslang/Pkgfile +++ b/glslang/Pkgfile @@ -5,17 +5,19 @@ name=glslang version=7.13.3496 -release=1 +release=2 source=(https://github.com/KhronosGroup/glslang/archive/$version/$name-$version.tar.gz glslang-default-resource-limits_staticlib.patch glslang-lib-install.patch - 0001-pkg-config-compatibility.patch) + 0001-pkg-config-compatibility.patch + glslang-7.12.3353_pre20191027-fix-relative-includes.patch) build() { cd $name-$version patch -p1 -i $SRC/glslang-default-resource-limits_staticlib.patch patch -p1 -i $SRC/glslang-lib-install.patch + patch -p1 -i $SRC/glslang-7.12.3353_pre20191027-fix-relative-includes.patch # Patch to build against system spirv-tools patch -p1 -i $SRC/0001-pkg-config-compatibility.patch diff --git a/glslang/glslang-7.12.3353_pre20191027-fix-relative-includes.patch b/glslang/glslang-7.12.3353_pre20191027-fix-relative-includes.patch new file mode 100644 index 000000000..4c44cfbbb --- /dev/null +++ b/glslang/glslang-7.12.3353_pre20191027-fix-relative-includes.patch @@ -0,0 +1,26 @@ +diff --git a/SPIRV/GlslangToSpv.h b/SPIRV/GlslangToSpv.h +index 86e1c23b..3907be43 100755 +--- a/SPIRV/GlslangToSpv.h ++++ b/SPIRV/GlslangToSpv.h +@@ -40,7 +40,7 @@ + #endif + + #include "SpvTools.h" +-#include "../glslang/Include/intermediate.h" ++#include "glslang/Include/intermediate.h" + + #include + #include +diff --git a/SPIRV/SpvTools.h b/SPIRV/SpvTools.h +index 7422d012..59c914da 100644 +--- a/SPIRV/SpvTools.h ++++ b/SPIRV/SpvTools.h +@@ -46,7 +46,7 @@ + #include + #endif + +-#include "../glslang/MachineIndependent/localintermediate.h" ++#include "glslang/MachineIndependent/localintermediate.h" + #include "Logger.h" + + namespace glslang { From crux at crux.nu Sun Dec 1 00:51:23 2019 From: crux at crux.nu (crux at crux.nu) Date: Sun, 1 Dec 2019 00:51:23 +0000 (UTC) Subject: [crux-commits] ports/contrib (3.5): [notify] shaderc: commit update to fix build with glslang, update glslang first! Else this will fail to compile Message-ID: <20191201005123.8C4401803E7@crux.nu> commit ba9c15c135d90ea5ff2d8cb2347a4a2d8b472d14 Author: Danny Rawlins Date: Sun Dec 1 11:47:45 2019 +1100 [notify] shaderc: commit update to fix build with glslang, update glslang first! Else this will fail to compile diff --git a/shaderc/.signature b/shaderc/.signature index f8e0aa89a..0d126005e 100644 --- a/shaderc/.signature +++ b/shaderc/.signature @@ -1,10 +1,12 @@ untrusted comment: verify with /etc/ports/contrib.pub -RWSagIOpLGJF3z1T9bLOok7yZ6isgKJrZ7kmIcLzMW8eals1I5qIJr8CE6rhbdolQPsJSscFjqjXTXqj+ViIZyml/vc1dJc3oAU= -SHA256 (Pkgfile) = 2c6ab00455a37e458ff4aee4004f39c035120645fbb84bab0c15ff0efb461cee +RWSagIOpLGJF38QSTUShLYu450xQjkaSGUtQ0hsfyc6Z1dJTwz0Iwp4cX2+UnwiPV3WdkPCat95DdNBOICMn1OIsRjnNkEtaVAc= +SHA256 (Pkgfile) = a717585cfe7ccca9e57dd1bbfefddc5a8dd62f09a06ecd65ca34f0fa8cf00212 SHA256 (.footprint) = a55f4db9a8f36310df010a88256abef6d13753f525ff212c4e7dcb390e6c1e66 -SHA256 (shaderc-v2019.0.tar.gz) = 1018cd02be52295272fdbffa056ee24b881be277c83d039ad554d91230f4e11b +SHA256 (shaderc-34c412f21f945f4ef6ed4453f8b5dc4bb9d739e4.tar.gz) = d0b9c52c545a07b94fa6dc5caaa6bba3df7e9edd73cb3ea9ab3519fbb267e7ca SHA256 (glslc.1) = 74007de30e2a7654e399d8c67c03d817eb847112e5d95e407d81754334d333c6 SHA256 (spvc.1) = a2f1c0158a73556080f2c7a8ae9027aa6c054da88ee3a5bb588bb9514021012d SHA256 (glslc-asciidoc.patch) = 685d97223af4fcd169921ee5f9b2c49a2df3d84b7bf7df7dd1f6def4361321a6 SHA256 (spvc-asciidoc.patch) = fd0c682186be4231fab5c83bf7625678f3b7905c980e3f7c9ae6cd5e212f9563 SHA256 (fix-glslang-link-order.patch) = 986a972d8b8fbfa750e92b750673108c4ae77af47acdc4dbb684358e2600a4ea +SHA256 (0001-Drop-third-party-code-in-CMakeLists.txt.patch) = 0ca9f01b8665d90cc2dc4a7eca23d58e2b4d41a46ed7735f205e2680a5e7d55c +SHA256 (shaderc-2019.0-fix-build-against-new-glslang.patch) = 7c7fe10c4e88e70a299b014cd52f2106cb07a6760feb5e12119cc576f022052e diff --git a/shaderc/0001-Drop-third-party-code-in-CMakeLists.txt.patch b/shaderc/0001-Drop-third-party-code-in-CMakeLists.txt.patch new file mode 100644 index 000000000..32ea680ab --- /dev/null +++ b/shaderc/0001-Drop-third-party-code-in-CMakeLists.txt.patch @@ -0,0 +1,24 @@ +diff -up shaderc-34c412f21f945f4ef6ed4453f8b5dc4bb9d739e4/CMakeLists.txt.unbundle shaderc-34c412f21f945f4ef6ed4453f8b5dc4bb9d739e4/CMakeLists.txt +--- shaderc-34c412f21f945f4ef6ed4453f8b5dc4bb9d739e4/CMakeLists.txt.unbundle 2019-06-10 00:30:41.954316517 +0200 ++++ shaderc-34c412f21f945f4ef6ed4453f8b5dc4bb9d739e4/CMakeLists.txt 2019-06-10 01:10:11.672758769 +0200 +@@ -70,7 +70,6 @@ endif(MSVC) + + # Configure subdirectories. + # We depend on these for later projects, so they should come first. +-add_subdirectory(third_party) + + if(SHADERC_ENABLE_SPVC) + add_subdirectory(libshaderc_spvc) +@@ -81,12 +80,6 @@ add_subdirectory(libshaderc) + add_subdirectory(glslc) + add_subdirectory(examples) + +-add_custom_target(build-version +- ${PYTHON_EXECUTABLE} +- ${CMAKE_CURRENT_SOURCE_DIR}/utils/update_build_version.py +- ${shaderc_SOURCE_DIR} ${spirv-tools_SOURCE_DIR} ${glslang_SOURCE_DIR} +- COMMENT "Update build-version.inc in the Shaderc build directory (if necessary).") +- + function(define_pkg_config_file NAME LIBS) + add_custom_target(${NAME}-pkg-config ALL + COMMAND ${CMAKE_COMMAND} diff --git a/shaderc/Pkgfile b/shaderc/Pkgfile index c407cbfcc..783e1296c 100644 --- a/shaderc/Pkgfile +++ b/shaderc/Pkgfile @@ -6,18 +6,26 @@ name=shaderc version=2019.0 -release=2 -source=(https://github.com/google/$name/archive/v$version/$name-v$version.tar.gz +commit=34c412f21f945f4ef6ed4453f8b5dc4bb9d739e4 +release=3 +source=( + https://github.com/KhronosGroup/shaderc/archive/$commit.tar.gz#/$name-$commit.tar.gz + #https://github.com/google/$name/archive/v$version/$name-v$version.tar.gz glslc.1 spvc.1 glslc-asciidoc.patch spvc-asciidoc.patch - fix-glslang-link-order.patch) + fix-glslang-link-order.patch + 0001-Drop-third-party-code-in-CMakeLists.txt.patch + shaderc-2019.0-fix-build-against-new-glslang.patch) build() { - cd $name-$version + cd $name-$commit + #cd $name-$version patch -d glslc -p0 -i $SRC/glslc-asciidoc.patch patch -d spvc -p0 -i $SRC/spvc-asciidoc.patch patch -p1 -i $SRC/fix-glslang-link-order.patch + patch -p1 -i $SRC/0001-Drop-third-party-code-in-CMakeLists.txt.patch + patch -p1 -i $SRC/shaderc-2019.0-fix-build-against-new-glslang.patch # de-vendor libs and disable git versioning sed '/examples/d;/third_party/d' -i CMakeLists.txt diff --git a/shaderc/shaderc-2019.0-fix-build-against-new-glslang.patch b/shaderc/shaderc-2019.0-fix-build-against-new-glslang.patch new file mode 100644 index 000000000..807540cf6 --- /dev/null +++ b/shaderc/shaderc-2019.0-fix-build-against-new-glslang.patch @@ -0,0 +1,54 @@ +diff --git a/libshaderc/src/shaderc.cc b/libshaderc/src/shaderc.cc +index 3c3c3de..b5fc6cb 100644 +--- a/libshaderc/src/shaderc.cc ++++ b/libshaderc/src/shaderc.cc +@@ -20,7 +20,7 @@ + #include + #include + +-#include "SPIRV/spirv.hpp" ++#include "glslang/SPIRV/spirv.hpp" + + #include "libshaderc_util/compiler.h" + #include "libshaderc_util/counting_includer.h" +diff --git a/libshaderc_util/src/compiler.cc b/libshaderc_util/src/compiler.cc +index ef7867f..acc172b 100644 +--- a/libshaderc_util/src/compiler.cc ++++ b/libshaderc_util/src/compiler.cc +@@ -26,7 +26,7 @@ + #include "libshaderc_util/string_piece.h" + #include "libshaderc_util/version_profile.h" + +-#include "SPIRV/GlslangToSpv.h" ++#include "glslang/SPIRV/GlslangToSpv.h" + + namespace { + using shaderc_util::string_piece; +@@ -291,17 +291,12 @@ std::tuple, size_t> Compiler::Compile( + bases[static_cast(UniformKind::StorageBuffer)]); + shader.setShiftUavBinding( + bases[static_cast(UniformKind::UnorderedAccessView)]); +- shader.setHlslIoMapping(hlsl_iomap_); + shader.setResourceSetBinding( + hlsl_explicit_bindings_[static_cast(used_shader_stage)]); + shader.setEnvClient(target_client_info.client, + target_client_info.client_version); + shader.setEnvTarget(target_client_info.target_language, + target_client_info.target_language_version); +- if (hlsl_functionality1_enabled_) { +- shader.setEnvTargetHlslFunctionality1(); +- } +- + const EShMessages rules = GetMessageRules(target_env_, source_language_, + hlsl_offsets_, + generate_debug_info_); +@@ -478,9 +473,6 @@ std::tuple Compiler::PreprocessShader( + } + shader.setEnvClient(target_client_info.client, + target_client_info.client_version); +- if (hlsl_functionality1_enabled_) { +- shader.setEnvTargetHlslFunctionality1(); +- } + + // The preprocessor might be sensitive to the target environment. + // So combine the existing rules with the just-give-me-preprocessor-output From crux at crux.nu Sun Dec 1 00:51:23 2019 From: crux at crux.nu (crux at crux.nu) Date: Sun, 1 Dec 2019 00:51:23 +0000 (UTC) Subject: [crux-commits] ports/contrib (3.5): [notify] mpv: new dependency libplacebo for mpv vulkan Message-ID: <20191201005123.90D4F1803EB@crux.nu> commit 024e86924d2a2e5bbec80db1b3d1af357f2c5440 Author: Danny Rawlins Date: Sun Dec 1 11:44:15 2019 +1100 [notify] mpv: new dependency libplacebo for mpv vulkan diff --git a/mpv/.signature b/mpv/.signature index a7132314f..a97261766 100644 --- a/mpv/.signature +++ b/mpv/.signature @@ -1,6 +1,6 @@ untrusted comment: verify with /etc/ports/contrib.pub -RWSagIOpLGJF34RIMU2JfQZ3v8IuoosCGwMEsU69DMyy5nigQ1v+W4azLJxQQaCGh27T2OQsIjuUEeWkUMHYSkz+YuzHILoamwg= -SHA256 (Pkgfile) = 65f20549d9b7fccc7181d98ee65dc3a01ed43697c4b983459cd2c5e4f8ac86bb +RWSagIOpLGJF3+jD1Ec1EpaiWa99Tuoo47gNJMKFvEtO/QAXIzOWdpCKw8Zqlbh/hwryhH7OPvtZ92/6Y3ZGJQEj2pIqqp9OJwQ= +SHA256 (Pkgfile) = 3cb8c54bfa8e8a52cf694291e994b6f3e134dbaf31674a0bc1443059e502d1fc SHA256 (.footprint) = eb826b2c48e4c78958a593e46f99dbeb1f0dd3faf963b8c16a5209ef4bc0939c SHA256 (mpv-v0.30.0.tar.gz) = 33a1bcb7e74ff17f070e754c15c52228cf44f2cefbfd8f34886ae81df214ca35 SHA256 (waf-2.0.9) = 2a8e0816f023995e557f79ea8940d322bec18f286917c8f9a6fa2dc3875dfa48 diff --git a/mpv/Pkgfile b/mpv/Pkgfile index 8b3591e08..5ba95d596 100644 --- a/mpv/Pkgfile +++ b/mpv/Pkgfile @@ -1,12 +1,12 @@ # Description: General Purpose video player based on MPlayer and mplayer2 # URL: https://mpv.io/ # Maintainer: Danny Rawlins, crux at romster dot me -# Depends on: docutils ffmpeg libass shaderc util-linux xorg-libxscrnsaver +# Depends on: docutils ffmpeg libass libplacebo util-linux xorg-libxscrnsaver # Optional: youtube-dl libquvi libdvdnav libbluray libcdio-paranoia libvdpau rubberband name=mpv version=0.30.0 -release=1 +release=2 source=(https://github.com/$name-player/$name/archive/v$version/$name-v$version.tar.gz https://waf.io/waf-2.0.9) From crux at crux.nu Sun Dec 1 00:51:23 2019 From: crux at crux.nu (crux at crux.nu) Date: Sun, 1 Dec 2019 00:51:23 +0000 (UTC) Subject: [crux-commits] ports/contrib (3.5): [notify] libplacebo: initial import for mpv vulkan Message-ID: <20191201005123.94BC91803EC@crux.nu> commit e8a77c94fd2868bc5df8e999f22490443e9ac1bf Author: Danny Rawlins Date: Sun Dec 1 11:43:16 2019 +1100 [notify] libplacebo: initial import for mpv vulkan diff --git a/libplacebo/.footprint b/libplacebo/.footprint new file mode 100644 index 000000000..f29dda268 --- /dev/null +++ b/libplacebo/.footprint @@ -0,0 +1,27 @@ +drwxr-xr-x root/root usr/ +drwxr-xr-x root/root usr/include/ +drwxr-xr-x root/root usr/include/libplacebo/ +-rw-r--r-- root/root usr/include/libplacebo/colorspace.h +-rw-r--r-- root/root usr/include/libplacebo/common.h +-rw-r--r-- root/root usr/include/libplacebo/config.h +-rw-r--r-- root/root usr/include/libplacebo/context.h +-rw-r--r-- root/root usr/include/libplacebo/dispatch.h +-rw-r--r-- root/root usr/include/libplacebo/dither.h +-rw-r--r-- root/root usr/include/libplacebo/dummy.h +-rw-r--r-- root/root usr/include/libplacebo/filters.h +-rw-r--r-- root/root usr/include/libplacebo/gpu.h +-rw-r--r-- root/root usr/include/libplacebo/renderer.h +-rw-r--r-- root/root usr/include/libplacebo/shaders.h +drwxr-xr-x root/root usr/include/libplacebo/shaders/ +-rw-r--r-- root/root usr/include/libplacebo/shaders/av1.h +-rw-r--r-- root/root usr/include/libplacebo/shaders/colorspace.h +-rw-r--r-- root/root usr/include/libplacebo/shaders/sampling.h +-rw-r--r-- root/root usr/include/libplacebo/swapchain.h +drwxr-xr-x root/root usr/include/libplacebo/utils/ +-rw-r--r-- root/root usr/include/libplacebo/utils/upload.h +-rw-r--r-- root/root usr/include/libplacebo/vulkan.h +drwxr-xr-x root/root usr/lib/ +lrwxrwxrwx root/root usr/lib/libplacebo.so -> libplacebo.so.21 +-rwxr-xr-x root/root usr/lib/libplacebo.so.21 +drwxr-xr-x root/root usr/lib/pkgconfig/ +-rw-r--r-- root/root usr/lib/pkgconfig/libplacebo.pc diff --git a/libplacebo/.signature b/libplacebo/.signature new file mode 100644 index 000000000..68b0c22e9 --- /dev/null +++ b/libplacebo/.signature @@ -0,0 +1,5 @@ +untrusted comment: verify with /etc/ports/contrib.pub +RWSagIOpLGJF36ofpIPMNTCI8l6PWpYvb2Iwyfkg/P3XuJCrCTq/jF2k2sPy6QDnm/h7tS2D5UxX8MGLOnBSjDQ/yG8R3G/R9As= +SHA256 (Pkgfile) = 6bfd9d64e2cbab4ca81cbc28afe9e57b7b26e2bcf6b1a6447894741fff3e1231 +SHA256 (.footprint) = b37a2bd8a4a2b83241eb698b827d2b5c257d72e5e18842c94baf908e688445ad +SHA256 (libplacebo-v1.21.0.tar.gz) = 19e58f0a3c09f67680aa56263ef28ee1a1f458123872fce91b1fb7f4271b5496 diff --git a/libplacebo/Pkgfile b/libplacebo/Pkgfile new file mode 100644 index 000000000..87212421d --- /dev/null +++ b/libplacebo/Pkgfile @@ -0,0 +1,22 @@ +# Description: Reusable library for GPU-accelerated video/image rendering primitives +# URL: https://github.com/haasn/libplacebo +# Maintainer: Danny Rawlins, crux at romster dot me +# Depends on: lcms2 shaderc vulkan-loader + +name=libplacebo +version=1.21.0 +release=1 +source=(https://code.videolan.org/videolan/libplacebo/-/archive/v$version/$name-v$version.tar.gz) + +build() { + CXXFLAGS+=" -I/usr/include/glslang" \ + meson build $name-v$version \ + --prefix=/usr \ + -D vulkan=enabled \ + -D glslang=enabled \ + -D shaderc=enabled \ + -D lcms=enabled + + ninja -C build -j ${JOBS:-1} + DESTDIR=$PKG ninja -C build install +} From crux at crux.nu Sun Dec 1 01:39:11 2019 From: crux at crux.nu (crux at crux.nu) Date: Sun, 1 Dec 2019 01:39:11 +0000 (UTC) Subject: [crux-commits] ports/contrib (3.5): mpv: make docutils optional Message-ID: <20191201013911.94E491803FA@crux.nu> commit 3d01a034860d60d58bcf1d7a5489701dca8276b3 Author: Danny Rawlins Date: Sun Dec 1 12:39:02 2019 +1100 mpv: make docutils optional diff --git a/mpv/.signature b/mpv/.signature index a97261766..2030a79fb 100644 --- a/mpv/.signature +++ b/mpv/.signature @@ -1,6 +1,7 @@ untrusted comment: verify with /etc/ports/contrib.pub -RWSagIOpLGJF3+jD1Ec1EpaiWa99Tuoo47gNJMKFvEtO/QAXIzOWdpCKw8Zqlbh/hwryhH7OPvtZ92/6Y3ZGJQEj2pIqqp9OJwQ= -SHA256 (Pkgfile) = 3cb8c54bfa8e8a52cf694291e994b6f3e134dbaf31674a0bc1443059e502d1fc +RWSagIOpLGJF32sQuXRp4wgz/vwI5E/PTpukSBmJHMluyhl2x3Ec6NxHL3EfR8pKvTOLuRgQT62N+qupvphTYxetMJ8u3Yez5Ac= +SHA256 (Pkgfile) = 5af956bbf47cee573ec7f8d7fd4abb62399e73dd9ddc920263edfb95c3c2e017 SHA256 (.footprint) = eb826b2c48e4c78958a593e46f99dbeb1f0dd3faf963b8c16a5209ef4bc0939c SHA256 (mpv-v0.30.0.tar.gz) = 33a1bcb7e74ff17f070e754c15c52228cf44f2cefbfd8f34886ae81df214ca35 SHA256 (waf-2.0.9) = 2a8e0816f023995e557f79ea8940d322bec18f286917c8f9a6fa2dc3875dfa48 +SHA256 (mpv.1) = e2c8c722447909b9ab08725a0dc479330caaab51f5058912bebbef9688ef241d diff --git a/mpv/Pkgfile b/mpv/Pkgfile index 5ba95d596..562e275c2 100644 --- a/mpv/Pkgfile +++ b/mpv/Pkgfile @@ -1,14 +1,15 @@ # Description: General Purpose video player based on MPlayer and mplayer2 # URL: https://mpv.io/ # Maintainer: Danny Rawlins, crux at romster dot me -# Depends on: docutils ffmpeg libass libplacebo util-linux xorg-libxscrnsaver -# Optional: youtube-dl libquvi libdvdnav libbluray libcdio-paranoia libvdpau rubberband +# Depends on: ffmpeg libass libplacebo util-linux xorg-libxscrnsaver +# Optional: docutils youtube-dl libquvi libdvdnav libbluray libcdio-paranoia libvdpau rubberband name=mpv version=0.30.0 release=2 source=(https://github.com/$name-player/$name/archive/v$version/$name-v$version.tar.gz - https://waf.io/waf-2.0.9) + https://waf.io/waf-2.0.9 + mpv.1) build() { cd $name-$version @@ -27,4 +28,6 @@ build() { ./waf build ./waf install --destdir=$PKG rm -r $PKG/usr/share/doc + + [ -e '/usr/bin/rst2man.py' ] || install -D -m 0644 -t $PKG/usr/share/man/man1 $SRC/mpv.1 } diff --git a/mpv/mpv.1 b/mpv/mpv.1 new file mode 100644 index 000000000..d41da81fe --- /dev/null +++ b/mpv/mpv.1 @@ -0,0 +1,16444 @@ +.\" Man page generated from reStructuredText. +. +.TH MPV 1 "" "" "multimedia" +.SH NAME +mpv \- a media player +. +.nr rst2man-indent-level 0 +. +.de1 rstReportMargin +\\$1 \\n[an-margin] +level \\n[rst2man-indent-level] +level margin: \\n[rst2man-indent\\n[rst2man-indent-level]] +- +\\n[rst2man-indent0] +\\n[rst2man-indent1] +\\n[rst2man-indent2] +.. +.de1 INDENT +.\" .rstReportMargin pre: +. RS \\$1 +. nr rst2man-indent\\n[rst2man-indent-level] \\n[an-margin] +. nr rst2man-indent-level +1 +.\" .rstReportMargin post: +.. +.de UNINDENT +. RE +.\" indent \\n[an-margin] +.\" old: \\n[rst2man-indent\\n[rst2man-indent-level]] +.nr rst2man-indent-level -1 +.\" new: \\n[rst2man-indent\\n[rst2man-indent-level]] +.in \\n[rst2man-indent\\n[rst2man-indent-level]]u +.. +.SH SYNOPSIS +.nf +\fBmpv\fP [options] [file|URL|PLAYLIST|\-] +\fBmpv\fP [options] files +.fi +.sp +.SH DESCRIPTION +.sp +\fBmpv\fP is a media player based on MPlayer and mplayer2. It supports a wide variety of video +file formats, audio and video codecs, and subtitle types. Special input URL +types are available to read input from a variety of sources other than disk +files. Depending on platform, a variety of different video and audio output +methods are supported. +.sp +Usage examples to get you started quickly can be found at the end of this man +page. +.SH INTERACTIVE CONTROL +.sp +mpv has a fully configurable, command\-driven control layer which allows you +to control mpv using keyboard, mouse, or remote control (there is no +LIRC support \- configure remotes as input devices instead). +.sp +See the \fB\-\-input\-\fP options for ways to customize it. +.sp +The following listings are not necessarily complete. See \fBetc/input.conf\fP for +a list of default bindings. User \fBinput.conf\fP files and Lua scripts can +define additional key bindings. +.SS Keyboard Control +.INDENT 0.0 +.TP +.B LEFT and RIGHT +Seek backward/forward 5 seconds. Shift+arrow does a 1 second exact seek +(see \fB\-\-hr\-seek\fP). +.TP +.B UP and DOWN +Seek forward/backward 1 minute. Shift+arrow does a 5 second exact seek (see +\fB\-\-hr\-seek\fP). +.TP +.B Ctrl+LEFT and Ctrl+RIGHT +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 +.B { and } +Halve/double current playback speed. +.TP +.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 +.B ENTER +Go forward in the playlist. +.TP +.B p / SPACE +Pause (pressing again unpauses). +.TP +.B \&. +Step forward. Pressing once will pause, every consecutive press will +play one frame and then go into pause mode again. +.UNINDENT +.INDENT 0.0 +.TP +.B , +Step backward. Pressing once will pause, every consecutive press will +play one frame in reverse and then go into pause mode again. +.TP +.B q +Stop playing and quit. +.TP +.B Q +Like \fBq\fP, but store the current playback position. Playing the same file +later will resume at the old playback position if possible. +.TP +.B / and * +Decrease/increase volume. +.TP +.B 9 and 0 +Decrease/increase volume. +.TP +.B m +Mute sound. +.TP +.B _ +Cycle through the available video tracks. +.TP +.B # +Cycle through the available audio tracks. +.TP +.B f +Toggle fullscreen (see also \fB\-\-fs\fP). +.TP +.B ESC +Exit fullscreen mode. +.TP +.B T +Toggle stay\-on\-top (see also \fB\-\-ontop\fP). +.TP +.B w and 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. +.TP +.B O +Toggle OSD states between normal and playback time/duration. +.TP +.B v +Toggle subtitle visibility. +.TP +.B j and J +Cycle through the available subtitles. +.TP +.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. +.TP +.B L +Toggle infinite looping. +.TP +.B Ctrl + and Ctrl \- +Adjust audio delay (A/V sync) by +/\- 0.1 seconds. +.TP +.B u +Switch between applying no style overrides to SSA/ASS subtitles, and +overriding them almost completely with the normal subtitle style. See +\fB\-\-sub\-ass\-override\fP for more info. +.TP +.B V +Toggle subtitle VSFilter aspect compatibility mode. See +\fB\-\-sub\-ass\-vsfilter\-aspect\-compat\fP for more info. +.TP +.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. +.TP +.B S +Take a screenshot, without subtitles. (Whether this works depends on VO +driver support.) +.TP +.B Ctrl s +Take a screenshot, as the window shows it (with subtitles, OSD, and scaled +video). +.TP +.B PGUP and PGDWN +Seek to the beginning of the previous/next chapter. In most cases, +"previous" will actually go to the beginning of the current chapter; see +\fB\-\-chapter\-seek\-threshold\fP\&. +.TP +.B Shift+PGUP and Shift+PGDWN +Seek backward or forward by 10 minutes. (This used to be mapped to +PGUP/PGDWN without Shift.) +.TP +.B d +Activate/deactivate deinterlacer. +.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 F8 +Show the playlist and the current position in it (useful only if a UI window +is used, broken on the terminal). +.TP +.B F9 +Show the list of audio and subtitle streams (useful only if a UI window is +used, broken on the terminal). +.TP +.B i and I +Show/toggle an overlay displaying statistics about the currently playing +file such as codec, framerate, number of dropped frames and so on. See +\fI\%STATS\fP for more information. +.UNINDENT +.sp +(The following keys are valid only when using a video output that supports the +corresponding adjustment.) +.INDENT 0.0 +.TP +.B 1 and 2 +Adjust contrast. +.TP +.B 3 and 4 +Adjust brightness. +.TP +.B 5 and 6 +Adjust gamma. +.TP +.B 7 and 8 +Adjust saturation. +.TP +.B Alt+0 (and command+0 on OSX) +Resize video window to half its original size. +.TP +.B Alt+1 (and command+1 on OSX) +Resize video window to its original size. +.TP +.B Alt+2 (and command+2 on OSX) +Resize video window to double its original size. +.TP +.B command + f (OSX only) +Toggle fullscreen (see also \fB\-\-fs\fP). +.UNINDENT +.sp +(The following keys are valid if you have a keyboard with multimedia keys.) +.INDENT 0.0 +.TP +.B PAUSE +Pause. +.TP +.B STOP +Stop playing and quit. +.TP +.B PREVIOUS and NEXT +Seek backward/forward 1 minute. +.UNINDENT +.sp +If you miss some older key bindings, look at \fBetc/restore\-old\-bindings.conf\fP +in the mpv git repository. +.SS Mouse Control +.INDENT 0.0 +.TP +.B button 3 and button 4 +Seek backward/forward 1 minute. +.TP +.B button 5 and button 6 +Decrease/increase volume. +.UNINDENT +.SH USAGE +.sp +Command line arguments starting with \fB\-\fP are interpreted as options, +everything else as filenames or URLs. All options except \fIflag\fP options (or +choice options which include \fByes\fP) require a parameter in the form +\fB\-\-option=value\fP\&. +.sp +One exception is the lone \fB\-\fP (without anything else), which means media data +will be read from stdin. Also, \fB\-\-\fP (without anything else) will make the +player interpret all following arguments as filenames, even if they start with +\fB\-\fP\&. (To play a file named \fB\-\fP, you need to use \fB\&./\-\fP\&.) +.sp +Every \fIflag\fP option has a \fIno\-flag\fP counterpart, e.g. the opposite of the +\fB\-\-fs\fP option is \fB\-\-no\-fs\fP\&. \fB\-\-fs=yes\fP is same as \fB\-\-fs\fP, \fB\-\-fs=no\fP +is the same as \fB\-\-no\-fs\fP\&. +.sp +If an option is marked as \fI(XXX only)\fP, it will only work in combination with +the \fIXXX\fP option or if \fIXXX\fP is compiled in. +.SS Legacy option syntax +.sp +The \fB\-\-option=value\fP syntax is not strictly enforced, and the alternative +legacy syntax \fB\-option value\fP and \fB\-\-option value\fP will also work. This is +mostly for compatibility with MPlayer. Using these should be avoided. Their +semantics can change any time in the future. +.sp +For example, the alternative syntax will consider an argument following the +option a filename. \fBmpv \-fs no\fP will attempt to play a file named \fBno\fP, +because \fB\-\-fs\fP is a flag option that requires no parameter. If an option +changes and its parameter becomes optional, then a command line using the +alternative syntax will break. +.sp +Currently, the parser makes no difference whether an option starts with \fB\-\-\fP +or a single \fB\-\fP\&. This might also change in the future, and \fB\-\-option value\fP +might always interpret \fBvalue\fP as filename in order to reduce ambiguities. +.SS Escaping spaces and other special characters +.sp +Keep in mind that the shell will partially parse and mangle the arguments you +pass to mpv. For example, you might need to quote or escape options and +filenames: +.INDENT 0.0 +.INDENT 3.5 +\fBmpv "filename with spaces.mkv" \-\-title="window title"\fP +.UNINDENT +.UNINDENT +.sp +It gets more complicated if the suboption parser is involved. The suboption +parser puts several options into a single string, and passes them to a +component at once, instead of using multiple options on the level of the +command line. +.sp +The suboption parser can quote strings with \fB"\fP and \fB[...]\fP\&. +Additionally, there is a special form of quoting with \fB%n%\fP described below. +.sp +For example, assume the hypothetical \fBfoo\fP filter can take multiple options: +.INDENT 0.0 +.INDENT 3.5 +\fBmpv test.mkv \-\-vf=foo:option1=value1:option2:option3=value3,bar\fP +.UNINDENT +.UNINDENT +.sp +This passes \fBoption1\fP and \fBoption3\fP to the \fBfoo\fP filter, with \fBoption2\fP +as flag (implicitly \fBoption2=yes\fP), and adds a \fBbar\fP filter after that. If +an option contains spaces or characters like \fB,\fP or \fB:\fP, you need to quote +them: +.INDENT 0.0 +.INDENT 3.5 +\fBmpv \(aq\-\-vf=foo:option1="option value with spaces",bar\(aq\fP +.UNINDENT +.UNINDENT +.sp +Shells may actually strip some quotes from the string passed to the commandline, +so the example quotes the string twice, ensuring that mpv receives the \fB"\fP +quotes. +.sp +The \fB[...]\fP form of quotes wraps everything between \fB[\fP and \fB]\fP\&. It\(aqs +useful with shells that don\(aqt interpret these characters in the middle of +an argument (like bash). These quotes are balanced (since mpv 0.9.0): the \fB[\fP +and \fB]\fP nest, and the quote terminates on the last \fB]\fP that has no matching +\fB[\fP within the string. (For example, \fB[a[b]c]\fP results in \fBa[b]c\fP\&.) +.sp +The fixed\-length quoting syntax is intended for use with external +scripts and programs. +.sp +It is started with \fB%\fP and has the following format: +.INDENT 0.0 +.INDENT 3.5 +.sp +.nf +.ft C +%n%string_of_length_n +.ft P +.fi +.UNINDENT +.UNINDENT +.INDENT 0.0 +.INDENT 3.5 +.IP "Examples" +.sp +\fBmpv \(aq\-\-vf=foo:option1=%11%quoted text\(aq test.avi\fP +.sp +Or in a script: +.sp +\fBmpv \-\-vf=foo:option1=%\(gaexpr length "$NAME"\(ga%"$NAME" test.avi\fP +.UNINDENT +.UNINDENT +.sp +Suboptions passed to the client API are also subject to escaping. Using +\fBmpv_set_option_string()\fP is exactly like passing \fB\-\-name=data\fP to the +command line (but without shell processing of the string). Some options +support passing values in a more structured way instead of flat strings, and +can avoid the suboption parsing mess. For example, \fB\-\-vf\fP supports +\fBMPV_FORMAT_NODE\fP, which lets you pass suboptions as a nested data structure +of maps and arrays. +.SS Paths +.sp +Some care must be taken when passing arbitrary paths and filenames to mpv. For +example, paths starting with \fB\-\fP will be interpreted as options. Likewise, +if a path contains the sequence \fB://\fP, the string before that might be +interpreted as protocol prefix, even though \fB://\fP can be part of a legal +UNIX path. To avoid problems with arbitrary paths, you should be sure that +absolute paths passed to mpv start with \fB/\fP, and prefix relative paths with +\fB\&./\fP\&. +.sp +Using the \fBfile://\fP pseudo\-protocol is discouraged, because it involves +strange URL unescaping rules. +.sp +The name \fB\-\fP itself is interpreted as stdin, and will cause mpv to disable +console controls. (Which makes it suitable for playing data piped to stdin.) +.sp +The special argument \fB\-\-\fP can be used to stop mpv from interpreting the +following arguments as options. +.sp +When using the client API, you should strictly avoid using \fBmpv_command_string\fP +for invoking the \fBloadfile\fP command, and instead prefer e.g. \fBmpv_command\fP +to avoid the need for filename escaping. +.sp +For paths passed to suboptions, the situation is further complicated by the +need to escape special characters. To work this around, the path can be +additionally wrapped in the fixed\-length syntax, e.g. \fB%n%string_of_length_n\fP +(see above). +.sp +Some mpv options interpret paths starting with \fB~\fP\&. Currently, the prefix +\fB~~/\fP expands to the mpv configuration directory (usually \fB~/.config/mpv/\fP). +\fB~/\fP expands to the user\(aqs home directory. (The trailing \fB/\fP is always +required.) There are the following paths as well: +.TS +center; +|l|l|. +_ +T{ +Name +T} T{ +Meaning +T} +_ +T{ +\fB~~home/\fP +T} T{ +same as \fB~~/\fP +T} +_ +T{ +\fB~~global/\fP +T} T{ +the global config path, if available (not on win32) +T} +_ +T{ +\fB~~osxbundle/\fP +T} T{ +the OSX bundle resource path (OSX only) +T} +_ +T{ +\fB~~desktop/\fP +T} T{ +the path to the desktop (win32, OSX) +T} +_ +.TE +.SS Per\-File Options +.sp +When playing multiple files, any option given on the command line usually +affects all files. Example: +.INDENT 0.0 +.INDENT 3.5 +.sp +.nf +.ft C +mpv \-\-a file1.mkv \-\-b file2.mkv \-\-c +.ft P +.fi +.UNINDENT +.UNINDENT +.TS +center; +|l|l|. +_ +T{ +File +T} T{ +Active options +T} +_ +T{ +file1.mkv +T} T{ +\fB\-\-a \-\-b \-\-c\fP +T} +_ +T{ +file2.mkv +T} T{ +\fB\-\-a \-\-b \-\-c\fP +T} +_ +.TE +.sp +(This is different from MPlayer and mplayer2.) +.sp +Also, if any option is changed at runtime (via input commands), they are not +reset when a new file is played. +.sp +Sometimes, it is useful to change options per\-file. This can be achieved by +adding the special per\-file markers \fB\-\-{\fP and \fB\-\-}\fP\&. (Note that you must +escape these on some shells.) Example: +.INDENT 0.0 +.INDENT 3.5 +.sp +.nf +.ft C +mpv \-\-a file1.mkv \-\-b \-\-\e{ \-\-c file2.mkv \-\-d file3.mkv \-\-e \-\-\e} file4.mkv \-\-f +.ft P +.fi +.UNINDENT +.UNINDENT +.TS +center; +|l|l|. +_ +T{ +File +T} T{ +Active options +T} +_ +T{ +file1.mkv +T} T{ +\fB\-\-a \-\-b \-\-f\fP +T} +_ +T{ +file2.mkv +T} T{ +\fB\-\-a \-\-b \-\-f \-\-c \-\-d \-\-e\fP +T} +_ +T{ +file3.mkv +T} T{ +\fB\-\-a \-\-b \-\-f \-\-c \-\-d \-\-e\fP +T} +_ +T{ +file4.mkv +T} T{ +\fB\-\-a \-\-b \-\-f\fP +T} +_ +.TE +.sp +Additionally, any file\-local option changed at runtime is reset when the current +file stops playing. If option \fB\-\-c\fP is changed during playback of +\fBfile2.mkv\fP, it is reset when advancing to \fBfile3.mkv\fP\&. This only affects +file\-local options. The option \fB\-\-a\fP is never reset here. +.SS List Options +.sp +Some options which store lists of option values can have action suffixes. For +example, you can set a \fB,\fP\-separated list of filters with \fB\-\-vf\fP, but the +option also allows you to append filters with \fB\-\-vf\-append\fP\&. +.sp +Options for filenames do not use \fB,\fP as separator, but \fB:\fP (Unix) or \fB;\fP +(Windows). +.TS +center; +|l|l|. +_ +T{ +Suffix +T} T{ +Meaning +T} +_ +T{ +\-add +T} T{ +Append 1 or more items (may become alias for \-append) +T} +_ +T{ +\-append +T} T{ +Append single item (avoids need for escaping) +T} +_ +T{ +\-clr +T} T{ +Clear the option +T} +_ +T{ +\-del +T} T{ +Delete an existing item by integer index +T} +_ +T{ +\-pre +T} T{ +Prepend 1 or more items +T} +_ +T{ +\-set +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 +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\-\-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 +title specifier is a number which selects between separate video +streams on the DVD. If no title is given (\fBdvd://\fP) then the longest +title is selected automatically by the library. This is usually what +you want. mpv does not support DVD menus. +.sp +DVDs which have been copied on to a hard drive or other mounted +filesystem (by e.g. the \fBdvdbackup\fP tool) are accommodated by +specifying the path to the local copy: \fB\-\-dvd\-device=PATH\fP\&. +Alternatively, running \fBmpv PATH\fP should auto\-detect a DVD directory +tree and play the longest title. +.sp +\fBNOTE:\fP +.INDENT 0.0 +.INDENT 3.5 +DVD subtitles +.sp +DVDs use image\-based subtitles. Image subtitles are implemented as +a bitmap video stream which can be superimposed over the main +movie. mpv\(aqs subtitle styling and positioning options and keyboard +shortcuts generally do not work with image\-based subtitles. +Exceptions include options like \fB\-\-stretch\-dvd\-subs\fP and +\fB\-\-stretch\-image\-subs\-to\-screen\fP\&. +.UNINDENT +.UNINDENT +.SH CONFIGURATION FILES +.SS Location and Syntax +.sp +You can put all of the options in configuration files which will be read every +time mpv is run. The system\-wide configuration file \(aqmpv.conf\(aq is in your +configuration directory (e.g. \fB/etc/mpv\fP or \fB/usr/local/etc/mpv\fP), the +user\-specific one is \fB~/.config/mpv/mpv.conf\fP\&. For details and platform +specifics (in particular Windows paths) see the \fI\%FILES\fP section. +.sp +User\-specific options override system\-wide options and options given on the +command line override either. The syntax of the configuration files is +\fBoption=value\fP\&. Everything after a \fI#\fP is considered a comment. Options +that work without values can be enabled by setting them to \fIyes\fP and disabled by +setting them to \fIno\fP\&. Even suboptions can be specified in this way. +.INDENT 0.0 +.INDENT 3.5 +.IP "Example configuration file" +.INDENT 0.0 +.INDENT 3.5 +.sp +.nf +.ft C +# Use GPU\-accelerated video output by default. +vo=gpu +# Use quotes for text that can contain spaces: +status\-msg="Time: ${time\-pos}" +.ft P +.fi +.UNINDENT +.UNINDENT +.UNINDENT +.UNINDENT +.SS Escaping spaces and special characters +.sp +This is done like with command line options. The shell is not involved here, +but option values still need to be quoted as a whole if it contains certain +characters like spaces. A config entry can be quoted with \fB"\fP, +as well as with the fixed\-length syntax (\fB%n%\fP) mentioned before. This is like +passing the exact contents of the quoted string as command line option. C\-style +escapes are currently _not_ interpreted on this level, although some options do +this manually. (This is a mess and should probably be changed at some point.) +.SS Putting Command Line Options into the Configuration File +.sp +Almost all command line options can be put into the configuration file. Here +is a small guide: +.TS +center; +|l|l|. +_ +T{ +Option +T} T{ +Configuration file entry +T} +_ +T{ +\fB\-\-flag\fP +T} T{ +\fBflag\fP +T} +_ +T{ +\fB\-opt val\fP +T} T{ +\fBopt=val\fP +T} +_ +T{ +\fB\-\-opt=val\fP +T} T{ +\fBopt=val\fP +T} +_ +T{ +\fB\-opt "has spaces"\fP +T} T{ +\fBopt="has spaces"\fP +T} +_ +.TE +.SS File\-specific Configuration Files +.sp +You can also write file\-specific configuration files. If you wish to have a +configuration file for a file called \(aqvideo.avi\(aq, create a file named +\(aqvideo.avi.conf\(aq with the file\-specific options in it and put it in +\fB~/.config/mpv/\fP\&. You can also put the configuration file in the same directory +as the file to be played. Both require you to set the \fB\-\-use\-filedir\-conf\fP +option (either on the command line or in your global config file). If a +file\-specific configuration file is found in the same directory, no +file\-specific configuration is loaded from \fB~/.config/mpv\fP\&. In addition, the +\fB\-\-use\-filedir\-conf\fP option enables directory\-specific configuration files. +For this, mpv first tries to load a mpv.conf from the same directory +as the file played and then tries to load any file\-specific configuration. +.SS Profiles +.sp +To ease working with different configurations, profiles can be defined in the +configuration files. A profile starts with its name in square brackets, +e.g. \fB[my\-profile]\fP\&. All following options will be part of the profile. A +description (shown by \fB\-\-profile=help\fP) can be defined with the +\fBprofile\-desc\fP option. To end the profile, start another one or use the +profile name \fBdefault\fP to continue with normal options. +.sp +You can list profiles with \fB\-\-profile=help\fP, and show the contents of a +profile with \fB\-\-show\-profile=\fP (replace \fB\fP with the profile +name). You can apply profiles on start with the \fB\-\-profile=\fP option, +or at runtime with the \fBapply\-profile \fP command. +.INDENT 0.0 +.INDENT 3.5 +.IP "Example mpv config file with profiles" +.INDENT 0.0 +.INDENT 3.5 +.sp +.nf +.ft C +# normal top\-level option +fullscreen=yes + +# a profile that can be enabled with \-\-profile=big\-cache +[big\-cache] +cache=yes +demuxer\-max\-bytes=123400KiB +demuxer\-readahead\-secs=20 + +[slow] +profile\-desc="some profile name" +# reference a builtin profile +profile=gpu\-hq + +[fast] +vo=vdpau + +# using a profile again extends it +[slow] +framedrop=no +# you can also include other profiles +profile=big\-cache +.ft P +.fi +.UNINDENT +.UNINDENT +.UNINDENT +.UNINDENT +.SS Auto profiles +.sp +Some profiles are loaded automatically. The following example demonstrates this: +.INDENT 0.0 +.INDENT 3.5 +.IP "Auto profile loading" +.INDENT 0.0 +.INDENT 3.5 +.sp +.nf +.ft C +[protocol.dvd] +profile\-desc="profile for dvd:// streams" +alang=en + +[extension.flv] +profile\-desc="profile for .flv files" +vf=flip +.ft P +.fi +.UNINDENT +.UNINDENT +.UNINDENT +.UNINDENT +.sp +The profile name follows the schema \fBtype.name\fP, where type can be +\fBprotocol\fP for the input/output protocol in use (see \fB\-\-list\-protocols\fP), +and \fBextension\fP for the extension of the path of the currently played file +(\fInot\fP the file format). +.sp +This feature is very limited, and there are no other auto profiles. +.SH TAKING SCREENSHOTS +.sp +Screenshots of the currently played file can be taken using the \(aqscreenshot\(aq +input mode command, which is by default bound to the \fBs\fP key. Files named +\fBmpv\-shotNNNN.jpg\fP will be saved in the working directory, using the first +available number \- no files will be overwritten. In pseudo\-GUI mode, the +screenshot will be saved somewhere else. See \fI\%PSEUDO GUI MODE\fP\&. +.sp +A screenshot will usually contain the unscaled video contents at the end of the +video filter chain and subtitles. By default, \fBS\fP takes screenshots without +subtitles, while \fBs\fP includes subtitles. +.sp +Unlike with MPlayer, the \fBscreenshot\fP video filter is not required. This +filter was never required in mpv, and has been removed. +.SH TERMINAL STATUS LINE +.sp +During playback, mpv shows the playback status on the terminal. It looks like +something like this: +.INDENT 0.0 +.INDENT 3.5 +\fBAV: 00:03:12 / 00:24:25 (13%) A\-V: \-0.000\fP +.UNINDENT +.UNINDENT +.sp +The status line can be overridden with the \fB\-\-term\-status\-msg\fP option. +.sp +The following is a list of things that can show up in the status line. Input +properties, that can be used to get the same information manually, are also +listed. +.INDENT 0.0 +.IP \(bu 2 +\fBAV:\fP or \fBV:\fP (video only) or \fBA:\fP (audio only) +.IP \(bu 2 +The current time position in \fBHH:MM:SS\fP format (\fBplayback\-time\fP property) +.IP \(bu 2 +The total file duration (absent if unknown) (\fBlength\fP property) +.IP \(bu 2 +Playback speed, e.g. \(ga\(ga x2.0\(ga\(ga. Only visible if the speed is not normal. This +is the user\-requested speed, and not the actual speed (usually they should +be the same, unless playback is too slow). (\fBspeed\fP property.) +.IP \(bu 2 +Playback percentage, e.g. \fB(13%)\fP\&. How much of the file has been played. +Normally calculated out of playback position and duration, but can fallback +to other methods (like byte position) if these are not available. +(\fBpercent\-pos\fP property.) +.IP \(bu 2 +The audio/video sync as \fBA\-V: 0.000\fP\&. This is the difference between +audio and video time. Normally it should be 0 or close to 0. If it\(aqs growing, +it might indicate a playback problem. (\fBavsync\fP property.) +.IP \(bu 2 +Total A/V sync change, e.g. \fBct: \-0.417\fP\&. Normally invisible. Can show up +if there is audio "missing", or not enough frames can be dropped. Usually +this will indicate a problem. (\fBtotal\-avsync\-change\fP property.) +.IP \(bu 2 +Encoding state in \fB{...}\fP, only shown in encoding mode. +.IP \(bu 2 +Display sync state. If display sync is active (\fBdisplay\-sync\-active\fP +property), this shows \fBDS: 2.500/13\fP, where the first number is average +number of vsyncs per video frame (e.g. 2.5 when playing 24Hz videos on 60Hz +screens), which might jitter if the ratio doesn\(aqt round off, or there are +mistimed frames (\fBvsync\-ratio\fP), and the second number of estimated number +of vsyncs which took too long (\fBvo\-delayed\-frame\-count\fP property). The +latter is a heuristic, as it\(aqs generally not possible to determine this with +certainty. +.IP \(bu 2 +Dropped frames, e.g. \fBDropped: 4\fP\&. Shows up only if the count is not 0. Can +grow if the video framerate is higher than that of the display, or if video +rendering is too slow. May also be incremented on "hiccups" and when the video +frame couldn\(aqt be displayed on time. (\fBvo\-drop\-frame\-count\fP property.) +If the decoder drops frames, the number of decoder\-dropped frames is appended +to the display as well, e.g.: \fBDropped: 4/34\fP\&. This happens only if +decoder frame dropping is enabled with the \fB\-\-framedrop\fP options. +(\fBdrop\-frame\-count\fP property.) +.IP \(bu 2 +Cache state, e.g. \fBCache: 2s/134KB\fP\&. Visible if the stream cache is enabled. +The first value shows the amount of video buffered in the demuxer in seconds, +the second value shows the estimated size of the buffered amount in kilobytes. +(\fBdemuxer\-cache\-duration\fP and \fBdemuxer\-cache\-state\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 +\fBhttp://...\fP, \fBhttps://\fP, ... +.INDENT 0.0 +.INDENT 3.5 +Many network protocols are supported, but the protocol prefix must always +be specified. mpv will never attempt to guess whether a filename is +actually a network address. A protocol prefix is always required. +.sp +Note that not all prefixes are documented here. Undocumented prefixes are +either aliases to documented protocols, or are just redirections to +protocols implemented and documented in FFmpeg. +.sp +\fBdata:\fP is supported in FFmpeg (not in Libav), but needs to be in the +format \fBdata://\fP\&. This is done to avoid ambiguity with filenames. You +can also prefix it with \fBlavf://\fP or \fBffmpeg://\fP\&. +.UNINDENT +.UNINDENT +.sp +\fBytdl://...\fP +.INDENT 0.0 +.INDENT 3.5 +By default, the youtube\-dl hook script (enabled by default for mpv CLI) +only looks at http URLs. Prefixing an URL with \fBytdl://\fP forces it to +be always processed by the script. This can also be used to invoke special +youtube\-dl functionality like playing a video by ID or invoking search. +.sp +Keep in mind that you can\(aqt pass youtube\-dl command line options by this, +and you have to use \fB\-\-ytdl\-raw\-options\fP instead. +.UNINDENT +.UNINDENT +.sp +\fB\-\fP +.INDENT 0.0 +.INDENT 3.5 +Play data from stdin. +.UNINDENT +.UNINDENT +.sp +\fBsmb://PATH\fP +.INDENT 0.0 +.INDENT 3.5 +Play a path from Samba share. +.UNINDENT +.UNINDENT +.sp +\fBbd://[title][/device]\fP \fB\-\-bluray\-device=PATH\fP +.INDENT 0.0 +.INDENT 3.5 +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/\fP (selects .mpls playlist); +\fB\fP (select playlist with the same index). mpv will list +the available playlists on loading. +.sp +\fBbluray://\fP is an alias. +.UNINDENT +.UNINDENT +.sp +\fBdvd://[title|[starttitle]\-endtitle][/device]\fP \fB\-\-dvd\-device=PATH\fP +.INDENT 0.0 +.INDENT 3.5 +Play a DVD. DVD menus are not supported. If no title is given, the longest +title is auto\-selected. +.sp +\fBdvdnav://\fP is an old alias for \fBdvd://\fP and does exactly the same +thing. +.UNINDENT +.UNINDENT +.sp +\fBdvdread://...:\fP +.INDENT 0.0 +.INDENT 3.5 +Play a DVD using the old libdvdread code. This is what MPlayer and +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 +.UNINDENT +.sp +\fBtv://[channel][/input_id]\fP \fB\-\-tv\-...\fP +.INDENT 0.0 +.INDENT 3.5 +Analogue TV via V4L. Also useful for webcams. (Linux only.) +.UNINDENT +.UNINDENT +.sp +\fBpvr://\fP \fB\-\-pvr\-...\fP +.INDENT 0.0 +.INDENT 3.5 +PVR. (Linux only.) +.UNINDENT +.UNINDENT +.sp +\fBdvb://[cardnumber@]channel\fP \fB\-\-dvbin\-...\fP +.INDENT 0.0 +.INDENT 3.5 +Digital TV via DVB. (Linux only.) +.UNINDENT +.UNINDENT +.sp +\fBmf://[filemask|@listfile]\fP \fB\-\-mf\-...\fP +.INDENT 0.0 +.INDENT 3.5 +Play a series of images as video. +.UNINDENT +.UNINDENT +.sp +\fBcdda://[device]\fP \fB\-\-cdrom\-device=PATH\fP \fB\-\-cdda\-...\fP +.INDENT 0.0 +.INDENT 3.5 +Play CD. +.UNINDENT +.UNINDENT +.sp +\fBlavf://...\fP +.INDENT 0.0 +.INDENT 3.5 +Access any FFmpeg/Libav libavformat protocol. Basically, this passed the +string after the \fB//\fP directly to libavformat. +.UNINDENT +.UNINDENT +.sp +\fBav://type:options\fP +.INDENT 0.0 +.INDENT 3.5 +This is intended for using libavdevice inputs. \fBtype\fP is the libavdevice +demuxer name, and \fBoptions\fP is the (pseudo\-)filename passed to the +demuxer. +.sp +For example, \fBmpv av://lavfi:mandelbrot\fP makes use of the libavfilter +wrapper included in libavdevice, and will use the \fBmandelbrot\fP source +filter to generate input data. +.sp +\fBavdevice://\fP is an alias. +.UNINDENT +.UNINDENT +.sp +\fBfile://PATH\fP +.INDENT 0.0 +.INDENT 3.5 +A local path as URL. Might be useful in some special use\-cases. Note that +\fBPATH\fP itself should start with a third \fB/\fP to make the path an +absolute path. +.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 +\fBfdclose://123\fP +.INDENT 0.0 +.INDENT 3.5 +Like \fBfd://\fP, but the file descriptor is closed after use. When using this +you need to ensure that the same fd URL will only be used once. +.UNINDENT +.UNINDENT +.sp +\fBedl://[edl specification as in edl\-mpv.rst]\fP +.INDENT 0.0 +.INDENT 3.5 +Stitch together parts of multiple files and play them. +.UNINDENT +.UNINDENT +.sp +\fBnull://\fP +.INDENT 0.0 +.INDENT 3.5 +Simulate an empty file. If opened for writing, it will discard all data. +The \fBnull\fP demuxer will specifically pass autoprobing if this protocol +is used (while it\(aqs not automatically invoked for empty files). +.UNINDENT +.UNINDENT +.sp +\fBmemory://data\fP +.INDENT 0.0 +.INDENT 3.5 +Use the \fBdata\fP part as source data. +.UNINDENT +.UNINDENT +.sp +\fBhex://data\fP +.INDENT 0.0 +.INDENT 3.5 +Like \fBmemory://\fP, but the string is interpreted as hexdump. +.UNINDENT +.UNINDENT +.SH PSEUDO GUI MODE +.sp +mpv has no official GUI, other than the OSC (\fI\%ON SCREEN CONTROLLER\fP), which +is not a full GUI and is not meant to be. However, to compensate for the lack +of expected GUI behavior, mpv will in some cases start with some settings +changed to behave slightly more like a GUI mode. +.sp +Currently this happens only in the following cases: +.INDENT 0.0 +.IP \(bu 2 +if started using the \fBmpv.desktop\fP file on Linux (e.g. started from menus +or file associations provided by desktop environments) +.IP \(bu 2 +if started from explorer.exe on Windows (technically, if it was started on +Windows, and all of the stdout/stderr/stdin handles are unset) +.IP \(bu 2 +started out of the bundle on OSX +.IP \(bu 2 +if you manually use \fB\-\-player\-operation\-mode=pseudo\-gui\fP on the command line +.UNINDENT +.sp +This mode applies options from the builtin profile \fBbuiltin\-pseudo\-gui\fP, but +only if these haven\(aqt been set in the user\(aqs config file or on the command line. +Also, for compatibility with the old pseudo\-gui behavior, the options in the +\fBpseudo\-gui\fP profile are applied unconditionally. In addition, the profile +makes sure to enable the pseudo\-GUI mode, so that \fB\-\-profile=pseudo\-gui\fP +works like in older mpv releases. The profiles are currently defined as follows: +.INDENT 0.0 +.INDENT 3.5 +.sp +.nf +.ft C +[builtin\-pseudo\-gui] +terminal=no +force\-window=yes +idle=once +screenshot\-directory=~~desktop/ +[pseudo\-gui] +player\-operation\-mode=pseudo\-gui +.ft P +.fi +.UNINDENT +.UNINDENT +.sp +\fBWARNING:\fP +.INDENT 0.0 +.INDENT 3.5 +Currently, you can extend the \fBpseudo\-gui\fP profile in the config file the +normal way. This is deprecated. In future mpv releases, the behavior might +change, and not apply your additional settings, and/or use a different +profile name. +.UNINDENT +.UNINDENT +.SH OPTIONS +.SS Track Selection +.INDENT 0.0 +.TP +.B \fB\-\-alang=\fP +Specify a priority list of audio languages to use. Different container +formats employ different language codes. DVDs use ISO 639\-1 two\-letter +language codes, Matroska, MPEG\-TS and NUT use ISO 639\-2 three\-letter +language codes, while OGM uses a free\-form identifier. See also \fB\-\-aid\fP\&. +.INDENT 7.0 +.INDENT 3.5 +.IP "Examples" +.INDENT 0.0 +.IP \(bu 2 +\fBmpv dvd://1 \-\-alang=hu,en\fP chooses the Hungarian language track +on a DVD and falls back on English if Hungarian is not available. +.IP \(bu 2 +\fBmpv \-\-alang=jpn example.mkv\fP plays a Matroska file with Japanese +audio. +.UNINDENT +.UNINDENT +.UNINDENT +.TP +.B \fB\-\-slang=\fP +Specify a priority list of subtitle languages to use. Different container +formats employ different language codes. DVDs use ISO 639\-1 two letter +language codes, Matroska uses ISO 639\-2 three letter language codes while +OGM uses a free\-form identifier. See also \fB\-\-sid\fP\&. +.INDENT 7.0 +.INDENT 3.5 +.IP "Examples" +.INDENT 0.0 +.IP \(bu 2 +\fBmpv dvd://1 \-\-slang=hu,en\fP chooses the Hungarian subtitle track on +a DVD and falls back on English if Hungarian is not available. +.IP \(bu 2 +\fBmpv \-\-slang=jpn example.mkv\fP plays a Matroska file with Japanese +subtitles. +.UNINDENT +.UNINDENT +.UNINDENT +.TP +.B \fB\-\-vlang=<...>\fP +Equivalent to \fB\-\-alang\fP and \fB\-\-slang\fP, for video tracks. +.TP +.B \fB\-\-aid=\fP +Select audio track. \fBauto\fP selects the default, \fBno\fP disables audio. +See also \fB\-\-alang\fP\&. mpv normally prints available audio tracks on the +terminal when starting playback of a file. +.sp +\fB\-\-audio\fP is an alias for \fB\-\-aid\fP\&. +.sp +\fB\-\-aid=no\fP or \fB\-\-audio=no\fP or \fB\-\-no\-audio\fP disables audio playback. +(The latter variant does not work with the client API.) +.TP +.B \fB\-\-sid=\fP +Display the subtitle stream specified by \fB\fP\&. \fBauto\fP selects +the default, \fBno\fP disables subtitles. +.sp +\fB\-\-sub\fP is an alias for \fB\-\-sid\fP\&. +.sp +\fB\-\-sid=no\fP or \fB\-\-sub=no\fP or \fB\-\-no\-sub\fP disables subtitle decoding. +(The latter variant does not work with the client API.) +.TP +.B \fB\-\-vid=\fP +Select video channel. \fBauto\fP selects the default, \fBno\fP disables video. +.sp +\fB\-\-video\fP is an alias for \fB\-\-vid\fP\&. +.sp +\fB\-\-vid=no\fP or \fB\-\-video=no\fP or \fB\-\-no\-video\fP disables video playback. +(The latter variant does not work with the client API.) +.sp +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\-\-edition=\fP +(Matroska files only) +Specify the edition (set of chapters) to use, where 0 is the first. If set +to \fBauto\fP (the default), mpv will choose the first edition declared as a +default, or if there is no default, the first edition defined. +.TP +.B \fB\-\-track\-auto\-selection=\fP +Enable the default track auto\-selection (default: yes). Enabling this will +make the player select streams according to \fB\-\-aid\fP, \fB\-\-alang\fP, and +others. If it is disabled, no tracks are selected. In addition, the player +will not exit if no tracks are selected, and wait instead (this wait mode +is similar to pausing, but the pause option is not set). +.sp +This is useful with \fB\-\-lavfi\-complex\fP: you can start playback in this +mode, and then set select tracks at runtime by setting the filter graph. +Note that if \fB\-\-lavfi\-complex\fP is set before playback is started, the +referenced tracks are always selected. +.UNINDENT +.SS Playback Control +.INDENT 0.0 +.TP +.B \fB\-\-start=\fP +Seek to given time position. +.sp +The general format for times is \fB[+|\-][[hh:]mm:]ss[.ms]\fP\&. If the time is +prefixed with \fB\-\fP, the time is considered relative from the end of the +file (as signaled by the demuxer/the file). A \fB+\fP is usually ignored (but +see below). +.sp +The following alternative time specifications are recognized: +.sp +\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). +.sp +If \fB\-\-rebase\-start\-time=no\fP is given, then prefixing times with \fB+\fP +makes the time relative to the start of the file. A timestamp without +prefix is considered an absolute time, i.e. should seek to a frame with a +timestamp as the file contains it. As a bug, but also a hidden feature, +putting 1 or more spaces before the \fB+\fP or \fB\-\fP always interprets the +time as absolute, which can be used to seek to negative timestamps (useful +for debugging at most). +.INDENT 7.0 +.INDENT 3.5 +.IP "Examples" +.INDENT 0.0 +.TP +.B \fB\-\-start=+56\fP, \fB\-\-start=00:56\fP +Seeks to the start time + 56 seconds. +.TP +.B \fB\-\-start=\-56\fP, \fB\-\-start=\-00:56\fP +Seeks to the end time \- 56 seconds. +.TP +.B \fB\-\-start=01:10:00\fP +Seeks to 1 hour 10 min. +.TP +.B \fB\-\-start=50%\fP +Seeks to the middle of the file. +.TP +.B \fB\-\-start=30 \-\-end=40\fP +Seeks to 30 seconds, plays 10 seconds, and exits. +.TP +.B \fB\-\-start=\-3:20 \-\-length=10\fP +Seeks to 3 minutes and 20 seconds before the end of the file, plays +10 seconds, and exits. +.TP +.B \fB\-\-start=\(aq#2\(aq \-\-end=\(aq#4\(aq\fP +Plays chapters 2 and 3, and exits. +.UNINDENT +.UNINDENT +.UNINDENT +.TP +.B \fB\-\-end=\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=\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. +.sp +Obscurity note: this does not work correctly if \fB\-\-rebase\-start\-time=no\fP, +and the specified time is not an "absolute" time, as defined in the +\fB\-\-start\fP option description. +.TP +.B \fB\-\-rebase\-start\-time=\fP +Whether to move the file start time to \fB00:00:00\fP (default: yes). This +is less awkward for files which start at a random timestamp, such as +transport streams. On the other hand, if there are timestamp resets, the +resulting behavior can be rather weird. For this reason, and in case you +are actually interested in the real timestamps, this behavior can be +disabled with \fBno\fP\&. +.TP +.B \fB\-\-speed=<0.01\-100>\fP +Slow down or speed up playback by the factor given as parameter. +.sp +If \fB\-\-audio\-pitch\-correction\fP (on by default) is used, playing with a +speed higher than normal automatically inserts the \fBscaletempo\fP audio +filter. +.TP +.B \fB\-\-pause\fP +Start the player in paused state. +.TP +.B \fB\-\-shuffle\fP +Play files in random order. +.TP +.B \fB\-\-playlist\-start=\fP +Set which file on the internal playlist to start playback with. The index +is an integer, with 0 meaning the first file. The value \fBauto\fP means that +the selection of the entry to play is left to the playback resume mechanism +(default). If an entry with the given index doesn\(aqt exist, the behavior is +unspecified and might change in future mpv versions. The same applies if +the playlist contains further playlists (don\(aqt expect any reasonable +behavior). Passing a playlist file to mpv should work with this option, +though. E.g. \fBmpv playlist.m3u \-\-playlist\-start=123\fP will work as expected, +as long as \fBplaylist.m3u\fP does not link to further playlists. +.sp +The value \fBno\fP is a deprecated alias for \fBauto\fP\&. +.TP +.B \fB\-\-playlist=\fP +Play files according to a playlist file (Supports some common formats. If +no format is detected, it will be treated as list of files, separated by +newline characters. Note that XML playlist formats are not supported.) +.sp +You can play playlists directly and without this option, however, this +option disables any security mechanisms that might be in place. You may +also need this option to load plaintext files as playlist. +.sp +\fBWARNING:\fP +.INDENT 7.0 +.INDENT 3.5 +The way mpv uses playlist files via \fB\-\-playlist\fP is not safe against +maliciously constructed files. Such files may trigger harmful actions. +This has been the case for all mpv and MPlayer versions, but +unfortunately this fact was not well documented earlier, and some people +have even misguidedly recommended use of \fB\-\-playlist\fP with untrusted +sources. Do NOT use \fB\-\-playlist\fP with random internet sources or files +you do not trust! +.sp +Playlist can contain entries using other protocols, such as local files, +or (most severely), special protocols like \fBavdevice://\fP, which are +inherently unsafe. +.UNINDENT +.UNINDENT +.TP +.B \fB\-\-chapter\-merge\-threshold=\fP +Threshold for merging almost consecutive ordered chapter parts in +milliseconds (default: 100). Some Matroska files with ordered chapters +have inaccurate chapter end timestamps, causing a small gap between the +end of one chapter and the start of the next one when they should match. +If the end of one playback part is less than the given threshold away from +the start of the next one then keep playing video normally over the +chapter change instead of doing a seek. +.TP +.B \fB\-\-chapter\-seek\-threshold=\fP +Distance in seconds from the beginning of a chapter within which a backward +chapter seek will go to the previous chapter (default: 5.0). Past this +threshold, a backward chapter seek will go to the beginning of the current +chapter instead. A negative value means always go back to the previous +chapter. +.TP +.B \fB\-\-hr\-seek=\fP +Select when to use precise seeks that are not limited to keyframes. Such +seeks require decoding video from the previous keyframe up to the target +position and so can take some time depending on decoding performance. For +some video formats, precise seeks are disabled. This option selects the +default choice to use for seeks; it is possible to explicitly override that +default in the definition of key bindings and in input commands. +.INDENT 7.0 +.TP +.B no +Never use precise seeks. +.TP +.B absolute +Use precise seeks if the seek is to an absolute position in the +file, such as a chapter seek, but not for relative seeks like +the default behavior of arrow keys (default). +.TP +.B yes +Use precise seeks whenever possible. +.TP +.B always +Same as \fByes\fP (for compatibility). +.UNINDENT +.TP +.B \fB\-\-hr\-seek\-demuxer\-offset=\fP +This option exists to work around failures to do precise seeks (as in +\fB\-\-hr\-seek\fP) caused by bugs or limitations in the demuxers for some file +formats. Some demuxers fail to seek to a keyframe before the given target +position, going to a later position instead. The value of this option is +subtracted from the time stamp given to the demuxer. Thus, if you set this +option to 1.5 and try to do a precise seek to 60 seconds, the demuxer is +told to seek to time 58.5, which hopefully reduces the chance that it +erroneously goes to some time later than 60 seconds. The downside of +setting this option is that precise seeks become slower, as video between +the earlier demuxer position and the real target may be unnecessarily +decoded. +.TP +.B \fB\-\-hr\-seek\-framedrop=\fP +Allow the video decoder to drop frames during seek, if these frames are +before the seek target. If this is enabled, precise seeking can be faster, +but if you\(aqre using video filters which modify timestamps or add new +frames, it can lead to precise seeking skipping the target frame. This +e.g. can break frame backstepping when deinterlacing is enabled. +.sp +Default: \fByes\fP +.TP +.B \fB\-\-index=\fP +Controls how to seek in files. Note that if the index is missing from a +file, it will be built on the fly by default, so you don\(aqt need to change +this. But it might help with some broken files. +.INDENT 7.0 +.TP +.B default +use an index if the file has one, or build it if missing +.TP +.B recreate +don\(aqt read or use the file\(aqs index +.UNINDENT +.sp +\fBNOTE:\fP +.INDENT 7.0 +.INDENT 3.5 +This option only works if the underlying media supports seeking +(i.e. not with stdin, pipe, etc). +.UNINDENT +.UNINDENT +.TP +.B \fB\-\-load\-unsafe\-playlists\fP +Load URLs from playlists which are considered unsafe (default: no). This +includes special protocols and anything that doesn\(aqt refer to normal files. +Local files and HTTP links on the other hand are always considered safe. +.sp +In addition, if a playlist is loaded while this is set, the added playlist +entries are not marked as originating from network or potentially unsafe +location. (Instead, the behavior is as if the playlist entries were provided +directly to mpv command line or \fBloadfile\fP command.) +.sp +Note that \fB\-\-playlist\fP always loads all entries, so you use that instead +if you really have the need for this functionality. +.TP +.B \fB\-\-access\-references=\fP +Follow any references in the file being opened (default: yes). Disabling +this is helpful if the file is automatically scanned (e.g. thumbnail +generation). If the thumbnail scanner for example encounters a playlist +file, which contains network URLs, and the scanner should not open these, +enabling this option will prevent it. This option also disables ordered +chapters, mov reference files, opening of archives, and a number of other +features. +.sp +On older FFmpeg versions, this will not work in some cases. Some FFmpeg +demuxers might not respect this option. +.sp +This option does not prevent opening of paired subtitle files and such. Use +\fB\-\-autoload\-files=no\fP to prevent this. +.sp +This option does not always work if you open non\-files (for example using +\fBdvd://directory\fP would open a whole bunch of files in the given +directory). Prefixing the filename with \fB\&./\fP if it doesn\(aqt start with +a \fB/\fP will avoid this. +.TP +.B \fB\-\-loop\-playlist=\fP, \fB\-\-loop\-playlist\fP +Loops playback \fBN\fP times. A value of \fB1\fP plays it one time (default), +\fB2\fP two times, etc. \fBinf\fP means forever. \fBno\fP is the same as \fB1\fP and +disables looping. If several files are specified on command line, the +entire playlist is looped. \fB\-\-loop\-playlist\fP is the same as +\fB\-\-loop\-playlist=inf\fP\&. +.sp +The \fBforce\fP mode is like \fBinf\fP, but does not skip playlist entries +which have been marked as failing. This means the player might waste CPU +time trying to loop a file that doesn\(aqt exist. But it might be useful for +playing webradios under very bad network conditions. +.TP +.B \fB\-\-loop\-file=\fP, \fB\-\-loop=\fP +Loop a single file N times. \fBinf\fP means forever, \fBno\fP means normal +playback. For compatibility, \fB\-\-loop\-file\fP and \fB\-\-loop\-file=yes\fP are +also accepted, and are the same as \fB\-\-loop\-file=inf\fP\&. +.sp +The difference to \fB\-\-loop\-playlist\fP is that this doesn\(aqt loop the playlist, +just the file itself. If the playlist contains only a single file, the +difference between the two option is that this option performs a seek on +loop, instead of reloading the file. +.sp +\fB\-\-loop\fP is an alias for this option. +.TP +.B \fB\-\-ab\-loop\-a=