概述
mpv 是一个免费的(在自由)媒体播放器的命令行。它支持多种媒体文件格式、音频和视频编解码器以及字幕类型。
源码:https://github.com/mpv-player/mpv
下载地址:https://mpv.io/installation/
文档:https://mpv.io/manual/stable/
安装
Windows
mpv-x86_64-v3-20231210:点击开始下载。
注意:下载之后,不要解压到 C 盘,放到其他盘符
比如 D:\player\mpv
双击 mpv.exe
即可运行 mpv 播放器。
配置
关联格式
进入解压目录下的 installer
文件夹,有个 mpv-install.bat
脚本,管理员权限运行它,等待完成,按任意键退出。
配置文件夹
配置文件夹用于自定义配置,安装插件
进入解压的目录,新建 portable_config
文件夹
进入 portable_config
新建文件:
mpv.conf
:mpv 配置文件input.conf
:存放自定义的快捷键配置
新建文件夹:
scripts
:存放第三方脚本script-opts
:存放第三方脚本配置
脚本
所有脚本都遵循上述规范的配置
缩略图
项目地址:https://github.com/po5/thumbfast
下载项目下的 thumbfast.lua,osc.lua
下载之后把 thumbfast.lua
放入 mpv目录/portable_config/
,也就是 mpv.conf 同目录。
osc.lua
放入 mpv目录/portable_config/scripts
。
在 input.conf
加入一行
|
|
重启 mpv,即可生效
手动启用, 按 a
即可加载缩略图。
如果需要默认加载,把 thumbfast.lua 放入 scripts 中即可
文件浏览器
功能:在 mpv 中浏览和打开文件和文件夹。
该脚本在 mpv API 之外不使用任何东西,因此在所有平台上都应该是相同的。浏览器可以上下移动目录,开始播放文件和文件夹,或者将它们添加到队列中。
项目地址:https://github.com/CogentRedTester/mpv-file-browser
快捷键:
Ctrl+o | 打开脚本,进入选择 |
---|---|
键盘上下键 | 选择列表 |
enter | 选中播放 |
键盘左右键 | 切换文件夹 |
ECS | 关闭列表 |
脚本配置:
mpv目录/portable_config/script-opts/file_browser.conf
|
|
最近播放列表
功能:查看最近播放的列表
项目地址:https://github.com/hacel/recent
快捷键:
`
:打开最近播放
脚本配置:
mpv目录\portable_config\script-opts\recent.conf
auto_run_idle=no
:关闭 mpv 打开时显示最近播放,默认为 yes
|
|
杜比视界
杜比视界 DV HDR 常见的播放器都不支持,mpv 只需要在 mpv.conf
中添加两行代码即可让颜色正常化
|
|
mpv.conf
|
|
快捷键
皆为内置快捷键
|
|
关于快捷键可查看 附录-快捷键
附录
快捷键
图示:
英文版
中文版:
快捷键 | 中文 | 英文 |
---|---|---|
LEFT and RIGHT | 向后/向前跳转 5 秒。Shift+箭头进行 1 秒精确跳转(见–hr-seek)。 | Seek backward/forward 5 seconds. Shift+arrow does a 1 second exact seek (see –hr-seek). |
UP and DOWN | 向前/向后跳转 1 分钟。Shift+箭头进行 5 秒精确跳转(见–hr-seek)。 | Seek forward/backward 1 minute. Shift+arrow does a 5 second exact seek (see –hr-seek). |
Ctrl+LEFT and Ctrl+RIGHT | 跳转到上一个/下一个字幕。受一些限制,可能并不总是有效;参见 sub-seek 命令。 | Seek to the previous/next subtitle. Subject to some restrictions and might not always work; see sub-seek command. |
Ctrl+Shift+LEFT and Ctrl+Shift+RIGHT | 调整字幕延迟,以便下一个或上一个字幕立即显示。这对于将字幕与音频同步特别有用。 | Adjust subtitle delay so that the next or previous subtitle is displayed now. This is especially useful to sync subtitles to audio. |
[ and ] | 将当前播放速度减小/增加 10%。 | Decrease/increase current playback speed by 10%. |
{ and } | 当前播放速度减半/加倍。 | Halve/double current playback speed. |
BACKSPACE | 将播放速度重置为正常。 | Reset playback speed to normal. |
Shift+BACKSPACE | 撤销上次跳转。仅当播放列表条目未更改时有效。再次按下将返回到原始位置。有关详细信息,请参阅 revert-seek 命令。 | Undo the last seek. This works only if the playlist entry was not changed. Hitting it a second time will go back to the original position. See revert-seek command for details. |
Shift+Ctrl+BACKSPACE | 标记当前位置。然后 Shift+BACKSPACE 将使用该标记位置作为还原位置(一旦您跳回,标记将被重置)。您可以使用此功能在文件中进行跳转,然后返回到您离开的确切位置。 | Mark the current position. This will then be used by Shift+BACKSPACE as revert position (once you seek back, the marker will be reset). You can use this to seek around in the file and then return to the exact position where you left off. |
< and > | 在播放列表中向后/向前。 | Go backward/forward in the playlist. |
ENTER | 在播放列表中向前。 | Go forward in the playlist. |
p and SPACE | 暂停(再次按下取消暂停)。 | Pause (pressing again unpauses). |
. | 向前一步。按一次将暂停,每连续按下一次将播放一帧,然后再次进入暂停模式。 | Step forward. Pressing once will pause, every consecutive press will play one frame and then go into pause mode again. |
, | 向后一步。按一次将暂停,每连续按下一次将倒放一帧,然后再次进入暂停模式。 | Step backward. Pressing once will pause, every consecutive press will play one frame in reverse and then go into pause mode again. |
q | 停止播放并退出。 | Stop playing and quit. |
Q | 类似于 q,但存储当前播放位置。如果可能的话,稍后再次播放相同的文件将在旧的播放位置继续播放。请参阅 RESUMING PLAYBACK。 | Like q, but store the current playback position. Playing the same file later will resume at the old playback position if possible. See RESUMING PLAYBACK. |
/ and * | 减小/增大音量。 | Decrease/increase volume. |
9 and 0 | 减小/增大音量。 | Decrease/increase volume. |
m | 静音。 | Mute sound. |
_ | 循环浏览可用的视频轨道。 | Cycle through the available video tracks. |
# | 循环浏览可用的音频轨道。 | Cycle through the available audio tracks. |
E | 循环浏览可用的版本。 | Cycle through the available Editions. |
f | 切换全屏(另请参阅–fs)。 | Toggle fullscreen (see also –fs). |
ESC | 退出全屏模式。 | Exit fullscreen mode. |
T | 切换置顶(另请参阅–ontop)。 | Toggle stay-on-top (see also –ontop). |
w and W | 减小/增大平移和扫描范围。当前 e 键目前执行相同操作,但不建议使用。 | Decrease/increase pan-and-scan range. The e key does the same as W currently, but use is discouraged. |
o and P | 在 OSD 上显示进度条、已用时间和总持续时间。 | Show progression bar, elapsed time and total duration on the OSD. |
O | 在 OSD 状态之间切换正常和播放时间/持续时间。 | Toggle OSD states between normal and playback time/duration. |
v | 切换字幕可见性。 | Toggle subtitle visibility. |
j and J | 循环浏览可用的字幕。 | Cycle through the available subtitles. |
z and Z | 通过+/- 0.1 秒调整字幕延迟。当前 x 键执行相同操作,但不建议使用。 | Adjust subtitle delay by +/- 0.1 seconds. The x key does the same as Z currently, but use is discouraged. |
l | 设置/清除 A-B 循环点。有关详细信息,请参阅 ab-loop 命令。 | Set/clear A-B loop points. See ab-loop command for details. |
L | 切换无限循环。 | Toggle infinite looping. |
Ctrl++ and Ctrl+- | 通过+/- 0.1 秒调整音频延迟(A/V 同步)。 | Adjust audio delay (A/V sync) by +/- 0.1 seconds. |
Shift+g and Shift+f | 通过+/- 10%调整字幕字体大小。 | Adjust subtitle font size by +/- 10%. |
u | 在 SSA/ASS 字幕中切换仅应用–sub-ass-*覆盖(默认)和几乎完全覆盖它们的常规字幕样式。有关更多信息,请参阅–sub-ass-override。 | Switch between applying only –sub-ass-* overrides (default) to SSA/ASS subtitles, and overriding them almost completely with the normal subtitle style. See –sub-ass-override for more info. |
V | 切换字幕 VSFilter 纵横比兼容模式。有关更多信息,请参阅–sub-ass-vsfilter-aspect-compat。 | Toggle subtitle VSFilter aspect compatibility mode. See –sub-ass-vsfilter-aspect-compat for more info. |
r and R | 上/下移动字幕。当前 t 键执行相同操作,但不建议使用。 | Move subtitles up/down. The t key does the same as R currently, but use is discouraged. |
s | 拍摄截图。 | Take a screenshot. |
S | 拍摄截图,不带字幕。(这取决于 VO 驱动程序支持与否。) | Take a screenshot, without subtitles. (Whether this works depends on VO driver support.) |
Ctrl+s | 拍摄截图,如窗口显示(带字幕、OSD 和缩放视频)。 | Take a screenshot, as the window shows it (with subtitles, OSD, and scaled video). |
PGUP and PGDWN | 跳转到上一个/下一个章节的开始。在大多数情况下,“上一个”实际上将会到达当前章节的开始;请参阅–chapter-seek-threshold。 | Seek to the beginning of the previous/next chapter. In most cases, “previous” will actually go to the beginning of the current chapter; see –chapter-seek-threshold. |
Shift+PGUP and Shift+PGDWN | 向后或向前跳转 10 分钟。(这曾经映射到不带 Shift 的 PGUP/PGDWN。) | Seek backward or forward by 10 minutes. (This used to be mapped to PGUP/PGDWN without Shift.) |
d | 激活/停用去隔行。 | Activate/deactivate deinterlacer. |
A | 循环切换宽高比覆盖。 | Cycle aspect ratio override. |
Ctrl+h | 切换硬件视频解码开/关。 | Toggle hardware video decoding on/off. |
Alt+LEFT, Alt+RIGHT, Alt+UP, Alt+DOWN | 移动视频矩形(平移)。 | Move the video rectangle (panning). |
Alt++ and Alt+- | 将 Alt 与+或-键组合可更改视频缩放。 | Combining Alt with the + or - keys changes video zoom. |
Alt+BACKSPACE | 重置平移/缩放设置。 | Reset the pan/zoom settings. |
F8 | 显示播放列表和其中的当前位置(仅在使用 UI 窗口时有用,在终端上损坏)。 | Show the playlist and the current position in it (useful only if a UI window is used, broken on the terminal). |
F9 | 显示音频和字幕流列表(仅在使用 UI 窗口时有用,在终端上损坏)。 | Show the list of audio and subtitle streams (useful only if a UI window is used, broken on the terminal). |
i and I | 显示/切换显示有关当前播放文件的统计信息的叠加层,例如编解码器、帧速率、丢帧数等。有关更多信息,请参阅 STATS。 | Show/toggle an overlay displaying statistics about the currently playing file such as codec, framerate, number of dropped frames and so on. See STATS for more information. |
DEL | 在 OSC 之间循环显示可见性:从不/自动(鼠标移动)/始终 | Cycle OSC visibility between never / auto (mouse-move) / always |
` | 显示控制台。(ESC 关闭它。有关 CONSOLE 的详细信息,请参阅 CONSOLE。) | Show the console. (ESC closes it again. See CONSOLE.) |
1 and 2 | 调整对比度。 | Adjust contrast. |
3 and 4 | 调整亮度。 | Adjust brightness. |
5 and 6 | 调整伽马值。 | Adjust gamma. |
7 and 8 | 调整饱和度。 | Adjust saturation. |
Alt+0 (and Command+0 on macOS) | 将视频窗口调整为原始大小的一半。 | Resize video window to half its original size. |
Alt+1 (and Command+1 on macOS) | 将视频窗口调整为其原始大小。 | Resize video window to its original size. |
Alt+2 (and Command+2 on macOS) | 将视频窗口调整为其原始大小的两倍。 | Resize video window to double its original size. |
Command + f (macOS only) | 切换全屏(另请参阅–fs)。 | Toggle fullscreen (see also –fs). |
PAUSE | 暂停。 | Pause. |
STOP | 停止播放并退出。 | Stop playing and quit. |
PREVIOUS and NEXT | 向后/向前跳转 1 分钟。 | Seek backward/forward 1 minute. |
ZOOMIN and ZOOMOUT | 更改视频缩放。 | Changes video zoom. |