pax_global_header00006660000000000000000000000064136133734720014523gustar00rootroot0000000000000052 comment=70b991749df389bcc0a4e145b5687233a03b4ed7 mpv-0.32.0/000077500000000000000000000000001361337347200124075ustar00rootroot00000000000000mpv-0.32.0/.github/000077500000000000000000000000001361337347200137475ustar00rootroot00000000000000mpv-0.32.0/.github/ISSUE_TEMPLATE/000077500000000000000000000000001361337347200161325ustar00rootroot00000000000000mpv-0.32.0/.github/ISSUE_TEMPLATE/1_dont_ignore.md000066400000000000000000000011261361337347200212030ustar00rootroot00000000000000--- name: 'README: DO NOT IGNORE OR DELETE THE ISSUE TEMPLATE' about: 'Chose and fill out one of the following templates!' title: '' labels: priority:ignored-issue-template assignees: '' --- We ask you to not ignore the issue template. Fill it out as good and correct as possible. Issues that don't adhere to our request will be closed for ignoring the issue template. This is because analyzing a bug without a log file is harder than necessary. Low quality bug reports are noise. Please go back and chose the proper issue template. Opening issues with this template will be closed immediately. mpv-0.32.0/.github/ISSUE_TEMPLATE/2_bug_report_linux.md000066400000000000000000000024171361337347200222700ustar00rootroot00000000000000--- name: 'Report a Linux Issue' about: 'Create a report for a runtime related Linux Issue' title: '' labels: 'os:linux' assignees: '' --- ### Important Information Provide following Information: - mpv version - Linux Distribution and Version - Source of the mpv binary - If known which version of mpv introduced the problem - Window Manager and version - GPU driver and version - Possible screenshot or video of visual glitches If you're not using git master or the latest release, update. Releases are listed here: https://github.com/mpv-player/mpv/releases ### Reproduction steps Describe the reproduction steps as precise as possible. It's very likely that the bug you experience wasn't reproduced by the developer because the workflow differes from your own. ### Expected behavior ### Actual behavior ### Log file Make a log file made with -v -v or --log-file=output.txt, paste it to https://0x0.st/ or attach it to the github issue, and replace this text with a link to it. The issue will be closed for ignoring the issue template. ### Sample files Sample files needed to reproduce this issue can be uploaded to https://0x0.st/ or similar sites. (Only needed if the issue cannot be reproduced without it.) Do not use garbage like "cloud storage", especially not Google Drive. mpv-0.32.0/.github/ISSUE_TEMPLATE/2_bug_report_macos.md000066400000000000000000000024331361337347200222310ustar00rootroot00000000000000--- name: 'Report a macOS Issue' about: 'Create a report for a runtime related macOS Issue' title: '' labels: 'os:mac' assignees: '' --- ### Important Information Provide following Information: - mpv version - macOS Version - Source of the mpv binary or bundle - If known which version of mpv introduced the problem - Possible screenshot or video of visual glitches If you're not using git master or the latest release, update. Releases are listed here: https://github.com/mpv-player/mpv/releases ### Reproduction steps Describe the reproduction steps as precise as possible. It's very likely that the bug you experience wasn't reproduced by the developer because the workflow differes from your own. ### Expected behavior ### Actual behavior ### Log file Make a log file made with -v -v or --log-file=output.txt, paste it to https://0x0.st/ or attach it to the github issue, and replace this text with a link to it. In the case of a crash please provide the macOS Crash Report (Backtrace). The issue will be closed for ignoring the issue template. ### Sample files Sample files needed to reproduce this issue can be uploaded to https://0x0.st/ or similar sites. (Only needed if the issue cannot be reproduced without it.) Do not use garbage like "cloud storage", especially not Google Drive. mpv-0.32.0/.github/ISSUE_TEMPLATE/2_bug_report_windows.md000066400000000000000000000023141361337347200226170ustar00rootroot00000000000000--- name: 'Report a Windows Issue' about: 'Create a report for a runtime related Windows Issue' title: '' labels: 'os:win' assignees: '' --- ### Important Information Provide following Information: - mpv version - Windows Version - Source of the mpv binary - If known which version of mpv introduced the problem - Possible screenshot or video of visual glitches If you're not using git master or the latest release, update. Releases are listed here: https://github.com/mpv-player/mpv/releases ### Reproduction steps Describe the reproduction steps as precise as possible. It's very likely that the bug you experience wasn't reproduced by the developer because the workflow differes from your own. ### Expected behavior ### Actual behavior ### Log file Make a log file made with -v -v or --log-file=output.txt, paste it to https://0x0.st/ or attach it to the github issue, and replace this text with a link to it. The issue will be closed for ignoring the issue template. ### Sample files Sample files needed to reproduce this issue can be uploaded to https://0x0.st/ or similar sites. (Only needed if the issue cannot be reproduced without it.) Do not use garbage like "cloud storage", especially not Google Drive. mpv-0.32.0/.github/ISSUE_TEMPLATE/3_bug_report.md000066400000000000000000000020411361337347200210430ustar00rootroot00000000000000--- name: 'Report a different Issue' about: 'Create a report for a runtime related Issue' title: '' labels: '' assignees: '' --- ### Important Information Provide following Information: - mpv version - Platform and Version - Source of the mpv binary If you're not using git master or the latest release, update. Releases are listed here: https://github.com/mpv-player/mpv/releases ### Reproduction steps Describe the reproduction steps as precise as possible. It's very likely that the bug you experience wasn't reproduced by the developer because the workflow differes from your own. ### Expected behavior ### Actual behavior ### Log file Make a log file made with -v -v or --log-file=output.txt, paste it to https://0x0.st/ or attach it to the github issue, and replace this text with a link to it. ### Sample files Sample files needed to reproduce this issue can be uploaded to https://0x0.st/ or similar sites. (Only needed if the issue cannot be reproduced without it.) Do not use garbage like "cloud storage", especially not Google Drive. mpv-0.32.0/.github/ISSUE_TEMPLATE/4_bug_report_build.md000066400000000000000000000014051361337347200222260ustar00rootroot00000000000000--- name: 'Report a build Problem' about: 'Create a report for a build related Issue' title: '' labels: 'core:waf' assignees: '' --- ### mpv version and platform versions If you're not using git master or the latest release, update. Releases are listed here: https://github.com/mpv-player/mpv/releases ### Reproduction steps Describe the reproduction steps as precise as possible. It's very likely that the bug you experience wasn't reproduced by the developer because the workflow differes from your own. ### Expected behavior ### Actual behavior ### Log file Upload build/config.log or ./waf configure output to https://0x0.st/ or attach it to the github issue, and replace this text with a link to it. The issue will be closed for ignoring the issue template. mpv-0.32.0/.github/ISSUE_TEMPLATE/5_feature_request.md000066400000000000000000000005601361337347200221040ustar00rootroot00000000000000--- name: 'Request a new Feature' about: 'Create a request for a new feature' title: '' labels: 'meta:feature-request' assignees: '' --- Before requesting a new feature make sure it hasn't been requested yet. https://github.com/mpv-player/mpv/labels/meta%3Afeature-request ### Expected behavior of the wanted feature ### Alternative behavior of the wanted feature mpv-0.32.0/.github/ISSUE_TEMPLATE/6_question.md000066400000000000000000000011151361337347200205460ustar00rootroot00000000000000--- name: 'Ask a Question' about: 'Ask a question about mpv' title: '' labels: 'meta:question' assignees: '' --- Don't ask questions about issues, errors or problems you have and instead open a proper issue with the right template from the previous selection. This template is meant for questions about the workings of mpv, to clarify about unspecified behaviour of options or command, or anything else that is not well described and needs clarification. Before asking a question make sure it hasn't been asked or answered yet. https://github.com/mpv-player/mpv/labels/meta%3Aquestion mpv-0.32.0/.github/ISSUE_TEMPLATE/config.yml000066400000000000000000000005371361337347200201270ustar00rootroot00000000000000blank_issues_enabled: false contact_links: - name: mpv irc channel url: https://mpv.io/community/ about: Feel free to ask question here irc://irc.freenode.net/mpv - name: mpv irc developer channel url: https://mpv.io/community/ about: Ask question related to the development of mpv here irc://irc.freenode.net/mpv-devel mpv-0.32.0/.github/PULL_REQUEST_TEMPLATE000066400000000000000000000003621361337347200171520ustar00rootroot00000000000000Read this before you submit this pull request: https://github.com/mpv-player/mpv/blob/master/DOCS/contribute.md Reading this link and following the rules will get your pull request reviewed and merged faster. Nobody wants lazy pull requests.mpv-0.32.0/.gitignore000066400000000000000000000006461361337347200144050ustar00rootroot00000000000000*.o *.a *.d *.exe *.pyc .depend /config.h /config.mak /config.log /mpv /mpv.app /version.h /input/input_conf.h /tags /TAGS /video/out/x11_icon.inc /demux/ebml_defs.c /demux/ebml_types.h /sub/osd_font.h /player/lua/*.inc /player/builtin_conf.inc /DOCS/man/mpv.1 /DOCS/man/mpv.aux /DOCS/man/mpv.log /DOCS/man/mpv.out /DOCS/man/mpv.pdf /DOCS/man/mpv.toc /waf /waf-* /waf3-* /build /.waf* /.lock-waf_* /old_build /Makefile mpv-0.32.0/.travis.yml000066400000000000000000000073271361337347200145310ustar00rootroot00000000000000language: c macbase: - &macOld os: osx compiler: clang env: - HOMEBREW_NO_AUTO_UPDATE=1 - HOMEBREW_NO_INSTALL_CLEANUP=1 - &macNew <<: *macOld addons: homebrew: packages: ['autoconf', 'automake', 'ffmpeg', 'freetype', 'fribidi', 'libass', 'libtool', 'little-cms2', 'luajit', 'nasm', 'pkg-config', 'python'] update: true matrix: include: - <<: *macNew osx_image: xcode11.3 - <<: *macNew osx_image: xcode10.1 - <<: *macOld osx_image: xcode9.2 - os: linux compiler: gcc env: CONTAINER=registry.cirno.systems/kiwi/containers/mpv-ci:stable-deps CI_SCRIPT=ci/build-tumbleweed.sh - os: linux compiler: clang env: CONTAINER=registry.cirno.systems/kiwi/containers/mpv-ci:stable-deps CI_SCRIPT=ci/build-tumbleweed.sh - os: linux env: CONTAINER=registry.cirno.systems/kiwi/containers/mpv-ci-mingw64:i686 CI_SCRIPT=ci/build-mingw64.sh TARGET=i686-w64-mingw32 - os: linux env: CONTAINER=registry.cirno.systems/kiwi/containers/mpv-ci-mingw64:x86_64 CI_SCRIPT=ci/build-mingw64.sh TARGET=x86_64-w64-mingw32 allow_failures: - os: osx osx_image: xcode9.2 fast_finish: true dist: bionic services: - docker sudo: required env: global: # Coverity token - secure: "H21mSRlMhk4BKS0xHZvCFGJxteCP0hRVUxTuNfM2Z9HBsyutuLEYMtViLO86VtM+Tqla3xXPzUdS4ozLwI72Ax/5ZUDXACROj73yW6QhFB5D6rLut12+FjqC7M33Qv2hl0xwgNBmR5dsm1ToP37+Wn+ecJQNvN8fkTXF+HVzOEw=" # Travis token for mpv.io - secure: "nlTVLJK6kRhtXvhKCoJ3YdFGHuKaq/eHowfPw25hqRWuBOZd+HjHY5KIYjV7SxuKFDpJE4GpNcvA3Q31nsqomxpkLYgrwjg6TSazN7ZP+x85ZgV1QGFebrPfGm2n5UR5CAPAwFoeF3pZheLi4bajVzwq1fWW+x3grS188P9OZso=" branches: only: - master - ci - coverity_scan - /release\/.*$/ before_install: - if [ "$TRAVIS_COMPILER" = "clang" ]; then export CXX="clang++"; fi - if [ "$TRAVIS_COMPILER" = "gcc" ]; then export CXX="g++"; fi - if [ "$TRAVIS_OS_NAME" = "linux" ]; then docker pull $CONTAINER; fi - | if [[ "$TRAVIS_OS_NAME" == "osx" ]]; then if [[ "$TRAVIS_OSX_IMAGE" == "xcode9.2" ]]; then brew update pushd "/usr/local/Homebrew/Library/Taps/homebrew/homebrew-core" git checkout 55e02323812604add9a69bab8730319b9255a697 popd brew install autoconf brew install automake brew install pkg-config brew install libtool brew install python brew install freetype brew install fribidi brew install little-cms2 brew install luajit brew install libass brew install ffmpeg else brew link --overwrite python fi fi before_cache: - if [ "$TRAVIS_OS_NAME" = "osx" ]; then brew cleanup -s ; fi cache: directories: - $HOME/Library/Caches/Homebrew script: - ./bootstrap.py - if [ "$TRAVIS_OS_NAME" = "linux" ]; then docker run --env CC --env TARGET -v $TRAVIS_BUILD_DIR:/build $CONTAINER /bin/sh -c "cd /build && $CI_SCRIPT"; fi - if [ "$TRAVIS_OS_NAME" = "osx" ]; then ./ci/build-macos.sh; fi after_failure: cat ./build/config.log after_script: TOOLS/travis-rebuild-website notifications: email: false irc: if: fork = false channels: - "irc.freenode.org#mpv-devel" on_success: change on_failure: always addons: coverity_scan: project: name: "mpv-player/mpv" description: "Build submitted via Travis CI" notification_email: mpv-team@googlegroups.com build_command_prepend: "./bootstrap.py && ./waf configure" build_command: "./waf build" branch_pattern: coverity_scan mpv-0.32.0/Copyright000066400000000000000000000073261361337347200143120ustar00rootroot00000000000000mpv is a fork of mplayer2, which is a fork of MPlayer. mpv as a whole is licensed under the GNU General Public License GPL version 2 or later (called GPLv2+ in this document, see LICENSE.GPL for full license text) by default, or the GNU Lesser General Public License LGPL version 2 or later (LGPLv2.1+ in this document, see LICENSE.LGPL for full license text) if built with the --enable-lgpl configure switch. Most source files are LGPLv2.1+ or GPLv2+, but some files are available under more liberal licenses, such as BSD, MIT, ISC, and possibly others. Look at the copyright header of each source file, and grep the sources for "Copyright" if you need to know details. C source files without Copyright notice are usually licensed as LGPLv2.1+. Also see the list of files with specific licenses below (not all files can have a standard license header). All new contributions must be LGPLv2.1+ licensed. Using a more liberal license compatible to LGPLv2.1+ is also ok. Changes done to GPL code must come with the implicit/explicit agreement that the project can relicense the changes to LGPLv2.1+ at a later point without asking the contributor. This is a safeguard for making potential relicensing of remaining GPL code to LGPLv2.1+ easier. See DOCS/contribute.md for binding rules wrt. licensing for contributions. For information about authors and contributors, consult the git log, which contains the complete SVN and CVS history as well. "v2.1+" in this context means "version 2.1 or later". Some libraries are GPLv2+ or GPLv3+ only. Building mpv with Samba support makes it GPLv3+. mpv can be built as LGPLv2.1+ with the --enable-lgpl configure option. To add a LGPL mode to mpv, MPlayer code had to be relicensed from GPLv2+ to LGPLv2.1+ by asking the MPlayer authors for permission. Since permission could not be obtained from everyone, LGPL mode disables the following features, some of them quite central: - Linux X11 video output - BSD audio output via OSS - NVIDIA/Linux hardware decoding (vdpau, although nvdec usually works) - Linux TV input - minor features: jack, DVD, CDDA, SMB, CACA, legacy direct3d VO Some of these will be fixed in the future. The intended use for LGPL mode is with libmpv, and currently it's not recommended to build mpv CLI in LGPL mode at all. The following files are still GPL only (--enable-lgpl disables them): audio/out/ao_jack.c will stay GPL audio/out/ao_oss.c will stay GPL stream/dvb* must stay GPL stream/stream_cdda.c unknown stream/stream_dvb.* must stay GPL stream/stream_dvdnav.c unknown stream/stream_smb.c will stay GPLv3 video/out/vo_caca.c unknown video/out/vo_direct3d.c unknown video/out/vo_vaapi.c probably impossible (some company's code) video/out/vo_vdpau.c probably impossible (nVidia's code) video/out/vo_x11.c probably impossible video/out/vo_xv.c probably impossible video/out/x11_common.* probably impossible video/vdpau.c hard (GPL-only parts must be ifdefed) video/vdpau.h unknown video/vdpau_mixer.* actual code must be rewritten DOCS/man/ GPLv2+ bootstrap.py unknown license, probably GPLv2+ or LGPLv2+ etc/mplayer-input.conf unknown license, probably GPLv2+ mpv.desktop unknown license, probably GPLv2+ etc/restore-old-bindings.conf unknown license, probably GPLv2+ None of the cases listed above affect the final binary if it's built as LGPL. Linked libraries still can affect the final license (for example if FFmpeg was built as GPL). mpv-0.32.0/DOCS/000077500000000000000000000000001361337347200131375ustar00rootroot00000000000000mpv-0.32.0/DOCS/client-api-changes.rst000066400000000000000000000331021361337347200173230ustar00rootroot00000000000000Introduction ============ This file lists all changes that can cause compatibility issues when using mpv through the client API (libmpv and ``client.h``). Since the client API interfaces to input handling (commands, properties) as well as command line options, you should also look at ``interface-changes.rst``. Normally, changes to the C API that are incompatible to previous iterations receive a major version bump (i.e. the first version number is increased), while C API additions bump the minor version (i.e. the second number is increased). Changes to properties/commands/options may also lead to a minor version bump, in particular if they are incompatible. The version number is the same as used for MPV_CLIENT_API_VERSION (see ``client.h`` how to convert between major/minor version numbers and the flat 32 bit integer). Also, read the section ``Compatibility`` in ``client.h``, and compatibility.rst. Options, commands, properties ============================= Changes to these are not listed here, but in ``interface-changes.rst``. (Before client API version 1.17, they were listed here partially.) This listing includes changes to the bare C API and behavior only, not what you can access with them. API changes =========== :: --- mpv 0.31.0 --- 1.107 - Deprecate MPV_EVENT_TICK --- mpv 0.30.0 --- 1.106 - Add cancel_fn to mpv_stream_cb_info 1.105 - Fix deadlock problems with MPV_RENDER_PARAM_ADVANCED_CONTROL and if the "vd-lavc-dr" option is enabled (which it is by default). There were no actual API changes. API users on older API versions and mpv releases should set "vd-lavc-dr" to "no" to avoid these issues. API users must still adhere to the tricky rules documented in render.h to avoid other deadlocks. 1.104 - Deprecate struct mpv_opengl_drm_params. Replaced by mpv_opengl_drm_params_v2 - Deprecate MPV_RENDER_PARAM_DRM_DISPLAY. Replaced by MPV_RENDER_PARAM_DRM_DISPLAY_V2. 1.103 - redo handling of async commands - add mpv_event_command and make it possible to return values from commands issued with mpv_command_async() or mpv_command_node_async() - add mpv_abort_async_command() 1.102 - rename struct mpv_opengl_drm_osd_size to mpv_opengl_drm_draw_surface_size - rename MPV_RENDER_PARAM_DRM_OSD_SIZE to MPV_RENDER_PARAM_DRM_DRAW_SURFACE_SIZE --- mpv 0.29.0 --- 1.101 - add MPV_RENDER_PARAM_ADVANCED_CONTROL and related API - add MPV_RENDER_PARAM_NEXT_FRAME_INFO and related symbols - add MPV_RENDER_PARAM_BLOCK_FOR_TARGET_TIME - add MPV_RENDER_PARAM_SKIP_RENDERING - add mpv_render_context_get_info() 1.100 - bump API number to avoid confusion with mpv release versions - actually apply the GL_MP_MPGetNativeDisplay change for the new render API. This also means compatibility for anything but x11 and wayland through the old opengl-cb GL_MP_MPGetNativeDisplay method is now unsupported. - deprecate mpv_get_wakeup_pipe(). It's complex, but easy to replace using normal API (just set a wakeup callback to a function which writes to a pipe). - add a 1st class hook API, which replaces the hacky mpv_command() based one. The old API is deprecated and will be removed soon. The old API was never meant to be stable, while the new API is. 1.29 - the behavior of mpv_terminate_destroy() and mpv_detach_destroy() changes subtly (see documentation in the header file). In particular, mpv_detach_destroy() will not leave the player running in all situations anymore (it gets closer to refcounting). - rename mpv_detach_destroy() to mpv_destroy() (the old function will remain valid as deprecated alias) - add mpv_create_weak_client(), which makes use of above changes - MPV_EVENT_SHUTDOWN is now returned exactly once if a mpv_handle should terminate, instead of spamming the event queue with this event 1.28 - deprecate the render opengl_cb API, and replace it with render.h and render_gl.h. The goal is allowing support for APIs other than OpenGL. The old API is emulated with the new API. Likewise, the "opengl-cb" VO is renamed to "libmpv". mpv_get_sub_api() is deprecated along the opengl_cb API. The new API is relatively similar, but not the same. The rough equivalents are: mpv_opengl_cb_init_gl => mpv_render_context_create mpv_opengl_cb_set_update_callback => mpv_render_context_set_update_callback mpv_opengl_cb_draw => mpv_render_context_render mpv_opengl_cb_report_flip => mpv_render_context_report_swap mpv_opengl_cb_uninit_gl => mpv_render_context_free The VO opengl-cb is also renamed to "libmpv". Also, the GL_MP_MPGetNativeDisplay pseudo extension is not used by the render API anymore, and the old opengl-cb API only handles the "x11" and "wl" names anymore. Support for everything else has been removed. The new render API uses proper API parameters, e.g. for X11 you pass MPV_RENDER_PARAM_X11_DISPLAY directly. - deprecate the qthelper.hpp header file. This provided some C++ helper utility functions for Qt with use of libmpv. There is no reason to keep this in the mpv git repository, nor to make it part of the libmpv API. If you're using this header, you can safely copy it into your project - it uses only libmpv public API. Alternatively, it could be maintained in a separate repository by interested parties. 1.27 - make opengl-cb the default VO. This causes a subtle behavior change if the API user called mpv_opengl_cb_init_gl(), but does not set the "vo" option. Before, it would still have used another VO (like on the CLI, e.g. vo=gpu). Now it'll behave as if vo=opengl-cb was used. --- mpv 0.28.0 --- 1.26 - remove glMPGetNativeDisplay("drm") support - add mpv_opengl_cb_window_pos and mpv_opengl_cb_drm_params and support via glMPGetNativeDisplay() for using it - make --stop-playback-on-init-failure=no the default in libmpv (just like in mpv CLI) --- mpv 0.27.0 --- 1.25 - remove setting "no-" options via mpv_set_option*(). (See corresponding deprecation in 0.23.0.) --- mpv 0.25.0 --- 1.24 - add a MPV_ENABLE_DEPRECATED preprocessor symbol, which can be defined by the user to exclude deprecated API symbols from the C headers --- mpv 0.23.0 --- 1.24 - the deprecated mpv_suspend() and mpv_resume() APIs now do nothing. --- mpv 0.22.0 --- 1.23 - deprecate setting "no-" options via mpv_set_option*(). For example, instead of "no-video=" you should set "video=no". - do not override the SIGPIPE signal handler anymore. This was done as workaround for the FFmpeg TLS code, which has been fixed long ago. - deprecate mpv_suspend() and mpv_resume(). They will be stubbed out in mpv 0.23.0. - make mpv_set_property() work to some degree before mpv_initialize(). It can now be used instead of mpv_set_option(). - semi-deprecate mpv_set_option()/mpv_set_option_string(). You should use mpv_set_property() instead. There are some deprecated properties which conflict with some options (see client.h remarks on mpv_set_option()), for which mpv_set_option() might still be required. In future mpv releases, the conflicting deprecated options/properties will be removed, and mpv_set_option() will internally translate API calls to mpv_set_property(). - qthelper.hpp: deprecate get_property_variant, set_property_variant, set_option_variant, command_variant, and replace them with get_property, set_property, command. --- mpv 0.19.0 --- 1.22 - add stream_cb API for custom protocols --- mpv 0.18.1 --- ---- - remove "status" log level from mpv_request_log_messages() docs. This is 100% equivalent to "v". The behavior is still the same, thus no actual API change. --- mpv 0.18.0 --- 1.21 - mpv_set_property() changes behavior with MPV_FORMAT_NODE. Before this change it rejected mpv_nodes with format==MPV_FORMAT_STRING if the property was not a string or did not have special mechanisms in place the function failed. Now it always invokes the option string parser, and mpv_node with a basic data type works exactly as if the function is invoked with that type directly. This new behavior is equivalent to mpv_set_option(). This also affects the mp.set_property_native() Lua function. - generally, setting choice options/properties with "yes"/"no" options can now be set as MPV_FORMAT_FLAG - reading a choice property as MPV_FORMAT_NODE will now return a MPV_FORMAT_FLAG value if the choice is "yes" (true) or "no" (false) This implicitly affects Lua and JSON IPC interfaces as well. - big changes to vo-cmdline on vo_opengl and vo_opengl_hq (but not vo_opengl_cb): options are now normally not reset, but applied on top of the current options. The special undocumented value "-" still works, but now resets all options to before any vo-cmdline command has been called. --- mpv 0.12.0 --- 1.20 - deprecate "GL_MP_D3D_interfaces"/"glMPGetD3DInterface", and introduce "GL_MP_MPGetNativeDisplay"/"glMPGetNativeDisplay" (this is a backwards-compatible rename) --- mpv 0.11.0 --- --- mpv 0.10.0 --- 1.19 - add "GL_MP_D3D_interfaces" pseudo extension to make it possible to use DXVA2 in OpenGL fullscreen mode in some situations - mpv_request_log_messages() now accepts "terminal-default" as parameter 1.18 - add MPV_END_FILE_REASON_REDIRECT, and change behavior of MPV_EVENT_END_FILE accordingly - a bunch of interface-changes.rst changes 1.17 - mpv_initialize() now blocks SIGPIPE (details see client.h) --- mpv 0.9.0 --- 1.16 - add mpv_opengl_cb_report_flip() - introduce mpv_opengl_cb_draw() and deprecate mpv_opengl_cb_render() - add MPV_FORMAT_BYTE_ARRAY 1.15 - mpv_initialize() will now load config files. This requires setting the "config" and "config-dir" options. In particular, it will load mpv.conf. - minor backwards-compatible change to the "seek" and "screenshot" commands (new flag syntax, old additional args deprecated) --- mpv 0.8.0 --- 1.14 - add mpv_wait_async_requests() - the --msg-level option changes its native type from a flat string to a key-value list (setting/reading the option as string still works) 1.13 - add MPV_EVENT_QUEUE_OVERFLOW 1.12 - add class Handle to qthelper.hpp - improve opengl_cb.h API uninitialization behavior, and fix the qml example - add mpv_create_client() function 1.11 - add OpenGL rendering interop API - allows an application to combine its own and mpv's OpenGL rendering Warning: this API is not stable yet - anything in opengl_cb.h might be changed in completely incompatible ways in minor API bumps --- mpv 0.7.0 --- 1.10 - deprecate/disable everything directly related to script_dispatch (most likely affects nobody) 1.9 - add enum mpv_end_file_reason for mpv_event_end_file.reason - add MPV_END_FILE_REASON_ERROR and the mpv_event_end_file.error field for slightly better error reporting on playback failure - add --stop-playback-on-init-failure option, and make it the default behavior for libmpv only - add qthelper.hpp set_option_variant() - mark the following events as deprecated: MPV_EVENT_TRACKS_CHANGED MPV_EVENT_TRACK_SWITCHED MPV_EVENT_PAUSE MPV_EVENT_UNPAUSE MPV_EVENT_METADATA_UPDATE MPV_EVENT_CHAPTER_CHANGE They are handled better with mpv_observe_property() as mentioned in the documentation comments. They are not removed and still work. 1.8 - add qthelper.hpp 1.7 - add mpv_command_node(), mpv_command_node_async() 1.6 - modify "core-idle" property behavior - MPV_EVENT_LOG_MESSAGE now always sends complete lines - introduce numeric log levels (mpv_log_level) --- mpv 0.6.0 --- 1.5 - change in X11 and "--wid" behavior again. The previous change didn't work as expected, and now the behavior can be explicitly controlled with the "input-x11-keyboard" option. This is only a temporary measure until XEmbed is implemented and confirmed working. Note: in 1.6, "input-x11-keyboard" was renamed to "input-vo-keyboard", although the old option name still works. 1.4 - subtle change in X11 and "--wid" behavior (this change was added to 0.5.2, and broke some things, see #1090) --- mpv 0.5.0 --- 1.3 - add MPV_MAKE_VERSION() 1.2 - remove "stream-time-pos" property (no replacement) 1.1 - remap dvdnav:// to dvd:// - add "--cache-file", "--cache-file-size" - add "--colormatrix-primaries" (and property) - add "primaries" sub-field to image format properties - add "playback-time" property - extend the "--start" option; a leading "+", which was previously insignificant is now significant - add "cache-free" and "cache-used" properties - OSX: the "coreaudio" AO spdif code is split into a separate AO --- mpv 0.4.0 --- 1.0 - the API is declared stable mpv-0.32.0/DOCS/compatibility.rst000066400000000000000000000170441361337347200165500ustar00rootroot00000000000000CLI and API compatibility policy ================================ Human users and API users rely on the mpv/libmpv/scripting/IPC interface not breaking their use case. On the other hand, active development occasionally requires breaking things, such as removing old options or changing options in a way that may break. This document lists rules when, what, and how incompatible changes can be made. It's interesting both for mpv developers, who want to change user-visible parts, and mpv users, who want to know what is guaranteed to remain stable. Any of the rules below may be overridden by statements in more specific documentation (for example, if the manpage says that a particular option may be removed any time, it means that, and the option probably won't even go through deprecation). Additions --------- Additions are basically always allowed. API users etc. are supposed to deal with the possibility that for example new API functions are added. Some parts of the API may document how they are extended. Options, commands, properties, events, hooks (command interface) ---------------------------------------------------------------- All of these are important for interfacing both with end users and API users (which include Lua scripts, libmpv, and the JSON IPC). As such, they constitute a large part of the user interface and APIs. All incompatible changes to this must be declared in interface-changes.rst. (This may also list compatible additions, but it's not a requirement.) Degrees of importance and compatibility preservation ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ Critical and central parts of the command interface have the strictest requirements. It may not be reasonable to break them, and other means to achieve some change have to be found. For example, the "seek" command is a bit of a mess, but since changing it would likely affect almost every user, it may be impossible to break at least the commonly used syntax. If changed anyway, there should be a deprecation period of at least 1 year, during which the command still works, and possibly a warning should remain even after this. Important/often used parts must be deprecated for at least 2 releases before they can be broken. There must be at least 1 release where the deprecated functionality still works, and a replacement is available (if technically reasonable). For example, a feature deprecated in mpv 0.30.0 may be removed in mpv 0.32.0. Minor releases do not count towards this. Less useful parts can be broken immediately, but must come with some sort of removal warning- Parts for debugging and testing may be removed any time, potentially even without any sort of documentation. Currently, the importance of a part is not documented and not even well-defined, which is probably a mistake. Renaming or removing options ^^^^^^^^^^^^^^^^^^^^^^^^^^^^ Typically, renaming an option can be done in a compatible way with OPT_REPLACED. You may need to check whether the corresponding properties still work (including messy details like observing properties for changes). OPT_REMOVED can be used to inform the user of alternatives or reasons for the removal, which is better than an option not found error. Likewise, m_option.deprecation_message should be set to something helpful. Both OPT_REPLACED and OPT_REMOVED can remain in the code for a long time, since they're unintrusive and hopefully make incompatible changes less painful for users. Scripting APIs -------------- This affects internal scripting APIs (currently Lua and JavaScript). Vaguely the same rules as with the command interface apply. Since there is a large number of scripts, an effort should be made to provide compatibility for old scripts, but it does not need to be stronger than that of the command interface. Undocumented parts of the scripting APIs are _not_ guaranteed for compatibility. This applies especially for internals. Languages like Lua do not have strict access control (nor does the mpv code try to emulate any), so if a script accesses private parts, and breaks on the next mpv release, it's not mpv's problem. JSON IPC -------- The JSON IPC is a thin protocol wrapping the libmpv API and the command interface. Compatibility-wise, it's about the same as the scripting APIs. The JSON protocol commands should remain as compatible as possible, and it should probably accept the current way commands are delimited (line breaks) forever. The protocol may accept non-standard JSON extensions, but only standard JSON (possibly with restrictions) is guaranteed for compatibility. Clients which want to remain compatible should not use any extensions. CLI --- Things such as default key bindings do not necessarily require compatibility. However, the release notes should be extremely clear on changes to "important" key bindings. Bindings which restore the old behavior should be added to restore-old-bindings.conf. Some option parsing is CLI-only and not available from libmpv or scripting. No compatibility guarantees come with them. However, the rules which mpv uses to distinguish between options and filenames must remain consistent (if the non-deprecated options syntax is used). Terminal and log output ----------------------- There are no compatibility guarantees for the terminal output, or the text logged via ``MPV_EVENT_LOG_MESSAGE`` and similar APIs. In particular, scripts invoking mpv CLI are extremely discouraged from trying to parse text output, and should use other mechanisms such as the JSON IPC. Protocols, filters, demuxers, etc. ---------------------------------- Which of these are present is generally not guaranteed, and can even depend on compile time settings. The filter list and their sub-options are considered part of the command-interface. libmpv C API ------------ The libmpv client API (such as ````) mostly gives access to the command interface. The API itself (if looked at as a component separate from the command interface) is intended to be extremely stable. All API changes are documented in client-api-changes.rst. API compatibility ^^^^^^^^^^^^^^^^^ The API is *always* compatible. Incompatible changes are only allowed on major API version changes (see ``MPV_CLIENT_API_VERSION``). A major version change is an extremely rare event, which means usually no API symbols are ever removed. Essentially removing API functions by making them always return an error, or making it do nothing is allowed in cases where it is unlikely to break most clients, but requires a deprecation period of 2 releases. (This has happened to ``mpv_suspend()`` for example.) API symbols can be deprecated. This should be clearly marked in the doxygen with ``@deprecated``, and if possible, the affected API symbols should not be visible if the API user defines ``MPV_ENABLE_DEPRECATED`` to 0. ABI compatibility ^^^^^^^^^^^^^^^^^ The ABI must never be broken, except on major API version changes. For example, constants don't change their values. Structs are tricky. If a struct can be allocated by a user (such as ``mpv_node``), no fields can be added. (Unless it's an union, and the addition does not change the offset or alignment of any of the fields or the struct itself. This has happened to ``mpv_node`` in the past.) If a struct is allocated by libmpv only, new fields can be appended to the end (for example ``mpv_event``). The ABI is only backward compatible. This means if a host application is linked to an older libmpv, and libmpv is updated to a newer version, it will still work (as in not causing any undefined behavior). Forward compatibility (an application would work with an older libmpv than it was linked to) is not required. mpv-0.32.0/DOCS/compile-windows.md000066400000000000000000000157371361337347200166160ustar00rootroot00000000000000Compiling for Windows ===================== Compiling for Windows is supported with MinGW-w64. This can be used to produce both 32-bit and 64-bit executables, and it works for building on Windows and cross-compiling from Linux and Cygwin. MinGW-w64 is available from: http://mingw-w64.sourceforge.net. While building a complete MinGW-w64 toolchain yourself is possible, there are a few build environments and scripts to help ease the process, such as MSYS2 and MXE. Note that MinGW environments included in Linux distributions are often broken, outdated and useless, and usually don't use MinGW-w64. **Warning**: the original MinGW (http://www.mingw.org) is unsupported. Cross-compilation ================= When cross-compiling, you have to run mpv's configure with these arguments: ```bash DEST_OS=win32 TARGET=i686-w64-mingw32 ./waf configure ``` [MXE](http://mxe.cc) makes it very easy to bootstrap a complete MingGW-w64 environment from a Linux machine. See a working example below. Alternatively, you can try [mingw-w64-cmake](https://github.com/lachs0r/mingw-w64-cmake), which bootstraps a MinGW-w64 environment and builds mpv and dependencies. Example with MXE ---------------- ```bash # Before starting, make sure you install MXE prerequisites. MXE will download # and build all target dependencies, but no host dependencies. For example, # you need a working compiler, or MXE can't build the crosscompiler. # # Refer to # # http://mxe.cc/#requirements # # Scroll down for disto/OS-specific instructions to install them. # Download MXE. Note that compiling the required packages requires about 1.4 GB # or more! cd /opt git clone https://github.com/mxe/mxe mxe cd mxe # Set build options. # The JOBS environment variable controls threads to use when building. DO NOT # use the regular `make -j4` option with MXE as it will slow down the build. # Alternatively, you can set this in the make command by appending "JOBS=4" # to the end of command: echo "JOBS := 4" >> settings.mk # The MXE_TARGET environment variable builds MinGW-w64 for 32 bit targets. # Alternatively, you can specify this in the make command by appending # "MXE_TARGETS=i686-w64-mingw32" to the end of command: echo "MXE_TARGETS := i686-w64-mingw32.static" >> settings.mk # If you want to build 64 bit version, use this: # echo "MXE_TARGETS := x86_64-w64-mingw32.static" >> settings.mk # Build required packages. The following provide a minimum required to build # a reasonable mpv binary (though not an absolute minimum). make gcc ffmpeg libass jpeg lua # Add MXE binaries to $PATH export PATH=/opt/mxe/usr/bin/:$PATH # Build mpv. The target will be used to automatically select the name of the # build tools involved (e.g. it will use i686-w64-mingw32.static-gcc). cd .. git clone https://github.com/mpv-player/mpv.git cd mpv python ./bootstrap.py DEST_OS=win32 TARGET=i686-w64-mingw32.static ./waf configure # Or, if 64 bit version, # DEST_OS=win32 TARGET=x86_64-w64-mingw32.static ./waf configure ./waf build ``` Native compilation with MSYS2 ============================= For Windows developers looking to get started quickly, MSYS2 can be used to compile mpv natively on a Windows machine. The MSYS2 repositories have binary packages for most of mpv's dependencies, so the process should only involve building mpv itself. To build 64-bit mpv on Windows: Installing MSYS2 ---------------- 1. Download an installer from https://msys2.github.io/ Both the i686 and the x86_64 version of MSYS2 can build 32-bit and 64-bit mpv binaries when running on a 64-bit version of Windows, but the x86_64 version is preferred since the larger address space makes it less prone to fork() errors. 2. Start a MinGW-w64 shell (``mingw64.exe``). **Note:** This is different from the MSYS2 shell that is started from the final installation dialog. You must close that shell and open a new one. For a 32-bit build, use ``mingw32.exe``. Updating MSYS2 -------------- To prevent errors during post-install, the MSYS2 core runtime must be updated separately. ```bash # Check for core updates. If instructed, close the shell window and reopen it # before continuing. pacman -Syu # Update everything else pacman -Su ``` Installing mpv dependencies --------------------------- ```bash # Install MSYS2 build dependencies and a MinGW-w64 compiler pacman -S git python $MINGW_PACKAGE_PREFIX-{pkg-config,gcc} # Install the most important MinGW-w64 dependencies. libass and lcms2 are also # pulled in as dependencies of ffmpeg. pacman -S $MINGW_PACKAGE_PREFIX-{ffmpeg,libjpeg-turbo,lua51} ``` Building mpv ------------ Clone the latest mpv from git and install waf. **Note:** ``/usr/bin/python3`` is invoked directly here, since an MSYS2 version of Python is required. ```bash git clone https://github.com/mpv-player/mpv.git && cd mpv /usr/bin/python3 bootstrap.py ``` Finally, compile and install mpv. Binaries will be installed to ``/mingw64/bin`` or ``/mingw32/bin``. ```bash /usr/bin/python3 waf configure CC=gcc.exe --check-c-compiler=gcc --prefix=$MSYSTEM_PREFIX /usr/bin/python3 waf install ``` Or, compile and install both libmpv and mpv: ```bash /usr/bin/python3 waf configure CC=gcc.exe --check-c-compiler=gcc --enable-libmpv-shared --prefix=$MSYSTEM_PREFIX /usr/bin/python3 waf install ``` Linking libmpv with MSVC programs --------------------------------- mpv/libmpv cannot be built with Visual Studio (Microsoft is too incompetent to support C99/C11 properly and/or hates open source and Linux too much to seriously do it). But you can build C++ programs in Visual Studio and link them with a libmpv built with MinGW. To do this, you need a Visual Studio which supports ``stdint.h`` (recent ones do), and you need to create a import library for the mpv DLL: ```bash lib /def:mpv.def /name:mpv-1.dll /out:mpv.lib /MACHINE:X64 ``` The string in the ``/name:`` parameter must match the filename of the DLL (this is simply the filename the MSVC linker will use). The ``mpv.def`` can be retrieved from the mpv build directory, or can be produced by MingGW's gendef.exe helper from the mpv DLL. Static linking is not possible. Running mpv ----------- If you want to run mpv from the MinGW-w64 shell, you will find the experience much more pleasant if you use the ``winpty`` utility ```bash pacman -S winpty winpty mpv.com ToS-4k-1920.mov ``` If you want to move / copy ``mpv.exe`` and ``mpv.com`` to somewhere other than ``/mingw64/bin/`` for use outside the MinGW-w64 shell, they will still depend on DLLs in that folder. The simplest solution is to add ``C:\msys64\mingw64\bin`` to the windows system ``%PATH%``. Beware though that this can cause problems or confusion in Cygwin if that is also installed on the machine. Use of the ANGLE OpenGL backend requires a copy of the D3D compiler DLL that matches the version of the D3D SDK that ANGLE was built with (``d3dcompiler_43.dll`` in case of MinGW-built ANGLE) in the path or in the same folder as mpv. It must be of the same architecture (x86_64 / i686) as the mpv you compiled. You can find copies here: https://mpv.srsfckn.biz/d3dcompiler.7z mpv-0.32.0/DOCS/contribute.md000066400000000000000000000254351361337347200156500ustar00rootroot00000000000000How to contribute ================= General ------- The main contact for mpv development is IRC, specifically #mpv and #mpv-devel on Freenode. Github is used for code review and long term discussions. Sending patches --------------- - Make a github pull request, or send a link to a plaintext patch created with ``git format-patch``. - Plain diffs posted as pastebins are not acceptable! (Especially if the http link returns HTML.) They only cause extra work for everyone, because they lack commit message and authorship information. - Never send patches to any of the developers email addresses. - If your changes are not supposed to be merged immediately, mark them as "[RFC]" in the commit message or the pull request title. - Be sure to test your changes. If you didn't, please say so in the commit message and the pull request text. Copyright of contributions -------------------------- - The copyright belongs to contributors. The project is a collaborative work. By sending your changes, you agree to license your contributions according to the requirements of this project. - All new code must be LGPLv2.1+ licensed, or come with the implicit agreement that it will be relicensed to LGPLv2.1+ later (see ``Copyright`` in the repository root directory). - 100% compatible licenses are allowed too. - Changes in files with more liberal licenses (such as BSD, MIT, or ISC) are assumed to be dual-licensed under LGPLv2.1+ and the license indicated in the file header. - You must be either the exclusive author of the patch, or acknowledge all authors involved in the commit message. If you take 3rd party code, authorship and copyright must be properly acknowledged. If you're making changes on behalf of your employer, and the employer owns the copyright, you must mention this. If the license of the code is not LGPLv2.1+, you must mention this. - These license statements are legally binding. - Don't use fake names (something that looks like an actual name, and may be someone else's name, but is not your legal name). Using a pseudonyms is allowed if it can be used to identify or contact you, even if whatever account you used to submit the patch dies. - Do not add your name to the license header. This convention is not used by this project, and neither copyright law nor any of the used licenses require it. Write good commit messages -------------------------- - Write informative commit messages. Use present tense to describe the situation with the patch applied, and past tense for the situation before the change. - The subject line (the first line in a commit message) must contain a prefix identifying the sub system, followed by a short description what impact this commit has. This subject line and the commit message body must not be longer than 72 characters per line, because it messes up the output of many git tools otherwise. For example, you fixed a crash in af_volume.c: - Bad: ``fixed the bug (wtf?)`` - Good: ``af_volume: fix crash due to null pointer access`` Having a prefix gives context, and is especially useful when trying to find a specific change by looking at the history, or when running ``git blame``. - The first word after the ``:`` is lower case. - Don't end the subject line with a ``.``. - Put an empty line between the subject line and the commit message. If this is missing, it will break display in common git tools. - The body of the commit message (everything else after the subject line) must be as informative as possible and contain everything that isn't obvious. Don't hesitate to dump as much information as you can - it doesn't cost you anything. Put some effort into it. If someone finds a bug months or years later, and finds that it's caused by your commit (even though your commit was supposed to fix another bug), it would be bad if there wasn't enough information to test the original bug. The old bug might be reintroduced while fixing the new bug. The commit message must be wrapped on 72 characters per line, because git tools usually do not break text automatically. On the other hand, you do not need to break text that would be unnatural to break (like data for test cases, or long URLs). - Another summary of good conventions: https://chris.beams.io/posts/git-commit/ Split changes into multiple commits ----------------------------------- - Follow git good practices, and split independent changes into several commits. It's usually OK to put them into a single pull request. - Try to separate cosmetic and functional changes. It's ok to make a few additional cosmetic changes in the same file you're working on. But don't do something like reformatting a whole file, and hiding an actual functional change in the same commit. - Splitting changes does _not_ mean that you should make them as fine-grained as possible. Commits should form logical steps in development. The way you split changes is important for code review and analyzing bugs. Touching user-visible parts may require updating the mpv docs ------------------------------------------------------------- - Most user-visible things are normally documented in DOCS/man/. If your commit touches documented behavior, list of sub-options, etc., you need to adjust the documentation. - These changes usually go into the same commit that changes the code. - Changes to command line options (addition/modification/removal) must be documented in options.rst. - Changes to input properties or input commands must be documented in input.rst. - All incompatible changes to the user interface (options, properties, commands) must be documented with a small note in interface-changes.rst. (Additions may be documented there as well, but this isn't required.) - Changes to the libmpv API must be reflected in the libmpv's headers doxygen, and in client-api-changes.rst. Code formatting --------------- mpv uses C99 with K&R formatting, with some exceptions. - Use the K&R indent style. - Use 4 spaces of indentation, never use tabs (except in Makefiles). - Add a single space between keywords and binary operators. There are some other cases where spaces must be added. Example: ```C if ((a * b) > c) { // code some_function(a, b, c); } ``` - Break lines on 80 columns. There is a hard limit of 85 columns. You may ignore this limit if there's a strong case that not breaking the line will increase readability. Going over 85 columns might provoke endless discussions about whether such a limit is needed or not, so avoid it. - If the body of an if/for/while statement has more than 1 physical lines, then always add braces, even if they're technically redundant. Bad: ```C if (a) // do something if b if (b) do_something(); ``` Good: ```C if (a) { // do something if b if (b) do_something(); } ``` - If the if has an else branch, both branches must use braces, even if they're technically redundant. Example: ```C if (a) { one_line(); } else { one_other_line(); } ``` - If an if condition spans multiple physical lines, then put the opening brace for the if body on the next physical line. (Also, preferably always add a brace, even if technically none is needed.) Example: ```C if (very_long_condition_a && very_long_condition_b) { code(); } else { ... } ``` (If the if body is simple enough, this rule can be skipped.) - Remove any trailing whitespace. - Do not make stray whitespaces changes. Header #include statement order ------------------------------- The order of ``#include`` statements in the source code is not very consistent. New code must follow the following conventions: - Put standard includes (``#include `` etc.) on the top, - then after a blank line, add library includes (``#include `` etc.) - then after a blank line, add internal includes (``#include "player/core.h"``) - sort them alphabetically within these sections General coding -------------- - Use C99. Also freely make use of C99 features if it's appropriate, such as stdbool.h. (Except VLA and complex number types.) - Don't use non-standard language (such as GNU C-only features). In some cases they may be warranted, if they are optional (such as attributes enabling printf-like format string checks). "#pragma once" is allowed as an exception. But in general, standard C99 must be used. - The same applies to libc functions. We have to be Windows-compatible too. Use functions guaranteed by C99 or POSIX only, unless your use is guarded by a configure check. There is some restricted use of C11 (ask on IRC for details). - Prefer fusing declaration and initialization, rather than putting declarations on the top of a block. Obvious data flow is more important than avoiding mixing declarations and statements, which is just a C90 artifact. - If you add features that require intrusive changes, discuss them on the dev channel first. There might be a better way to add a feature and it can avoid wasted work. Code of Conduct --------------- We have one, but the document describing it got lost accidentally. Rules for git push access ------------------------- Push access to the main git repository is handed out on an arbitrary basis. If you got access, the following rules must be followed: - You are expected to follow the general development rules as outlined in this whole document. - You must be present on the IRC dev channel when you push something. - Anyone can push small fixes: typo corrections, small/obvious/uncontroversial bug fixes, edits to the user documentation or code comments, and so on. - You can freely make changes to parts of the code which you maintain. For larger changes, it's recommended to let others review the changes first. - You automatically maintain code if you wrote or modified most of it before (e.g. you made larger changes to it before, did partial or full rewrites, did major bug fixes, or you're the original author of the code). If there is more than one maintainer, you may need to come to an agreement with the others how to handle this to avoid conflict. - If you make a pull requests (especially if it's to code you maintain), and you want reviews, explicitly ping the people from which you expect reviews. - As a maintainer, you can approve pull requests by others to "your" code. - If you approve or merge 3rd party changes, make sure they follow the general development rules. - Changes to user interface and public API must always be approved by the project leader. - Seasoned project members are allowed to revert commits that broke the build, or broke basic functionality in a catastrophic way, and the developer who broke it is unavailable. (Depending on severity.) - Adhere to the CoC. - The project leader is not bound by these rules. mpv-0.32.0/DOCS/edl-mpv.rst000066400000000000000000000222521361337347200152400ustar00rootroot00000000000000EDL files ========= EDL files basically concatenate ranges of video/audio from multiple source files into a single continuous virtual file. Each such range is called a segment, and consists of source file, source offset, and segment length. For example:: # mpv EDL v0 f1.mkv,10,20 f2.mkv f1.mkv,40,10 This would skip the first 10 seconds of the file f1.mkv, then play the next 20 seconds, then switch to the file f2.mkv and play all of it, then switch back to f1.mkv, skip to the 40 second mark, and play 10 seconds, and then stop playback. The difference to specifying the files directly on command line (and using ``--{ --start=10 --length=20 f1.mkv --}`` etc.) is that the virtual EDL file appears as a virtual timeline (like a single file), instead as a playlist. The general simplified syntax is:: # mpv EDL v0 ,, If the start time is omitted, 0 is used. If the length is omitted, the estimated remaining duration of the source file is used. Note:: Usage of relative or absolute paths as well as any protocol prefixes may be prevented for security reasons. Syntax of mpv EDL files ======================= Generally, the format is relatively strict. No superfluous whitespace (except empty lines and commented lines) are allowed. You must use UNIX line breaks. The first line in the file must be ``# mpv EDL v0``. This designates that the file uses format version 0, which is not frozen yet and may change any time. (If you need a stable EDL file format, make a feature request. Likewise, if you have suggestions for improvements, it's not too late yet.) The rest of the lines belong to one of these classes: 1) An empty or commented line. A comment starts with ``#``, which must be the first character in the line. The rest of the line (up until the next line break) is ignored. An empty line has 0 bytes between two line feed bytes. 2) A header entry if the line starts with ``!``. 3) A segment entry in all other cases. Each segment entry consists of a list of named or unnamed parameters. Parameters are separated with ``,``. Named parameters consist of a name, followed by ``=``, followed by the value. Unnamed parameters have only a value, and the name is implicit from the parameter position. Syntax:: segment_entry ::= ( ',' )* param ::= [ '=' ] ( | '%' '%' ) The ``name`` string can consist of any characters, except ``=%,;\n!``. The ``value`` string can consist of any characters except of ``,;\n!``. The construct starting with ``%`` allows defining any value with arbitrary contents inline, where ``number`` is an integer giving the number of bytes in ``valuebytes``. If a parameter value contains disallowed characters, it has to be guarded by a length specifier using this syntax. The parameter name defines the meaning of the parameter: 1) ``file``, the source file to use for this segment. 2) ``start``, a time value that specifies the start offset into the source file. 3) ``length``, a time value that specifies the length of the segment. See the section below for the format of timestamps. Unnamed parameters carry implicit names. The parameter position determines which of the parameters listed above is set. For example, the second parameter implicitly uses the name ``start``. Example:: # mpv EDL v0 %18%filename,with,.mkv,10,length=20,param3=%13%value,escaped,param4=value2 this sets ``file`` to ``filename,with,.mkv``, ``start`` to ``10``, ``length`` to ``20``, ``param3`` to ``value,escaped``, ``param4`` to ``value2``. Instead of line breaks, the character ``;`` can be used. Line feed bytes and ``;`` are treated equally. Header entries start with ``!`` as first character after a line break. Header entries affect all other file entries in the EDL file. Their format is highly implementation specific. They should generally follow the file header, and come before any file entries. Disabling chapter generation and copying ======================================== By default, chapters from the source ranges are copied to the virtual file's chapters. Also, a chapter is inserted after each range. This can be disabled with the ``no_chapters`` header. Example:: !no_chapters MP4 DASH ======== This is a header that helps implementing DASH, although it only provides a low level mechanism. If this header is set, the given url designates an mp4 init fragment. It's downloaded, and every URL in the EDL is prefixed with the init fragment on the byte stream level. This is mostly for use by mpv's internal ytdl support. The ytdl script will call youtube-dl, which in turn actually processes DASH manifests. It may work only for this very specific purpose and fail to be useful in other scenarios. It can be removed or changed in incompatible ways at any times. Example:: !mp4_dash,init=url The ``url`` is encoded as parameter value as defined in the general EDL syntax. It's expected to point to an "initialization fragment", which will be prefixed to every entry in the EDL on the byte stream level. The current implementation will - ignore stream start times - use durations as hint for seeking only - not adjust source timestamps - open and close segments (i.e. fragments) as needed - not add segment boundaries as chapter points - require full compatibility between all segments (same codec etc.) Another header part of this mechanism is ``no_clip``. This header is similar to ``mp4_dash``, but does not include on-demand opening/closing of segments, and does not support init segments. It also exists solely to support internal ytdl requirements. The ``mp4_dash`` and ``no_clip`` headers are not part of the core EDL format. They may be changed or removed at any time, depending on mpv's internal requirements. Separate files for tracks ========================= The special ``new_stream`` header lets you specify separate parts and time offsets for separate tracks. This can for example be used to source audio and video track from separate files. Example:: # mpv EDL v0 video.mkv !new_stream audio.mkv This adds all tracks from both files to the virtual track list. Upon playback, the tracks will be played at the same time, instead of appending them. The files can contain more than 1 stream; the apparent effect is the same as if the second part after the ``!new_stream`` part were in a separate ``.edl`` file and added with ``--external-file``. Note that all metadata between the stream sets created by ``new_stream`` is disjoint. Global metadata is taken from the first part only. In context of mpv, this is redundant to the ``--audio-file`` and ``--external-file`` options, but (as of this writing) has the advantage that this will use a unified cache for all streams. The ``new_stream`` header is not part of the core EDL format. It may be changed or removed at any time, depending on mpv's internal requirements. Timestamp format ================ Currently, time values are floating point values in seconds. As an extension, you can set the ``timestamps=chapters`` option. If this option is set, timestamps have to be integers, and refer to chapter numbers, starting with 0. Example:: # mpv EDL v0 file.mkv,2,4,timestamps=chapters Plays chapter 3 and ends with the start of chapter 7 (4 chapters later). Implicit chapters ================= mpv will add one chapter per segment entry to the virtual timeline. By default, the chapter's titles will match the entries' filenames. You can override set the ``title`` option to override the chapter title for that segment. Example:: # mpv EDL v0 cap.ts,5,240 OP.mkv,0,90,title=Show Opening The virtual timeline will have two chapters, one called "cap.ts" from 0-240s and a second one called "Show Opening" from 240-330s. Entry which defines the track layout ==================================== Normally, you're supposed to put only files with compatible layouts into an EDL file. However, at least the mpv implementation accepts entries that use different codecs, or even have a different number of audio/video/subtitle tracks. In this case, it's not obvious, which virtual tracks the EDL show should expose when being played. Currently, mpv will apply an arbitrary heuristic which tracks the EDL file should expose. (Before mpv 0.30.0, it always used the first source file in the segment list.) You can set the ``layout`` option to ``this`` to make a specific entry define the track layout. Example:: # mpv EDL v0 file_with_2_streams.ts,5,240 file_with_5_streams.mkv,0,90,layout=this The way the different virtual EDL tracks are associated with the per-segment ones is highly implementation-defined, and uses a heuristic. If a segment is missing a track, there will be a "hole", and bad behavior may result. Improving this is subject to further development (due to being fringe cases, they don't have a high priority). If future versions of mpv change this again, this option may be ignored. Syntax of EDL URIs ================== mpv accepts inline EDL data in form of ``edl://`` URIs. Other than the header, the syntax is exactly the same. It's far more convenient to use ``;`` instead of line breaks, but that is orthogonal. Example: ``edl://f1.mkv,length=5,start=10;f2.mkv,30,20;f3.mkv`` mpv-0.32.0/DOCS/encoding.rst000066400000000000000000000125151361337347200154630ustar00rootroot00000000000000General usage ============= :: mpv infile -o outfile [-of outfileformat] [-ofopts formatoptions] [-orawts] \ [(any other mpv options)] \ -ovc outvideocodec [-ovcopts outvideocodecoptions] \ -oac outaudiocodec [-oacopts outaudiocodecoptions] Help for these options is provided if giving help as parameter, as in:: mpv -ovc help The suboptions of these generally are identical to ffmpeg's (as option parsing is simply delegated to ffmpeg). The option -ocopyts enables copying timestamps from the source as-is, instead of fixing them to match audio playback time (note: this doesn't work with all output container formats); -orawts even turns off discontinuity fixing. Note that if neither -ofps nor -oautofps is specified, VFR encoding is assumed and the time base is 24000fps. -oautofps sets -ofps to a guessed fps number from the input video. 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 -ofps or -oautofps to force CFR encoding in these cases. Of course, the options can be stored in a profile, like this .config/mpv/mpv.conf section:: [myencprofile] vf-add = scale=480:-2 ovc = libx264 ovcopts-add = preset=medium ovcopts-add = tune=fastdecode ovcopts-add = crf=23 ovcopts-add = maxrate=1500k ovcopts-add = bufsize=1000k ovcopts-add = rc_init_occupancy=900k ovcopts-add = refs=2 ovcopts-add = profile=baseline oac = aac oacopts-add = b=96k It's also possible to define default encoding options by putting them into the section named ``[encoding]``. (This behavior changed after mpv 0.3.x. In mpv 0.3.x, config options in the default section / no section were applied to encoding. This is not the case anymore.) One can then encode using this profile using the command:: mpv infile -o outfile.mp4 -profile myencprofile Some example profiles are provided in a file etc/encoding-profiles.conf; as for this, see below. Encoding examples ================= These are some examples of encoding targets this code has been used and tested for. Typical MPEG-4 Part 2 ("ASP", "DivX") encoding, AVI container:: mpv infile -o outfile.avi \ --vf=fps=25 \ -ovc mpeg4 -ovcopts qscale=4 \ -oac libmp3lame -oacopts ab=128k Note: AVI does not support variable frame rate, so the fps filter must be used. The frame rate should ideally match the input (25 for PAL, 24000/1001 or 30000/1001 for NTSC) Typical MPEG-4 Part 10 ("AVC", "H.264") encoding, Matroska (MKV) container:: mpv infile -o outfile.mkv \ -ovc libx264 -ovcopts preset=medium,crf=23,profile=baseline \ -oac libvorbis -oacopts qscale=3 Typical MPEG-4 Part 10 ("AVC", "H.264") encoding, MPEG-4 (MP4) container:: mpv infile -o outfile.mp4 \ -ovc libx264 -ovcopts preset=medium,crf=23,profile=baseline \ -oac aac -oacopts ab=128k Typical VP8 encoding, WebM (restricted Matroska) container:: mpv infile -o outfile.mkv \ -of webm \ -ovc libvpx -ovcopts qmin=6,b=1000000k \ -oac libvorbis -oacopts qscale=3 Device targets ============== As the options for various devices can get complex, profiles can be used. An example profile file for encoding is provided in etc/encoding-profiles.conf in the source tree. This file is installed and loaded by default. If you want to modify it, you can replace and it with your own copy by doing:: mkdir -p ~/.mpv cp /etc/mpv/encoding-profiles.conf ~/.mpv/encoding-profiles.conf Keep in mind that the default profile is the playback one. If you want to add options that apply only in encoding mode, put them into a ``[encoding]`` section. Refer to the top of that file for more comments - in a nutshell, the following options are added by it:: -profile enc-to-dvdpal DVD-Video PAL, use dvdauthor -v pal+4:3 -a ac3+en -profile enc-to-dvdntsc DVD-Video NTSC, use dvdauthor -v ntsc+4:3 -a ac3+en -profile enc-to-bb-9000 MP4 for Blackberry Bold 9000 -profile enc-to-nok-6300 3GP for Nokia 6300 -profile enc-to-psp MP4 for PlayStation Portable -profile enc-to-iphone MP4 for iPhone -profile enc-to-iphone-4 MP4 for iPhone 4 (double res) -profile enc-to-iphone-5 MP4 for iPhone 5 (even larger res) You can encode using these with a command line like:: mpv infile -o outfile.mp4 -profile enc-to-bb-9000 Of course, you are free to override options set by these profiles by specifying them after the -profile option. What works ========== * Encoding at variable frame rate (default) * Encoding at constant frame rate using --vf=fps=RATE * 2-pass encoding (specify flags=+pass1 in the first pass's -ovcopts, specify flags=+pass2 in the second pass) * Hardcoding subtitles using vobsub, ass or srt subtitle rendering (just configure mpv for the subtitles as usual) * Hardcoding any other mpv OSD (e.g. time codes, using -osdlevel 3 and -vf expand=::::1) * Encoding directly from a DVD, network stream, webcam, or any other source mpv supports * Using x264 presets/tunings/profiles (by using profile=, tune=, preset= in the -ovcopts) * Deinterlacing/Inverse Telecine with any of mpv's filters for that * Audio file converting: mpv -o outfile.mp3 infile.flac -no-video -oac libmp3lame -oacopts ab=320k What does not work yet ====================== * 3-pass encoding (ensuring constant total size and bitrate constraints while having VBR audio; mencoder calls this "frameno") * Direct stream copy mpv-0.32.0/DOCS/interface-changes.rst000066400000000000000000001244501361337347200172450ustar00rootroot00000000000000Introduction ============ mpv provides access to its internals via the following means: - options - commands - properties - events - hooks The sum of these mechanisms is sometimes called command interface. All of these are important for interfacing both with end users and API users (which include Lua scripts, libmpv, and the JSON IPC). As such, they constitute a large part of the user interface and APIs. Also see compatibility.rst. This document lists changes to them. New changes are added to the top. Interface changes ================= :: --- mpv 0.32.0 --- - change behavior when using legacy option syntax with options that start with two dashes (``--`` instead of a ``-``). Now, using the recommended syntax is required for options starting with ``--``, which means an option value must be strictly passed after a ``=``, instead of as separate argument. For example, ``--log-file f.txt`` was previously accepted and behaved like ``--log-file=f.txt``, but now causes an error. Use of legacy syntax that is still supported now prints a deprecation warning. --- mpv 0.31.0 --- - add `--resume-playback-check-mtime` to check consistent mtime when restoring playback state. - add `--d3d11-output-csp` to enable explicit selection of a D3D11 swap chain color space. - the --sws- options and similar now affect vo_image and screenshot conversion (does not matter as much for vo_gpu, which does most of this with shaders) - add a builtin "sw-fast" profile, which restores performance settings for software video conversion. These were switched to higher quality since mpv 0.30.0 (related to the previous changelog entry). This affects video outputs like vo_x11 and vo_drm, and screenshots, but not much else. - deprecate --input-file (there are no plans to remove this short-term, but it will probably eventually go away) - deprecate --video-sync=display-adrop (might be removed if it's in the way; undeprecated or readded if it's not too much of a problem) - deprecate all input section commands (these will be changed/removed, as soon as mpv internals do not require them anymore) - remove deprecated --playlist-pos alias (use --playlist-start) - deprecate --display-fps, introduce --override-display-fps. The display-fps property now is unavailable if no VO exists (or the VO did not return a display FPS), instead of returning the option value in this case. The property will keep existing, but writing to it is deprecated. - the vf/af properties now do not reject the set value anymore, even if filter chain initialization fails. Instead, the vf/af options are always set to the user's value, even if it does not reflect the "runtime" vf/af chain. - the vid/aid/sid/secondary-sid properties (and their aliases: "audio", "video", "sub") will now allow setting any track ID; before this change, only IDs of actually existing tracks could be set (the restriction was active the MPV_EVENT_FILE_LOADED/"file-loaded" event was sent). Setting an ID for which no track exists is equivalent to disabling it. Note that setting the properties to non-existing tracks may report it as selected track for a small time window, until it's forced back to "no". The exact details how this is handled may change in the future. - remove old Apple Remote support, including --input-appleremote - add MediaPlayer support and remove the old Media Key event tap on macOS. this possibly also re-adds the Apple Remote support - the "edition" property now strictly returns the value of the option, instead of the runtime value. The new "current-edition" property needs to be queried to read the runtime-chosen edition. This is a breaking change for any users which expected "edition" to return the runtime-chosen edition at default settings (--edition=auto). - the "window-scale" property now strictly returns the value of the option, instead of the actual size of the window. The new "current-window-scale" property needs to be queried to read the value as indicated by the current window size. This is a breaking change. - explicitly deprecate passing more than 1 item to "-add" suffix in key/value options (for example --script-opts-add). This was actually always deprecated, like with other list options, but the option parser did not print a warning in this particular case. - deprecate -del for list options (use -remove instead, which is by content instead of by integer index) - if `--fs` is used but `--fs-screen` is not set, mpv will now use `--screen` instead. - change the default of --hwdec to "no" on RPI. The default used to be "mmal" specifically if 'Raspberry Pi support' was enabled at configure time (equivalent to --enable-rpi). Use --hwdec=mmal to get the old behavior. --- mpv 0.30.0 --- - add `--d3d11-output-format` to enable explicit selection of a D3D11 swap chain format. - rewrite DVB channel switching to use an integer value `--dvbin-channel-switch-offset` for switching instead of the old stream controls which are now gone. Cycling this property up or down will change the offset to the channel which was initially tuned to. Example for `input.conf`: `H cycle dvbin-channel-switch-offset up`, `K cycle dvbin-channel-switch-offset down`. - adapt `stream_dvb` to support writing to `dvbin-prog` at runtime and also to consistently use dvbin-configuration over URI parameters when provided - add `--d3d11-adapter` to enable explicit selection of a D3D11 rendering adapter by name. - rename `--drm-osd-plane-id` to `--drm-draw-plane`, `--drm-video-plane-id` to `--drm-drmprime-video-plane` and `--drm-osd-size` to `--drm-draw-surface-size` to better reflect what the options actually control, that the values they accept aren't actually internal DRM ID's (like with similar options in ffmpeg's KMS support), and that the video plane is only used when the drmprime overlay hwdec interop is active, with the video being drawn to the draw plane otherwise. - in addition to the above, the `--drm-draw-plane` and `--drm-drmprime-video-plane` options now accept either an integer index, or the values primary or overlay. `--drm-draw-plane` now defaults to primary and `--drm-drmprime-video-plane` defaults to overlay. This should be similar to previous behavior on most drivers due to how planes are usually sorted. - rename --opensles-frames-per-buffer to --opensles-frames-per-enqueue to better reflect its purpose. In the past it overrides the buffer size the AO requests (but not the default/value of the generic --audio-buffer option). Now it only guarantees that the soft buffer size will not be smaller than itself while setting the size per Enqueue. - add --opensles-buffer-size-in-ms, allowing user to tune the soft buffer size. It overrides the --audio-buffer option unless it's set to 0 (with the default being 250). - remove `--linear-scaling`, replaced by `--linear-upscaling` and `--linear-downscaling`. This means that `--sigmoid-upscaling` no longer implies linear light downscaling as well, which was confusing. - the built-in `gpu-hq` profile now includes` --linear-downscaling`. - support for `--spirv-compiler=nvidia` has been removed, leaving `shaderc` as the only option. The `--spirv-compiler` option itself has been marked as deprecated, and may be removed in the future. - split up `--tone-mapping-desaturate`` into strength + exponent, instead of only using a single value (which previously just controlled the exponent). The strength now linearly blends between the linear and nonlinear tone mapped versions of a color. - add --hdr-peak-decay-rate and --hdr-scene-threshold-low/high - add --tone-mapping-max-boost - ipc: require that "request_id" fields are integers. Other types are still accepted for compatibility, but this will stop in the future. Also, if no request_id is provided, 0 will be assumed. - mpv_command_node() and mp.command_native() now support named arguments (see manpage). If you want to use them, use a new version of the manpage as reference, which lists the definitive names. - edition and disc title switching will now fully reload playback (may have consequences for scripts, client API, or when using file-local options) - with the removal of the stream cache, the following properties and options were dropped: `cache`, `cache-size`, `cache-free`, `cache-used`, `--cache-default`, `--cache-initial`, `--cache-seek-min`, `--cache-backbuffer`, `--cache-file`, `--cache-file-size` - the --cache option does not take a number value anymore - remove async playback abort hack. This may make it impossible to abort playback if --demuxer-thread=no is forced. - remove `--macos-title-bar-style`, replaced by `--macos-title-bar-material` and `--macos-title-bar-appearance`. - The default for `--vulkan-async-compute` has changed to `yes` from `no` with the move to libplacebo as the back-end for vulkan rendering. - Remove "disc-titles", "disc-title", "disc-title-list", and "angle" properties. dvd:// does not support title ranges anymore. - Remove all "tv-..." options and properties, along with the classic Linux analog TV support. - remove "program" property (no replacement) - always prefer EGL over GLX, which helps with AMD/vaapi, but will break vdpau with --vo=gpu - use --gpu-context=x11 to be able to use vdpau. This does not affect --vo=vdpau or --hwdec=vdpau-copy. - remove deprecated --chapter option - deprecate --record-file - add `--demuxer-cue-codepage` - add ``track-list/N/demux-bitrate``, ``track-list/N/demux-rotation`` and ``track-list/N/demux-par`` property - Deprecate ``--video-aspect`` and add ``--video-aspect-override`` to replace it. (The `video-aspect` option remains unchanged.) --- mpv 0.29.0 --- - drop --opensles-sample-rate, as --audio-samplerate should be used if desired - drop deprecated --videotoolbox-format, --ff-aid, --ff-vid, --ff-sid, --ad-spdif-dtshd, --softvol options - fix --external-files: strictly never select any tracks from them, unless explicitly selected (this may or may not be expected) - --ytdl is now always enabled, even for libmpv - add a number of --audio-resample-* options, which should from now on be used instead of --af-defaults=lavrresample:... - deprecate --vf-defaults and --af-defaults. These didn't work with the lavfi bridge, so they have very little use left. The only potential use is with af_lavrresample (going to be deprecated, --audio-resample-... set its defaults), and various hw deinterlacing filters (like vf_vavpp), for which you will have to stop using --deinterlace=yes, and instead use the vf toggle commands and the filter enable/disable flag to customize it. - deprecate --af=lavrresample. Use the ``--audio-resample-...`` options to customize resampling, or the libavfilter ``--af=aresample`` filter. - add --osd-on-seek - remove outfmt sub-parameter from "format" video filter (no replacement) - some behavior changes in the video filter chain, including: - before, using an incompatible filter with hwdec would disable hwdec; now it disables the filter at runtime instead - inserting an incompatible filter with hwdec at runtime would refuse to insert the filter; now it will add it successfully, but disables the filter slightly later - some behavior changes in the audio filter chain, including: - a manually inserted lavrresample filter is not necessarily used for sample format conversion anymore, so it's pretty useless - changing playback speed will not respect --af-defaults anymore - having libavfilter based filters after the scaletempo or rubberband filters is not supported anymore, and may desync if playback speed is changed (libavfilter does not support the metadata for playback speed) - the lavcac3enc filter does not auto detach itself anymore; instead it passes through the data after converting it to the sample rate and channel configuration the ac3 encoder expects; also, if the audio format changes midstream in a way that causes the filter to switch between PCM and AC3 output, the audio output won't be reconfigured, and audio playback will fail due to libswresample being unable to convert between PCM and AC3 (Note: the responsible developer didn't give a shit. Later changes might have improved or worsened this.) - inserting a filter that changes the output sample format will not reconfigure the AO - you need to run an additional "ao-reload" command to force this if you want that - using "strong" gapless audio (--gapless-audio=yes) can fail if the audio formats are not convertible (such as switching between PCM and AC3 passthrough) - if filters do not pass through PTS values correctly, A/V sync can result over time. Some libavfilter filters are known to be affected by this, such as af_loudnorm, which can desync over time, depending on how the audio track was muxed (af_lavfi's fix-pts suboption can help). - remove out-format sub-parameter from "format" audio filter (no replacement) - --lavfi-complex now requires uniquely named filter pads. In addition, unconnected filter pads are not allowed anymore (that means every filter pad must be connected either to another filter, or to a video/audio track or video/audio output). If they are disconnected at runtime, the stream will probably stall. - rename --vo=opengl-cb to --vo=libmpv (goes in hand with the opengl-cb API deprecation, see client-api-changes.rst) - deprecate the OpenGL cocoa backend, option choice --gpu-context=cocoa when used with --gpu-api=opengl (use --vo=libmpv) - make --deinterlace=yes always deinterlace, instead of trying to check certain unreliable video metadata. Also flip the defaults of all builtin HW deinterlace filters to always deinterlace. - change vf_vavpp default to use the best deinterlace algorithm by default - remove a compatibility hack that allowed CLI aliases to be set as property (such as "sub-file"), deprecated in mpv 0.26.0 - deprecate the old command based hook API, and introduce a proper C API (the high level Lua API for this does not change) - rename the the lua-settings/ config directory to script-opts/ - the way the player waits for scripts getting loaded changes slightly. Now scripts are loaded in parallel, and block the player from continuing playback only in the player initialization phase. It could change again in the future. (This kind of waiting was always a feature to prevent that playback is started while scripts are only half-loaded.) - deprecate --ovoffset, --oaoffset, --ovfirst, --oafirst - remove the following encoding options: --ocopyts (now the default, old timestamp handling is gone), --oneverdrop (now default), --oharddup (you need to use --vf=fps=VALUE), --ofps, --oautofps, --omaxfps - remove --video-stereo-mode. This option was broken out of laziness, and nobody wants to fix it. Automatic 3D down-conversion to 2D is also broken, although you can just insert the stereo3d filter manually. The obscurity of 3D content doesn't justify such an option anyway. - change cycle-values command to use the current value, instead of an internal counter that remembered the current position. - remove deprecated ao/vo auto profiles. Consider using scripts like auto-profiles.lua instead. - --[c]scale-[w]param[1|2] and --tone-mapping-param now accept "default", and if set to that value, reading them as property will also return "default", instead of float nan as in previous versions --- mpv 0.28.0 --- - rename --hwdec=mediacodec option to mediacodec-copy, to reflect conventions followed by other hardware video decoding APIs - drop previously deprecated --heartbeat-cmd and --heartbeat--interval options - rename --vo=opengl to --vo=gpu - rename --opengl-backend to --gpu-context - rename --opengl-shaders to --glsl-shaders - rename --opengl-shader-cache-dir to --gpu-shader-cache-dir - rename --opengl-tex-pad-x/y to --gpu-tex-pad-x/y - rename --opengl-fbo-format to --fbo-format - rename --opengl-gamma to --gamma-factor - rename --opengl-debug to --gpu-debug - rename --opengl-sw to --gpu-sw - rename --opengl-vsync-fences to --swapchain-depth, and the interpretation slightly changed. Now defaults to 3. - rename the built-in profile `opengl-hq` to `gpu-hq` - the semantics of --opengl-es=yes are slightly changed -> now requires GLES - remove the (deprecated) alias --gpu-context=drm-egl - remove the (deprecated) --vo=opengl-hq - remove --opengl-es=force2 (use --opengl-es=yes --opengl-restrict=300) - the --msg-level option now affects --log-file - drop "audio-out-detected-device" property - this was unavailable on all audio output drivers for quite a while (coreaudio used to provide it) - deprecate --videotoolbox-format (use --hwdec-image-format, which affects most other hwaccels) - remove deprecated --demuxer-max-packets - remove most of the deprecated audio and video filters - remove the deprecated --balance option/property - rename the --opengl-hwdec-interop option to --gpu-hwdec-interop, and change some of its semantics: extend it take the strings "auto" and "all". "all" loads all backends. "auto" behaves like "all" for vo_opengl_cb, while on vo_gpu it loads nothing, but allows on demand loading by the decoder. The empty string as option value behaves like "auto". Old --hwdec values do not work anymore. This option is hereby declared as unstable and may change any time - its old use is deprecated, and it has very little use outside of debugging now. - change the --hwdec option from a choice to a plain string (affects introspection of the option/property), also affects some properties - rename --hwdec=rpi to --hwdec=mmal, same for the -copy variant (no backwards compatibility) - deprecate the --ff-aid, --ff-vid, --ff-sid options and properties (there is no replacement, but you can manually query the track property and use the "ff-index" field to find the mpv track ID to imitate this behavior) - rename --no-ometadata to --no-ocopy-metadata --- mpv 0.27.0 --- - drop previously deprecated --field-dominance option - drop previously deprecated "osd" command - remove client API compatibility handling for "script", "sub-file", "audio-file", "external-file" (these cases used to log a deprecation warning) - drop deprecated --video-aspect-method=hybrid option choice - rename --hdr-tone-mapping to --tone-mapping (and generalize it) - --opengl-fbo-format changes from a choice to a string. Also, its value will be checked only on renderer initialization, rather than when the option is set. - Using opengl-cb now always assumes 8 bit per component depth, and dithers to this size. Before, it tried to figure out the depth of the first framebuffer that was ever passed to the renderer. Having GL framebuffers with a size larger than 8 bit per component is quite rare. If you need it, set the --dither-depth option instead. - --lavfi-complex can now be set during runtime. If you set this in expectation it would be applied only after a reload, you might observe weird behavior. - add --track-auto-selection to help with scripts/applications that make exclusive use of --lavfi-complex. - undeprecate --loop, and map it from --loop-playlist to --loop-file (the deprecation was to make sure no API user gets broken by a sudden behavior change) - remove previously deprecated vf_eq - remove that hardware deinterlace filters (vavpp, d3d11vpp, vdpaupp) changed their deinterlacing-enabled setting depending on what the --deinterlace option or property was set to. Now, a filter always does what its filter options and defaults imply. The --deinterlace option and property strictly add/remove its own filters. For example, if you run "mpv --vf=vavpp --deinterlace=yes", this will insert another, redundant filter, which is probably not what you want. For toggling a deinterlace filter manually, use the "vf toggle" command, and do not set the deinterlace option/property. To customize the filter that will be inserted automatically, use --vf-defaults. Details how this works will probably change in the future. - remove deinterlace=auto (this was not deprecated, but had only a very obscure use that stopped working with the change above. It was also prone to be confused with a feature not implemented by it: auto did _not_ mean that deinterlacing was enabled on demand.) - add shortened mnemonic names for mouse button bindings, eg. mbtn_left the old numeric names (mouse_btn0) are deprecated - remove mouse_btn3_dbl and up, since they are only generated for buttons 0-2 (these now print an error when sent from the 'mouse' command) - rename the axis bindings to wheel_up/down/etc. axis scrolling and mouse wheel scrolling are now conceptually the same thing the old axis_up/down names remain as deprecated aliases --- mpv 0.26.0 --- - remove remaining deprecated audio device options, like --alsa-device Some of them were removed in earlier releases. - introduce --replaygain... options, which replace the same functionality provided by the deprecated --af=volume:replaygain... mechanism. - drop the internal "mp-rawvideo" codec (used by --demuxer=rawvideo) - rename --sub-ass-style-override to --sub-ass-override, and rename the `--sub-ass-override=signfs` setting to `--sub-ass-override=scale`. - change default of --video-aspect-method to "bitstream". The "hybrid" method (old default) is deprecated. - remove property "video-params/nom-peak" - remove option --target-brightness - replace vf_format's `peak` suboption by `sig-peak`, which is relative to the reference white level instead of in cd/m^2 - renamed the TRCs `st2084` and `std-b67` to `pq` and `hlg` respectively - the "osd" command is deprecated (use "cycle osd-level") - --field-dominance is deprecated (use --vf=setfield=bff or tff) - --really-quiet subtle behavior change - the deprecated handling of setting "no-" options via client API is dropped - the following options change to append-by-default (and possibly separator): --script also, the following options are deprecated: --sub-paths => --sub-file-paths the following options are deprecated for setting via API: "script" (use "scripts") "sub-file" (use "sub-files") "audio-file" (use "audio-files") "external-file" (use "external-files") (the compatibility hacks for this will be removed after this release) - remove property `vo-performance`, and add `vo-passes` as a more general replacement - deprecate passing multiple arguments to -add/-pre options (affects the vf/af commands too) - remove --demuxer-lavf-cryptokey. Use --demux-lavf-o=cryptokey= or --demux-lavf-o=decryption_key= instead (whatever fits your situation). - rename --opengl-dumb-mode=no to --opengl-dumb-mode=auto, and make `no` always disable it (unless forced on by hardware limitation). - generalize --scale-clamp, --cscale-clamp etc. to accept a float between 0.0 and 1.0 instead of just being a flag. A value of 1.0 corresponds to the old `yes`, and a value of 0.0 corresponds to the old `no`. --- mpv 0.25.0 --- - remove opengl-cb dxva2 dummy hwdec interop (see git "vo_opengl: remove dxva2 dummy hwdec backend") - remove ppm, pgm, pgmyuv, tga choices from the --screenshot-format and --vo-image-format options - the "jpeg" choice in the option above now leads to a ".jpg" file extension - --af=drc is gone (you can use e.g. lavfi/acompressor instead) - remove image_size predefined uniform from OpenGL user shaders. Use input_size instead - add --sub-filter-sdh - add --sub-filter-sdh-harder - remove --input-app-events option (macOS) - deprecate most --vf and --af filters. Only some filters not in libavfilter will be kept. Also, you can use libavfilter filters directly (e.g. you can use --vf=name=opts instead of --vf=lavfi=[name=opts]), as long as the libavfilter filter's name doesn't clash with a mpv builtin filter. In the long term, --vf/--af syntax might change again, but if it does, it will switch to libavfilter's native syntax. (The above mentioned direct support for lavfi filters still has some differences, such as how strings are escaped.) If this happens, the non-deprecated builtin filters might be moved to "somewhere else" syntax-wise. - deprecate --loop - after a deprecation period, it will be undeprecated, but changed to alias --loop-file - add --keep-open-pause=no - deprecate --demuxer-max-packets - change --audio-file-auto default from "exact" to "no" (mpv won't load files with the same filename as the video, but different extension, as audio track anymore) --- mpv 0.24.0 --- - deprecate --hwdec-api and replace it with --opengl-hwdec-interop. The new option accepts both --hwdec values, as well as named backends. A minor difference is that --hwdec-api=no (which used to be the default) now actually does not preload any interop layer, while the new default ("") uses the value of --hwdec. - drop deprecated --ad/--vd features - drop deprecated --sub-codepage syntax - rename properties: - "drop-frame-count" to "decoder-frame-drop-count" - "vo-drop-frame-count" to "frame-drop-count" The old names still work, but are deprecated. - remove the --stream-capture option and property. No replacement. (--record-file might serve as alternative) - add --sub-justify - add --sub-ass-justify - internally there's a different way to enable the demuxer cache now it can be auto-enabled even if the stream cache remains disabled --- mpv 0.23.0 --- - remove deprecated vf_vdpaurb (use "--hwdec=vdpau-copy" instead) - the following properties now have new semantics: - "demuxer" (use "current-demuxer") - "fps" (use "container-fps") - "idle" (use "idle-active") - "cache" (use "cache-percent") - "audio-samplerate" (use "audio-params/samplerate") - "audio-channels" (use "audio-params/channel-count") - "audio-format" (use "audio-codec-name") (the properties equivalent to the old semantics are in parentheses) - remove deprecated --vo and --ao sub-options (like --vo=opengl:...), and replace them with global options. A somewhat complete list can be found here: https://github.com/mpv-player/mpv/wiki/Option-replacement-list#mpv-0210 - remove --vo-defaults and --ao-defaults as well - remove deprecated global sub-options (like -demuxer-rawaudio format=...), use flat options (like --demuxer-rawaudio-format=...) - the --sub-codepage option changes in incompatible ways: - detector-selection and fallback syntax is deprecated - enca/libguess are removed and deprecated (behaves as if they hadn't been compiled-in) - --sub-codepage= does not force the codepage anymore (this requires different and new syntax) - remove --fs-black-out-screens option for macOS - change how spdif codecs are selected. You can't enable spdif passthrough with --ad anymore. This was deprecated; use --audio-spdif instead. - deprecate the "family" selection with --ad/--vd forcing/excluding codecs with "+", "-", "-" is deprecated as well - explicitly mark --ad-spdif-dtshd as deprecated (it was done so a long time ago, but it didn't complain when using the option) --- mpv 0.22.0 --- - the "audio-device-list" property now sets empty device description to the device name as a fallback - add --hidpi-window-scale option for macOS - add audiounit audio output for iOS - make --start-time work with --rebase-start-time=no - add --opengl-early-flush=auto mode - add --hwdec=vdpau-copy, deprecate vf_vdpaurb - add tct video output for true-color and 256-color terminals --- mpv 0.21.0 --- - unlike in older versions, setting options at runtime will now take effect immediately (see for example issue #3281). On the other hand, it will also do runtime verification and reject option changes that do not work (example: setting the "vf" option to a filter during playback, which fails to initialize - the option value will remain at its old value). In general, "set name value" should be mostly equivalent to "set options/name value" in cases where the "name" property is not deprecated and "options/name" exists - deviations from this are either bugs, or documented as caveats in the "Inconsistencies between options and properties" manpage section. - deprecate _all_ --vo and --ao suboptions. Generally, all suboptions are replaced by global options, which do exactly the same. For example, "--vo=opengl:scale=nearest" turns into "--scale=nearest". In some cases, the global option is prefixed, e.g. "--vo=opengl:pbo" turns into "--opengl-pbo". Most of the exact replacements are documented here: https://github.com/mpv-player/mpv/wiki/Option-replacement-list - remove --vo=opengl-hq. Set --profile=opengl-hq instead. Note that this profile does not force the VO. This means if you use the --vo option to set another VO, it won't work. But this also means it can be used with opengl-cb. - remove the --vo=opengl "pre-shaders", "post-shaders" and "scale-shader" sub-options: they were deprecated in favor of "user-shaders" - deprecate --vo-defaults (no replacement) - remove the vo-cmdline command. You can set OpenGL renderer options directly via properties instead. - deprecate the device/sink options on all AOs. Use --audio-device instead. - deprecate "--ao=wasapi:exclusive" and "--ao=coreaudio:exclusive", use --audio-exclusive instead. - subtle changes in how "--no-..." options are treated mean that they are not accessible under "options/..." anymore (instead, these are resolved at parsing time). This does not affect options which start with "--no-", but do not use the mechanism for negation options. (Also see client API change for API version 1.23.) - rename the following properties - "demuxer" -> "current-demuxer" - "fps" -> "container-fps" - "idle" -> "idle-active" - "cache" -> "cache-percent" the old names are deprecated and will change behavior in mpv 0.23.0. - remove deprecated "hwdec-active" and "hwdec-detected" properties - deprecate the ao and vo auto-profiles (they never made any sense) - deprecate "--vo=direct3d_shaders" - use "--vo=direct3d" instead. Change "--vo=direct3d" to always use shaders by default. - deprecate --playlist-pos option, renamed to --playlist-start - deprecate the --chapter option, as it is redundant with --start/--end, and conflicts with the semantics of the "chapter" property - rename --sub-text-* to --sub-* and --ass-* to --sub-ass-* (old options deprecated) - incompatible change to cdda:// protocol options: the part after cdda:// now always sets the device, not the span or speed to be played. No separating extra "/" is needed. The hidden --cdda-device options is also deleted (it was redundant with the documented --cdrom-device). - deprecate --vo=rpi. It will be removed in mpv 0.23.0. Its functionality was folded into --vo=opengl, 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). - deprecate --mute=auto (informally has been since 0.18.1) - deprecate "resume" and "suspend" IPC commands. They will be completely removed in 0.23.0. - deprecate mp.suspend(), mp.resume(), mp.resume_all() Lua scripting commands, as well as setting mp.use_suspend. They will be completely removed in 0.23.0. - the "seek" command's absolute seek mode will now interpret negative seek times as relative from the end of the file (and clamps seeks that still go before 0) - add almost all options to the property list, meaning you can change options without adding "options/" to the property name (a new section has been added to the manpage describing some conflicting behavior between options and properties) - implement changing sub-speed during playback - make many previously fixed options changeable at runtime (for example --terminal, --osc, --ytdl, can all be enable/disabled after mpv_initialize() - this can be extended to other still fixed options on user requests) --- mpv 0.20.0 --- - add --image-display-duration option - this also means that image duration is not influenced by --mf-fps anymore in the general case (this is an incompatible change) --- mpv 0.19.0 --- - deprecate "balance" option/property (no replacement) --- mpv 0.18.1 --- - deprecate --heartbeat-cmd - remove --softvol=no capability: - deprecate --softvol, it now does nothing - --volume, --mute, and the corresponding properties now always control softvol, and behave as expected without surprises (e.g. you can set them normally while no audio is initialized) - rename --softvol-max to --volume-max (deprecated alias is added) - the --volume-restore-data option and property are removed without replacement. They were _always_ internal, and used for watch-later resume/restore. Now --volume/--mute are saved directly instead. - the previous point means resuming files with older watch-later configs will print an error about missing --volume-restore-data (which you can ignore), and will not restore the previous value - as a consequence, volume controls will no longer control PulseAudio per-application value, or use the system mixer's per-application volume processing - system or per-application volume can still be controlled with the ao-volume and ao-mute properties (there are no command line options) --- mpv 0.18.0 --- - now ab-loops are active even if one of the "ab-loop-a"/"-b" properties is unset ("no"), in which case the start of the file is used if the A loop point is unset, and the end of the file for an unset B loop point - deprecate --sub-ass=no option by --ass-style-override=strip (also needs --embeddedfonts=no) - add "hwdec-interop" and "hwdec-current" properties - deprecated "hwdec-active" and "hwdec-detected" properties (to be removed in mpv 0.20.0) - choice option/property values that are "yes" or "no" will now be returned as booleans when using the mpv_node functions in the client API, the "native" property accessors in Lua, and the JSON API. They can be set as such as well. - the VO opengl fbo-format sub-option does not accept "rgb" or "rgba" anymore - all VO opengl prescalers have been removed (replaced by user scripts) --- mpv 0.17.0 --- - deprecate "track-list/N/audio-channels" property (use "track-list/N/demux-channel-count" instead) - remove write access to "stream-pos", and change semantics for read access - Lua scripts now don't suspend mpv by default while script code is run - add "cache-speed" property - rename --input-unix-socket to --input-ipc-server, and make it work on Windows too - change the exact behavior of the "video-zoom" property - --video-unscaled no longer disables --video-zoom and --video-aspect To force the old behavior, set --video-zoom=0 and --video-aspect=0 --- mpv 0.16.0 --- - change --audio-channels default to stereo (use --audio-channels=auto to get the old default) - add --audio-normalize-downmix - change the default downmix behavior (--audio-normalize-downmix=yes to get the old default) - VO opengl custom shaders must now use "sample_pixel" as function name, instead of "sample" - change VO opengl scaler-resizes-only default to enabled - add VO opengl "interpolation-threshold" suboption (introduces new default behavior, which can change e.g. ``--video-sync=display-vdrop`` to the worse, but is usually what you want) - make "volume" and "mute" properties changeable even if no audio output is active (this gives not-ideal behavior if --softvol=no is used) - add "volume-max" and "mixer-active" properties - ignore --input-cursor option for events injected by input commands like "mouse", "keydown", etc. --- mpv 0.15.0 --- - change "yadif" video filter defaults --- mpv 0.14.0 --- - vo_opengl interpolation now requires --video-sync=display-... to be set - change some vo_opengl defaults (including changing tscale) - add "vsync-ratio", "estimated-display-fps" properties - add --rebase-start-time option This is a breaking change to start time handling. Instead of making start time handling an aspect of different options and properties (like "time-pos" vs. "playback-time"), make it dependent on the new option. For compatibility, the "time-start" property now always returns 0, so code which attempted to handle rebasing manually will not break. --- mpv 0.13.0 --- - remove VO opengl-cb frame queue suboptions (no replacement) --- mpv 0.12.0 --- - remove --use-text-osd (useless; fontconfig isn't a requirement anymore, and text rendering is also lazily initialized) - some time properties (at least "playback-time", "time-pos", "time-remaining", "playtime-remaining") now are unavailable if the time is unknown, instead of just assuming that the internal playback position is 0 - add --audio-fallback-to-null option - replace vf_format outputlevels suboption with "video-output-levels" global property/option; also remove "colormatrix-output-range" property - vo_opengl: remove sharpen3/sharpen5 scale filters, add sharpen sub-option --- mpv 0.11.0 --- - add "af-metadata" property --- mpv 0.10.0 --- - add --video-aspect-method option - add --playlist-pos option - add --video-sync* options "display-sync-active" property "vo-missed-frame-count" property "audio-speed-correction" and "video-speed-correction" properties - remove --demuxer-readahead-packets and --demuxer-readahead-bytes add --demuxer-max-packets and --demuxer-max-bytes (the new options are not replacement and have very different semantics) - change "video-aspect" property: always settable, even if no video is running; always return the override - if no override is set, return the video's aspect ratio - remove disc-nav (DVD, BD) related properties and commands - add "option-info//set-locally" property - add --cache-backbuffer; change --cache-default default to 75MB the new total cache size is the sum of backbuffer and the cache size specified by --cache-default or --cache - add ``track-list/N/audio-channels`` property - change --screenshot-tag-colorspace default value - add --stretch-image-subs-to-screen - add "playlist/N/title" property - add --video-stereo-mode=no to disable auto-conversions - add --force-seekable, and change default seekability in some cases - add vf yadif/vavpp/vdpaupp interlaced-only suboptions Also, the option is enabled by default (Except vf_yadif, which has it enabled only if it's inserted by the deinterlace property.) - add --hwdec-preload - add ao coreaudio exclusive suboption - add ``track-list/N/forced`` property - add audio-params/channel-count and ``audio-params-out/channel-count props. - add af volume replaygain-fallback suboption - add video-params/stereo-in property - add "keypress", "keydown", and "keyup" commands - deprecate --ad-spdif-dtshd and enabling passthrough via --ad add --audio-spdif as replacement - remove "get_property" command - remove --slave-broken - add vo opengl custom shader suboptions (source-shader, scale-shader, pre-shaders, post-shaders) - completely change how the hwdec properties work: - "hwdec" now reflects the --hwdec option - "hwdec-detected" does partially what the old "hwdec" property did (and also, "detected-hwdec" is removed) - "hwdec-active" is added - add protocol-list property - deprecate audio-samplerate and audio-channels properties (audio-params sub-properties are the replacement) - add audio-params and audio-out-params properties - deprecate "audio-format" property, replaced with "audio-codec-name" - deprecate --media-title, replaced with --force-media-title - deprecate "length" property, replaced with "duration" - change volume property: - the value 100 is now always "unchanged volume" - with softvol, the range is 0 to --softvol-max, without it is 0-100 - the minimum value of --softvol-max is raised to 100 - remove vo opengl npot suboption - add relative seeking by percentage to "seek" command - add playlist_shuffle command - add --force-window=immediate - add ao coreaudio change-physical-format suboption - remove vo opengl icc-cache suboption, add icc-cache-dir suboption - add --screenshot-directory - add --screenshot-high-bit-depth - add --screenshot-jpeg-source-chroma - default action for "rescan_external_files" command changes --- mpv 0.9.0 --- mpv-0.32.0/DOCS/man/000077500000000000000000000000001361337347200137125ustar00rootroot00000000000000mpv-0.32.0/DOCS/man/af.rst000066400000000000000000000221461361337347200150370ustar00rootroot00000000000000AUDIO FILTERS ============= Audio filters allow you to modify the audio stream and its properties. The syntax is: ``--af=...`` Setup a chain of audio filters. See ``--vf`` (`VIDEO FILTERS`_) for the full syntax. .. note:: To get a full list of available audio filters, see ``--af=help``. Also, keep in mind that most actual filters are available via the ``lavfi`` wrapper, which gives you access to most of libavfilter's filters. This includes all filters that have been ported from MPlayer to libavfilter. The ``--vf`` description describes how libavfilter can be used and how to workaround deprecated mpv filters. See ``--vf`` group of options for info on how ``--af-defaults``, ``--af-add``, ``--af-pre``, ``--af-del``, ``--af-clr``, and possibly others work. Available filters are: ``lavcac3enc[=options]`` Encode multi-channel audio to AC-3 at runtime using libavcodec. Supports 16-bit native-endian input format, maximum 6 channels. The output is big-endian when outputting a raw AC-3 stream, native-endian when outputting to S/PDIF. If the input sample rate is not 48 kHz, 44.1 kHz or 32 kHz, it will be resampled to 48 kHz. ``tospdif=`` Output raw AC-3 stream if ``no``, output to S/PDIF for pass-through if ``yes`` (default). ``bitrate=`` The bitrate use for the AC-3 stream. Set it to 384 to get 384 kbps. The default is 640. Some receivers might not be able to handle this. Valid values: 32, 40, 48, 56, 64, 80, 96, 112, 128, 160, 192, 224, 256, 320, 384, 448, 512, 576, 640. The special value ``auto`` selects a default bitrate based on the input channel number: :1ch: 96 :2ch: 192 :3ch: 224 :4ch: 384 :5ch: 448 :6ch: 448 ``minch=`` If the input channel number is less than ````, the filter will detach itself (default: 3). ``encoder=`` Select the libavcodec encoder used. Currently, this should be an AC-3 encoder, and using another codec will fail horribly. ``format=format:srate:channels:out-srate:out-channels`` 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 going into other filters. To specify the format for audio output, see ``--audio-format``, ``--audio-samplerate``, and ``--audio-channels``. This filter is able to force a particular format, whereas ``--audio-*`` may be overridden by the ao based on output compatibility. All parameters are optional. The first 3 parameters restrict what the filter accepts as input. They will therefore cause conversion filters to be inserted before this one. The ``out-`` parameters tell the filters or audio outputs following this filter how to interpret the data without actually doing a conversion. Setting these will probably just break things unless you really know you want this for some reason, such as testing or dealing with broken media. ```` Force conversion to this format. Use ``--af=format=format=help`` to get a list of valid formats. ```` Force conversion to a specific sample rate. The rate is an integer, 48000 for example. ```` Force mixing to a specific channel layout. See ``--audio-channels`` option for possible values. ```` ```` *NOTE*: this filter used to be named ``force``. The old ``format`` filter used to do conversion itself, unlike this one which lets the filter system handle the conversion. ``scaletempo[=option1:option2:...]`` Scales audio tempo without altering pitch, optionally synced to playback speed (default). This works by playing 'stride' ms of audio at normal speed then consuming 'stride*scale' ms of input audio. It pieces the strides together by blending 'overlap'% of stride with audio following the previous stride. It optionally performs a short statistical analysis on the next 'search' ms of audio to determine the best overlap position. ``scale=`` Nominal amount to scale tempo. Scales this amount in addition to speed. (default: 1.0) ``stride=`` Length in milliseconds to output each stride. Too high of a value will cause noticeable skips at high scale amounts and an echo at low scale amounts. Very low values will alter pitch. Increasing improves performance. (default: 60) ``overlap=`` Percentage of stride to overlap. Decreasing improves performance. (default: .20) ``search=`` Length in milliseconds to search for best overlap position. Decreasing improves performance greatly. On slow systems, you will probably want to set this very low. (default: 14) ``speed=`` Set response to speed change. tempo Scale tempo in sync with speed (default). pitch Reverses effect of filter. Scales pitch without altering tempo. Add this to your ``input.conf`` to step by musical semi-tones:: [ multiply speed 0.9438743126816935 ] multiply speed 1.059463094352953 .. warning:: Loses sync with video. both Scale both tempo and pitch. none Ignore speed changes. .. admonition:: Examples ``mpv --af=scaletempo --speed=1.2 media.ogg`` Would play media at 1.2x normal speed, with audio at normal pitch. Changing playback speed would change audio tempo to match. ``mpv --af=scaletempo=scale=1.2:speed=none --speed=1.2 media.ogg`` Would play media at 1.2x normal speed, with audio at normal pitch, but changing playback speed would have no effect on audio tempo. ``mpv --af=scaletempo=stride=30:overlap=.50:search=10 media.ogg`` Would tweak the quality and performance parameters. ``mpv --af=scaletempo=scale=1.2:speed=pitch audio.ogg`` Would play media at 1.2x normal speed, with audio at normal pitch. Changing playback speed would change pitch, leaving audio tempo at 1.2x. ``rubberband`` High quality pitch correction with librubberband. This can be used in place of ``scaletempo``, and will be used to adjust audio pitch when playing at speed different from normal. It can also be used to adjust audio pitch without changing playback speed. ```` Sets the pitch scaling factor. Frequencies are multiplied by this value. This filter has a number of additional sub-options. You can list them with ``mpv --af=rubberband=help``. This will also show the default values for each option. The options are not documented here, because they are merely passed to librubberband. Look at the librubberband documentation to learn what each option does: http://breakfastquay.com/rubberband/code-doc/classRubberBand_1_1RubberBandStretcher.html (The mapping of the mpv rubberband filter sub-option names and values to those of librubberband follows a simple pattern: ``"Option" + Name + Value``.) This filter supports the following ``af-command`` commands: ``set-pitch`` Set the ```` argument dynamically. This can be used to change the playback pitch at runtime. Note that speed is controlled using the standard ``speed`` property, not ``af-command``. ``multiply-pitch `` Multiply the current value of ```` 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 ``lavfi=graph`` Filter audio using FFmpeg's libavfilter. ```` Libavfilter graph. See ``lavfi`` video filter for details - the graph syntax is the same. .. warning:: Don't forget to quote libavfilter graphs as described in the lavfi video filter section. ``o=`` AVOptions. ``fix-pts=`` Determine PTS based on sample count (default: no). If this is enabled, the player won't 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. mpv-0.32.0/DOCS/man/ao.rst000066400000000000000000000247731361337347200150600ustar00rootroot00000000000000AUDIO OUTPUT DRIVERS ==================== Audio output drivers are interfaces to different audio output facilities. The syntax is: ``--ao=`` Specify a priority list of audio output drivers to be used. If the list has a trailing ',', mpv will fall back on drivers not contained in the list. .. note:: See ``--ao=help`` for a list of compiled-in audio output drivers. The driver ``--ao=alsa`` is preferred. ``--ao=pulse`` is preferred on systems where PulseAudio is used. On BSD systems, ``--ao=oss`` or ``--ao=sndio`` may work (the latter being experimental). Available audio output drivers are: ``alsa`` (Linux only) ALSA audio output driver See `ALSA audio output options`_ for options specific to this AO. .. warning:: To get multichannel/surround audio, use ``--audio-channels=auto``. The default for this option is ``auto-safe``, which makes this audio output explicitly reject multichannel output, as there is no way to detect whether a certain channel layout is actually supported. You can also try `using the upmix plugin `_. This setup enables multichannel audio on the ``default`` device with automatic upmixing with shared access, so playing stereo and multichannel audio at the same time will work as expected. ``oss`` OSS audio output driver The following global options are supported by this audio output: ``--oss-mixer-device`` Sets the audio mixer device (default: ``/dev/mixer``). ``--oss-mixer-channel`` Sets the audio mixer channel (default: ``pcm``). Other valid values include **vol, pcm, line**. For a complete list of options look for ``SOUND_DEVICE_NAMES`` in ``/usr/include/linux/soundcard.h``. ``jack`` JACK (Jack Audio Connection Kit) audio output driver. The following global options are supported by this audio output: ``--jack-port=`` Connects to the ports with the given name (default: physical ports). ``--jack-name=`` Client name that is passed to JACK (default: ``mpv``). Useful if you want to have certain connections established automatically. ``--jack-autostart=`` Automatically start jackd if necessary (default: disabled). Note that this tends to be unreliable and will flood stdout with server messages. ``--jack-connect=`` Automatically create connections to output ports (default: enabled). When enabled, the maximum number of output channels will be limited to the number of available output ports. ``--jack-std-channel-layout=`` Select the standard channel layout (default: waveext). JACK itself has no notion of channel layouts (i.e. assigning which speaker a given channel is supposed to map to) - it just takes whatever the application outputs, and reroutes it to whatever the user defines. This means the user and the application are in charge of dealing with the channel layout. ``waveext`` uses WAVE_FORMAT_EXTENSIBLE order, which, even though it was defined by Microsoft, is the standard on many systems. The value ``any`` makes JACK accept whatever comes from the audio filter chain, regardless of channel layout and without reordering. This mode is probably not very useful, other than for debugging or when used with fixed setups. ``coreaudio`` (Mac OS X only) Native Mac OS X audio output driver using AudioUnits and the CoreAudio sound server. Automatically redirects to ``coreaudio_exclusive`` when playing compressed formats. The following global options are supported by this audio output: ``--coreaudio-change-physical-format=`` Change the physical format to one similar to the requested audio format (default: no). This has the advantage that multichannel audio output will actually work. The disadvantage is that it will change the system-wide audio settings. This is equivalent to changing the ``Format`` setting in the ``Audio Devices`` dialog in the ``Audio MIDI Setup`` utility. Note that this does not affect the selected speaker setup. ``--coreaudio-spdif-hack=`` Try to pass through AC3/DTS data as PCM. This is useful for drivers which do not report AC3 support. It converts the AC3 data to float, and assumes the driver will do the inverse conversion, which means a typical A/V receiver will pick it up as compressed IEC framed AC3 stream, ignoring that it's marked as PCM. This disables normal AC3 passthrough (even if the device reports it as supported). Use with extreme care. ``coreaudio_exclusive`` (Mac OS X only) Native Mac OS X audio output driver using direct device access and exclusive mode (bypasses the sound server). ``openal`` OpenAL audio output driver ``--openal-num-buffers=<2-128>`` Specify the number of audio buffers to use. Lower values are better for lower CPU usage. Default: 4. ``--openal-num-samples=<256-32768>`` Specify the number of complete samples to use for each buffer. Higher values are better for lower CPU usage. Default: 8192. ``--openal-direct-channels=`` Enable OpenAL Soft's 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. ``pulse`` PulseAudio audio output driver The following global options are supported by this audio output: ``--pulse-host=`` Specify the host to use. An empty string uses a local connection, "localhost" uses network transfer (most likely not what you want). ``--pulse-buffer=<1-2000|native>`` 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. ``--pulse-latency-hacks=`` Enable hacks to workaround PulseAudio timing bugs (default: no). If enabled, mpv will do elaborate latency calculations on its own. If disabled, it will use PulseAudio automatically updated timing information. Disabling this might help with e.g. networked audio or some plugins, while enabling it might help in some unknown situations (it used to be required to get good behavior on old PulseAudio versions). If you have stuttering video when using pulse, try to enable this option. (Or try to update PulseAudio.) ``--pulse-allow-suspended=`` Allow mpv to use PulseAudio even if the sink is suspended (default: no). Can be useful if PulseAudio is running as a bridge to jack and mpv has its sink-input set to the one jack is using. ``sdl`` SDL 1.2+ audio output driver. Should work on any platform supported by SDL 1.2, but may require the ``SDL_AUDIODRIVER`` environment variable to be set appropriately for your system. .. note:: This driver is for compatibility with extremely foreign environments, such as systems where none of the other drivers are available. The following global options are supported by this audio output: ``--sdl-buflen=`` Sets the audio buffer length in seconds. Is used only as a hint by the sound system. Playing a file with ``-v`` will show the requested and obtained exact buffer size. A value of 0 selects the sound system default. ``--sdl-bufcnt=`` Sets the number of extra audio buffers in mpv. Usually needs not be changed. ``null`` Produces no audio output but maintains video playback speed. You can use ``--ao=null --ao-null-untimed`` for benchmarking. The following global options are supported by this audio output: ``--ao-null-untimed`` Do not simulate timing of a perfect audio device. This means audio decoding will go as fast as possible, instead of timing it to the system clock. ``--ao-null-buffer`` Simulated buffer length in seconds. ``--ao-null-outburst`` Simulated chunk size in samples. ``--ao-null-speed`` Simulated audio playback speed as a multiplier. Usually, a real audio device will not go exactly as fast as the system clock. It will deviate just a little, and this option helps to simulate this. ``--ao-null-latency`` Simulated device latency. This is additional to EOF. ``--ao-null-broken-eof`` Simulate broken audio drivers, which always add the fixed device latency to the reported audio playback position. ``--ao-null-broken-delay`` Simulate broken audio drivers, which don't report latency correctly. ``--ao-null-channel-layouts`` If not empty, this is a ``,`` separated list of channel layouts the AO allows. This can be used to test channel layout selection. ``--ao-null-format`` Force the audio output format the AO will accept. If unset accepts any. ``pcm`` Raw PCM/WAVE file writer audio output The following global options are supported by this audio output: ``--ao-pcm-waveheader=`` Include or do not include the WAVE header (default: included). When not included, raw PCM will be generated. ``--ao-pcm-file=`` Write the sound to ```` instead of the default ``audiodump.wav``. If ``no-waveheader`` is specified, the default is ``audiodump.pcm``. ``--ao-pcm-append=`` Append to the file, instead of overwriting it. Always use this with the ``no-waveheader`` option - with ``waveheader`` it's broken, because it will write a WAVE header every time the file is opened. ``rsound`` Audio output to an RSound daemon. Use ``--audio-device=rsound/`` to set the host name (with ```` replaced, without the ``< >``). .. note:: Completely useless, unless you intend to run RSound. Not to be confused with RoarAudio, which is something completely different. ``sndio`` Audio output to the OpenBSD sndio sound system .. note:: Experimental. There are known bugs and issues. (Note: only supports mono, stereo, 4.0, 5.1 and 7.1 channel layouts.) ``wasapi`` Audio output to the Windows Audio Session API. mpv-0.32.0/DOCS/man/changes.rst000066400000000000000000000014151361337347200160550ustar00rootroot00000000000000CHANGELOG ========= There is no real changelog, but you can look at the following things: * The release changelog, which should contain most user-visible changes, including new features and bug fixes: https://github.com/mpv-player/mpv/releases * The git log, which is the "real" changelog * The files ``client-api-changes.rst`` and ``interface-changes.rst`` in the ``DOCS`` sub directoryon the git repository, which document API and user interface changes (the latter usually documents breaking changes only, rather than additions). * The file ``mplayer-changes.rst`` in the ``DOCS`` sub directory on the git repository, which used to be in place of this section. It documents some changes that happened since mplayer2 forked off MPlayer. (Not updated anymore.) mpv-0.32.0/DOCS/man/console.rst000066400000000000000000000044451361337347200161150ustar00rootroot00000000000000CONSOLE ======= The console is a REPL for mpv input commands. It is displayed on the video window. It also shows log messages. It can be disabled entirely using the ``--load-osd-console=no`` option. Keybindings ----------- \` Show the console. ESC Hide the console. ENTER Run the typed command. Shift+ENTER Type a literal newline character. Ctrl+LEFT and Ctrl+RIGHT Move cursor to previous/next word. UP and DOWN Navigate command history. PGUP Go to the first command in the history. PGDN Stop navigating command history. INSERT Toggle insert mode. Shift+INSERT Paste text (uses the primary selection on X11.) TAB Complete the command or property name at the cursor. Ctrl+C Clear current line. Ctrl+K. Delete text from the cursor to the end of the line. Ctrl+L Clear all log messages from the console. Ctrl+U Delete text from the cursor to the beginning of the line. Ctrl+V Paste text (uses the clipboard on X11.) Ctrl+W Delete text from the cursor to the beginning of the current word. Commands -------- ``script-message-to console type `` Show the console and pre-fill it with the provided text. Known issues ------------ - Pasting text is slow on Windows - Non-ASCII keyboard input has restrictions - The cursor keys move between Unicode code-points, not grapheme clusters Configuration ------------- This script can be customized through a config file ``script-opts/console.conf`` placed in mpv's user directory and through the ``--script-opts`` command-line option. The configuration syntax is described in `ON SCREEN CONTROLLER`_. Key bindings can be changed in a standard way, see for example stats.lua documentation. Configurable Options ~~~~~~~~~~~~~~~~~~~~ ``scale`` Default: 1 All drawing is scaled by this value, including the text borders and the cursor. If the VO backend in use has HiDPI scale reporting implemented, the option value is scaled with the reported HiDPI scale. ``font`` Default: unset (picks a hardcoded font depending on detected platform) Set the font used for the REPL and the console. This probably doesn't have to be a monospaced font. ``font_size`` Default: 16 Set the font size used for the REPL and the console. This will be multiplied by "scale." mpv-0.32.0/DOCS/man/encode.rst000066400000000000000000000102051361337347200156770ustar00rootroot00000000000000ENCODING ======== You can encode files from one format/codec to another using this facility. ``--o=`` Enables encoding mode and specifies the output file name. ``--of=`` Specifies the output format (overrides autodetection by the file name extension of the file specified by ``-o``). See ``--of=help`` for a full list of supported formats. ``--ofopts=`` Specifies the output format options for libavformat. See ``--ofopts=help`` for a full list of supported options. This is a key/value list option. See `List Options`_ for details. ``--ofopts-add=