个人自用 mpv 配置(目前边用边改)
主要用于 Arch Linux
排版以 VSCode/VSCodium + Noto Sans Mono CJK SC 为准。
首先,我不推荐你直接使用我的配置文件。
我建议你根据我的配置文件的注释以及文末推荐阅读的文章来自行定制自己的配置文件。
如果你非要使用我的配置(自寻不快),请看 How to use? | 如何使用?
并且建议安装推荐字体
我的配置文件用到了 汉仪正圆-65S, Noto Sans CJK SC 和 Noto Sans CJK SC Mono 字体,各位请自行下载安装。
用到的着色器
| 名称 | 链接 |
|---|---|
| Anime4K | https://github.com/bloc97/Anime4K |
| igv-FSRCNN | https://github.com/igv/FSRCNN-TensorFlow |
| KrigBilateral | https://gist.github.com/igv/a015fc885d5c22e6891820ad89555637 |
| acme-0.5x.hook | https://gist.github.com/bjin/15f307e7a1bdb55842bbb663ee1950ed |
[点击展开] 曾经用过但不常用的着色器,已移除/考虑未来移除
用到的第三方脚本(scripts & scripts-git)
| 脚本 | 用途 | 补充说明 |
|---|---|---|
| osc.lua | (见下) | mpv的内置OSC 添加了 thumbfast 支持,另有一些微不足道的改动 参考甚至很大一部分程度上复制了 thumbfast 的 vanilla-osc 分支 |
| thumbfast | 在进度条上显示视频缩略图 | |
| quality-menu | 运行时更改在线音视频流质量的菜单 | 在 mpv.conf 中写一行 --script-opts-append=ytdl_hook-all_formats=yes 可以部分代替这个脚本,参见 https://mpv.io/manual/master/#options-all-formats 我个人使用 git submodule 进行管理 |
| file-browser | 简单的文件浏览器 | 如果自行安装,需手动在 ~~/scripts 目录(在Linux上可以 cd ~/.config/mpv/scripts)运行 git clone https://github.com/CogentRedTester/mpv-file-browser.git file-browser 以“安装” 以后更新在 ~~/scripts/file-browser 目录运行 git pull 即可 --- 如果和我一样想用 Git 来备份配置文件,请参考Git官方文档 7.11 Git 工具 - 子模块 --- 需要自行配置 scripts-opts/file_browser.conf 中的 root=,详见:https://github.com/CogentRedTester/mpv-file-browser/blob/master/docs/file_browser.conf |
| MPV-Play-BiliBili-Comments (bilibiliAssert) | 将B站xml格式弹幕转换为ass格式 | 我个人使用 git submodule 进行管理 |
| sub-fonts-dir-auto.lua | 自动加载播放文件下的字体目录 | Doc: https://github.com/fbriere/mpv-scripts/blob/master/doc/sub-fonts-dir-auto.md 会覆盖 ~~/fonts 目录 |
| inputevent.lua | 增强 mpv 的 input.conf | 我用此脚本实现两个功能(详细参见 input.conf): 长按右方向键倍速播放,释放恢复 单击鼠标左键暂停,双击全屏 |
[点击展开] 曾经用过但不常用的脚本,已移除/考虑未来移除
| 脚本 | 用途 | 补充说明 |
|---|---|---|
| 播放列表增强 | 可被 select.lua 代替(快捷键:g-p) |
|
| 自动添加同目录的文件到播放列表 | 已被 --autocreate-playlist 代替 --- Playlistmanager 可以代替 autoload,参见 playlistmanager.conf 中的 loadfiles_on_start 和 key_loadfiles |
|
| 用于裁剪视频片段 | 输出文件较大时性能表现不理想;我不常用 | |
| webm 的汉化版 | 同上 | |
| 让 mpv 实现 torrent 边下边播 | 该 js 脚本相比于其他脚本略显麻烦 |
这部分的文章我是我或多或少参考过的,特此鸣谢
- https://mpv.io/manual/master/
- https://hooke007.github.io/
- https://www.bilibili.com/read/readlist/rl502769
- https://www.bilibili.com/read/readlist/rl617174 - 略有过时
- https://github.com/stax76/awesome-mpv
- https://artoriuz.github.io/blog/mpv_upscaling.html
- https://www.bilibili.com/opus/1143203531262525449
- ...
排序不分先后,但我可能会把 相关联/风格类似 的放在一块儿
- 开发者 hassn 用过的配置(已过时) https://github.com/haasn/gentoo-conf/blob/xor/home/nand/.mpv/config
- 开发者 Argon- 的个人配置 https://github.com/Argon-/mpv-config
- hooke007 - MPV_lazy 配置文件中文注释 https://github.com/hooke007/MPV_lazy/blob/main/portable_config/mpv.conf
- dyphire https://github.com/dyphire/mpv-config
- FinnRaze https://github.com/FinnRaze/mpv-player-config
- GreatRunoob https://github.com/GreatRunoob/mpv-configuration
- ...