mpv-player / mpv

本文为原文前 6,000 字符的节选翻译,完整内容请查看原文。

mpv External links Overview System requirements Downloads Changelog Compilation Release cycle Bug reports Contributing License Contact External links Wiki User Scripts FAQ Manual Overview mpv is a free (as in freedom) media player for the command line. It supports a wide variety of media file formats, audio and video codecs, and subtitle types. There is a FAQ. Releases can be found on the release list.

mpv 外部链接、概览、系统要求、下载、更新日志、编译、发布周期、错误报告、贡献、许可、联系方式、外部链接、Wiki、用户脚本、常见问题解答、手册。概览:mpv 是一款自由(指自由软件)的命令行媒体播放器。它支持多种媒体文件格式、音视频编解码器以及字幕类型。项目提供常见问题解答,发布版本可在发布列表中找到。

System requirements A not too ancient Linux (usually, only the latest releases of distributions are actively supported), Windows 10 1607 or later, or macOS 10.15 or later. A somewhat capable CPU. Hardware decoding might help if the CPU is too slow to decode video in realtime, but must be explicitly enabled with the —hwdec option. A not too crappy GPU. mpv’s focus is not on power-efficient playback on embedded or integrated GPUs (for example, hardware decoding is not even enabled by default). Low power GPUs may cause issues like tearing, stutter, etc. On such GPUs, it’s recommended to use —profile=fast for smooth playback. The main video output uses shaders for video rendering and scaling, rather than GPU fixed function hardware. On Windows, you might want to make sure the graphics drivers are current. In some cases, ancient fallback video output methods can help (such as —vo=xv on Linux), but this use is not recommended or supported. mpv does not go out of its way to break on older hardware or old, unsupported operating systems, but development is not done with them in mind. Keeping compatibility with such setups is not guaranteed. If things work, consider it a happy accident.

系统要求:需要较新的 Linux 发行版(通常仅积极支持各发行版的最新版本)、Windows 10 1607 或更高版本,或 macOS 10.15 或更高版本。需要性能尚可的 CPU。如果 CPU 实时解码视频速度过慢,硬件解码可能会有所帮助,但必须通过 —hwdec 选项显式启用。需要性能尚可的 GPU。mpv 的重点不在于嵌入式或集成 GPU 上的节能播放(例如,硬件解码默认甚至是不启用的)。低功耗 GPU 可能会导致画面撕裂、卡顿等问题。在此类 GPU 上,建议使用 —profile=fast 以获得流畅播放体验。主要的视频输出使用着色器进行视频渲染和缩放,而不是使用 GPU 固定功能硬件。在 Windows 上,请确保显卡驱动程序为最新。在某些情况下,老旧的后备视频输出方法(如 Linux 上的 —vo=xv)可能会有帮助,但不建议或支持此类用法。mpv 不会刻意在旧硬件或旧的、不受支持的操作系统上停止工作,但开发时并未考虑这些环境。不保证与此类配置的兼容性。如果能运行,那纯属巧合。

Downloads For semi-official builds and third-party packages please see mpv.io/installation. Changelog There is no complete changelog; however, changes to the player core interface are listed in the interface changelog. Changes to the C API are documented in the client API changelog. The release list has a summary of most of the important changes on every release. Changes to the default key bindings are indicated in restore-old-bindings.conf. Changes to the default OSC bindings are indicated in restore-osc-bindings.conf.

下载:有关半官方构建版本和第三方软件包,请参阅 mpv.io/installation。更新日志:没有完整的更新日志;不过,播放器核心接口的更改列在接口更新日志中。C API 的更改记录在客户端 API 更新日志中。发布列表汇总了每个版本的大部分重要更改。默认键位绑定的更改在 restore-old-bindings.conf 中说明。默认 OSC 绑定的更改在 restore-osc-bindings.conf 中说明。

Compilation Compiling with full features requires development files for several external libraries. Mpv requires meson to build. Meson can be obtained from your distro or PyPI. After creating your build directory (e.g. meson setup build), you can view a list of all the build options via meson configure build. You could also just simply look at the meson_options.txt file. Logs are stored in meson-logs within your build directory. Example: meson setup build meson compile -C build meson install -C build For libplacebo, meson can use a git check out as a subproject for a convenient way to compile mpv if a sufficient libplacebo version is not easily available in the build environment. It will be statically linked with mpv. Example: mkdir -p subprojects git clone https://code.videolan.org/videolan/libplacebo.git —depth=1 —recursive subprojects/libplacebo

编译:编译完整功能版本需要多个外部库的开发文件。Mpv 需要 meson 进行构建。Meson 可以从你的发行版或 PyPI 获取。创建构建目录(例如 meson setup build)后,你可以通过 meson configure build 查看所有构建选项的列表。你也可以直接查看 meson_options.txt 文件。日志存储在构建目录内的 meson-logs 中。示例:meson setup build、meson compile -C build、meson install -C build。对于 libplacebo,如果构建环境中不容易获得足够的 libplacebo 版本,meson 可以使用 git 检出作为子项目,这是一种编译 mpv 的便捷方式。它将与 mpv 静态链接。示例:mkdir -p subprojects,git clone https://code.videolan.org/videolan/libplacebo.git —depth=1 —recursive subprojects/libplacebo。

Essential dependencies (incomplete list): gcc or clang X development headers (xlib, xrandr, xext, xscrnsaver, xpresent, libvdpau, libGL, GLX, EGL, xv, …) Audio output development headers (libasound/ALSA, pulseaudio) FFmpeg libraries (libavutil libavcodec libavformat libswscale libavfilter and either libswresample or libavresample) libplacebo zlib iconv (normally provided by the system libc) libass (OSD, OSC, text subtitles) Lua (optional, required for the OSC pseudo-GUI and youtube-dl integration) libjpeg (optional, used for screenshots only) uchardet (optional, for subtitle charset detection) nvdec and vaapi libraries for hardware decoding on Linux (optional) Libass dependencies (when building libass): gcc or clang, nasm on x86 and x86_64 fribidi, freetype, fontconfig development headers (for libass) harfbuzz (required for correct rendering of combining characters, particularly for correct rendering of non-English text on macOS, and Arabic/Indic scripts on any platform) FFmpeg dependencies (when building FFmpeg): gcc or clang, nasm on x86 and x86_64 OpenSSL or GnuTLS (have to be explicitly enabled when compiling FFmpeg) libx264/libmp3lame/libfdk-aac if you want to use encoding (have to be explicitly enabled when compiling FFmpeg) For native DASH playback, FFmpeg needs to be built with —enable-libxml2 (although there are security implications, and DASH support has lots of bugs). AV1 decoding support requires dav1d. For good nvidia support on Linux, make sure nv-codec-headers is installed and can be found by configure. Most of the above libraries are available in suitable versions on normal Linux distributions. For ease of compiling the latest git master of everything, you may wish to use the separately available build wrapper (mpv-build) which first compiles FFmpeg libraries and libass, and then compiles the player statically linked against those. If you want to build a Windows binary, see Windows compilation.

基本依赖项(不完整列表):gcc 或 clang;X 开发头文件(xlib, xrandr, xext, xscrnsaver, xpresent, libvdpau, libGL, GLX, EGL, xv 等);音频输出开发头文件(libasound/ALSA, pulseaudio);FFmpeg 库(libavutil, libavcodec, libavformat, libswscale, libavfilter 以及 libswresample 或 libavresample);libplacebo;zlib;iconv(通常由系统 libc 提供);libass(OSD、OSC、文本字幕);Lua(可选,用于 OSC 伪 GUI 和 youtube-dl 集成);libjpeg(可选,仅用于截图);uchardet(可选,用于字幕字符集检测);Linux 上的硬件解码 nvdec 和 vaapi 库(可选)。Libass 依赖项(构建 libass 时):gcc 或 clang,x86 和 x86_64 上的 nasm;fribidi, freetype, fontconfig 开发头文件(用于 libass);harfbuzz(用于正确渲染组合字符,特别是 macOS 上的非英语文本,以及任何平台上的阿拉伯语/印度语脚本)。FFmpeg 依赖项(构建 FFmpeg 时):gcc 或 clang,x86 和 x86_64 上的 nasm;OpenSSL 或 GnuTLS(编译 FFmpeg 时必须显式启用);如果需要使用编码功能,则需要 libx264/libmp3lame/libfdk-aac(编译 FFmpeg 时必须显式启用)。对于原生 DASH 播放,FFmpeg 需要使用 —enable-libxml2 构建(尽管存在安全隐患,且 DASH 支持存在许多错误)。AV1 解码支持需要 dav1d。为了在 Linux 上获得良好的 nvidia 支持,请确保安装了 nv-codec-headers 并且 configure 可以找到它。上述大多数库在普通 Linux 发行版中都有合适的版本。为了方便编译最新的 git master 版本,你可能希望使用单独提供的构建包装器 (mpv-build),它首先编译 FFmpeg 库和 libass,然后将播放器与这些库静态链接进行编译。如果你想构建 Windows 二进制文件,请参阅 Windows 编译。

Release cycle Once or twice a year, a release is cut off from the current development state and is assigned a 0.X.0 version number. No further maintenance is done, except in the event of security issues. The goal of releases is to make Linux distributions happy. Linux distributions are also expected to apply their own patches in case of bugs. Releases other than the latest release are unsupported and unmaintained. See the release policy document for more information. Bug reports Please use the issue tracker provided by GitHub to send us bug reports or feature requests. Follow the template’s instructions or the issue will likely be ignored or closed as invalid. Questions can be asked in the discussions or on IRC (see Contact below). Contributing Please read contribute.md. For small changes you can just send us pull requests through GitHub. For bigger changes come and talk to us on IRC before you start working on them. It will make code review easier for both parties later on. You can check the wiki or the issue tracker for ideas on what you cou

发布周期:每年一到两次,从当前的开发状态中切出一个版本,并分配一个 0.X.0 版本号。除安全问题外,不再进行进一步维护。发布版本的目的是为了满足 Linux 发行版的需求。如果出现错误,Linux 发行版也需要应用它们自己的补丁。除最新版本外,其他版本均不受支持且不进行维护。有关更多信息,请参阅发布策略文档。错误报告:请使用 GitHub 提供的议题追踪器发送错误报告或功能请求。请遵循模板说明,否则议题可能会被忽略或作为无效议题关闭。问题可以在讨论区或 IRC 上提出(见下文联系方式)。贡献:请阅读 contribute.md。对于小的更改,你可以直接通过 GitHub 发送拉取请求。对于较大的更改,请在开始工作前先在 IRC 上与我们沟通。这将使双方以后的代码审查更容易。你可以查看 wiki 或议题追踪器,了解你可以做些什么。