找回密码
 立即注册
查看: 6441|回复: 14

个人mpv配置参考,也请dalao指教

7

主题

107

回帖

48

VC币

高级会员

Rank: 4

积分
25000
Ryougi_Kukoc 发表于 2020-7-20 21:12:51 | 显示全部楼层 |阅读模式
本帖最后由 Ryougi_Kukoc 于 2020-8-4 15:08 编辑

暑假终于有时间研究一下mpv了,之前是直接白嫖cczzhh前辈的帖子“分享一下自己的mpv配置”,感激不尽;读了两个晚上的官方文档MANUAL,写了上面这些,权当参考;(笔记本)电脑配置是8bit144Hz的1080p屏幕、i7-8750H、RTX2070-maxQ。由于本机CPU常载温度相当诡异,因此我个人并不偏向使用软解(奇怪的想法)。
大佬们如果对下述配置有什么建议的话,小弟洗耳恭听;当然如果能指出这个配置里是否有一些矛盾的地方或者写的十分愚蠢的地方就更好了。

Update_2020-07-22_a:
起因:https://bbs.acgrip.com/thread-6339-1-1.html
进行了关于反交错的测试,由于自身算法的原因,autodeint在处理某些视频时无法正确判定是否应该反交错,并且会与手动反交错冲突导致播放器蓝屏、需要删除cache才能复原,因此不(推荐)使用这个lua,应当通过快捷键"d"手动反交错(即使使用那个lua也要手动ctrl-d);期待将来能得到更好的办法。
官方文档关于“--deinterlace=<yes|no>”的说法:
Keep in mind that this will conflict with manually inserted deinterlacing filters, unless you take care. (Since mpv 0.27.0, even the hardware deinterlace filters will conflict. Also since that version, --deinterlace=auto was removed, which used to mean that the default interlacing option of possibly inserted video filters was used.)


Update_2020-07-22_b:

补充了禁用“--opengl-pbo”的原因:https://github.com/mpv-player/mpv/issues/4988
这个bug仍未解决。
另外,修改了配置文档中的一些格式。

Update_2020-08-03_a:
起因见12楼。
将deband迭代次数降到2,为了保证细节,以后可能会考虑再度降低deband效能,或者关闭deband。但是现阶段并没有出现这样的问题,加上考虑到片源可能有未处理色带的情况,因此保留现有deband配置。

Update_2020-08-03_b:
起因见14楼。
使用新版本从chromium移植过来的scaletempo2滤镜,能改善倍速播放下“咬字不清”的问题。
顺带一提,mpv中默认的倍速播放快捷键为:

"["
当前播放倍速乘1.1
"["
当前播放倍速乘0.9091
"{"
当前播放倍速乘0.5
"}"
当前播放倍速乘2.0
BackSpace
还原到默认播放倍速

Update_2020-08-04:
关闭deband。
感谢坛友的样本和指导。的确由于不同的色带需要配合不同的参数去除,因此自认为可以小规模地处理一些色带是无异于掩耳盗铃的。

mpv.conf:
  1. # !!! Press "d" on your keyboard anytime you find ugly comb-like artifacts, which are visible on fast movement. "autodeint.lua" is not convincing, please check it with your eyes.


  2. # Details about Profile gpu-hq:
  3. # scale=spline36
  4. # cscale=spline36
  5. # dscale=mitchell
  6. # dither-depth=auto
  7. # correct-downscaling=yes
  8. # linear-downscaling=yes
  9. # sigmoid-upscaling=yes
  10. # deband=yes



  11. # OPTIONS / Track Selection
  12. track-auto-selection
  13. # MANUAL: "Enabling this will make the player select streams according to --aid, --alang, and others. If it is disabled, no tracks are selected. In addition, the player will not exit if no tracks are selected, and wait instead."
  14. aid=auto
  15. sid=auto
  16. vid=auto
  17. # Or you can use these:
  18. # alang=jpn,ja,eng,en
  19. # slang=chi,zh-CN,sc,chs,jpn,ja,eng,en
  20. # MANUAL: "DVDs use ISO 639-1 two-letter language codes, Matroska, MPEG-TS and NUT use ISO 639-2 three-letter language codes, while OGM uses a free-form identifier."



  21. # OPTIONS / Program Behavior
  22. save-position-on-quit



  23. # OPTIONS / Video
  24. vo=gpu
  25. hwdec=d3d11va
  26. vd-lavc-dr=yes



  27. # OPTIONS / Audio
  28. af=scaletempo2
  29. # MANUAL: "Scales audio tempo without altering pitch. The algorithm is ported from chromium and uses the Waveform Similarity Overlap-and-add (WSOLA) method. It seems to achieve a higher audio quality than scaletempo and rubberband."
  30. ao=wasapi
  31. audio-file-paths=aud;auds;audio;audios
  32. audio-file-auto=fuzzy
  33. audio-channels=stereo



  34. # OPTIONS / Subtitles
  35. sub-scale-by-window=yes
  36. sub-file-paths=sub;subs;subtitle;subtitles
  37. sub-auto=fuzzy
  38. sub-ass-vsfilter-blur-compat=yes
  39. # MANUAL: "Scale \blur tags by video resolution instead of script resolution (enabled by default). This is bug in VSFilter, which according to some, can't be fixed anymore in the name of compatibility."
  40. # "Note that this uses the actual video resolution for calculating the offset scale factor, not what the video filter chain or the video output use."
  41. sub-fix-timing=yes
  42. # MANUAL: "Adjust subtitle timing is to remove minor gaps or overlaps between subtitles (if the difference is smaller than 210 ms, the gap or overlap is removed)."
  43. sub-gauss=1.0
  44. # MANUAL: "This can help to make pixelated DVD/Vobsubs look nicer. A value other than 0 also switches to software subtitle scaling."
  45. sub-gray
  46. # MANUAL: "Convert image subtitles to grayscale. Can help to make yellow DVD/Vobsubs look nicer."



  47. # OPTIONS / Window
  48. keep-open=yes
  49. keep-open-pause=no
  50. snap-window
  51. cursor-autohide=no
  52. autofit=75%



  53. # OPTIONS / OSD
  54. osd-font='Consolas'



  55. # OPTIONS / Screenshot
  56. screenshot-format=png
  57. screenshot-tag-colorspace=yes
  58. screenshot-high-bit-depth=yes
  59. screenshot-png-compression=0
  60. screenshot-png-filter=0



  61. # OPTIONS / GPU renderer options
  62. scale=ewa_lanczossharp
  63. dscale=catmull_rom
  64. cscale=sinc
  65. cscale-window=blackman
  66. cscale-radius=3
  67. fbo-format=rgba32f
  68. correct-downscaling
  69. linear-downscaling
  70. sigmoid-upscaling
  71. #-----------------------------------------------#
  72. video-sync=display-resample
  73. interpolation
  74. # MANUAL: "This requires setting the --video-sync option to one of the display- modes, or it will be silently disabled."
  75. tscale=oversample
  76. #-----------------------------------------------#
  77. # opengl-pbo
  78. # MANUAL: "Enable use of PBOs. On some drivers this can be faster, especially if the source video size is huge (e.g. so called "4K" video)."
  79. # currently bugged: https://github.com/mpv-player/mpv/issues/4988
  80. #-----------------------------------------------#
  81. # dither-size-fruit=7
  82. temporal-dither
  83. dither=error-diffusion
  84. # Default: error-diffusion=sierra-lite
  85. #-----------------------------------------------#
  86. deband=no
  87. # deband-iterations=2
  88. # MANUAL: "The number of debanding steps to perform per sample. Each step reduces a bit more banding, but takes time to compute. Note that the strength of each step falls off very quickly, so high numbers (>4) are practically useless. (Default 1)"
  89. # deband-threshold=128
  90. # MANUAL: "The debanding filter's cut-off threshold. Higher numbers increase the debanding strength dramatically but progressively diminish image details. (Default 64)"
  91. # deband-range=32
  92. # MANUAL: "The debanding filter's initial radius. The radius increases linearly for each iteration. A higher radius will find more gradients, but a lower radius will smooth more aggressively. (Default 16)"
  93. # "If you increase the --deband-iterations, you should probably decrease this to compensate."
  94. #-----------------------------------------------#
  95. gpu-sw
  96. # MANUAL: "Continue even if a software renderer is detected."
  97. gpu-context=d3d11
  98. gpu-api=d3d11
  99. icc-profile-auto
  100. icc-3dlut-size=256x256x256
  101. icc-cache-dir="~~/icc_cache"
  102. blend-subtitles=video
  103. gpu-shader-cache-dir="~~/shader_cache"



  104. # OPTIONS / Miscellaneous
  105. # video-sync=display-resample
  106. priority=realtime



  107. # ON SCREEN CONTROLLER
  108. hidetimeout=50
  109. fadeduration=50
  110. deadzonesize=1.0
复制代码

Scripts:
autospeedwin
open-file-dialog

参考文章:
https://mpv.io/manual/master/
https://iamscum.wordpress.com/guides/videoplayback-guide/mpv-conf/
https://bbs.acgrip.com/forum.php?mod=viewthread&tid=2730&highlight=mpv
https://vcb-s.com/archives/7594
https://github.com/mpv-player/mpv/wiki/User-Scripts
https://github.com/Argon-/mpv-config/blob/master/mpv.conf
https://github.com/haasn/gentoo-conf/blob/xor/home/nand/.mpv/config

回复

使用道具 举报

26

主题

298

回帖

0

VC币

白金会员

Rank: 12Rank: 12Rank: 12

积分
54135
楚轩 发表于 2020-7-20 22:53:19 | 显示全部楼层
不清楚 混个奖励
回复

使用道具 举报

18

主题

40

回帖

0

VC币

星辰大海

Rank: 20Rank: 20Rank: 20Rank: 20Rank: 20

积分
443056
白井黑子 发表于 2020-7-21 06:20:15 | 显示全部楼层

回帖奖励 +200 活跃度

和我配置差不多直接抄了
回复

使用道具 举报

26

主题

298

回帖

0

VC币

白金会员

Rank: 12Rank: 12Rank: 12

积分
54135
楚轩 发表于 2020-7-21 11:04:39 | 显示全部楼层

回帖奖励 +200 活跃度

好配置 抄一下
回复

使用道具 举报

26

主题

397

回帖

455

VC币

星辰大海

Rank: 20Rank: 20Rank: 20Rank: 20Rank: 20

积分
394374

新人登场崭露头角渐入佳境活跃达人

橙兜酱 发表于 2020-7-21 12:53:49 | 显示全部楼层

回帖奖励 +200 活跃度

完全看不懂大佬NB完事
动画年鉴-统计表 (notion.so)
动画年鉴网盘目录 (xido.workers.dev)

欢迎参观,如果想一起收集整理的话可以在统计表主页找我联系方式~
回复

使用道具 举报

47

主题

2781

回帖

2020

VC币

星辰大海

Rank: 20Rank: 20Rank: 20Rank: 20Rank: 20

积分
432683

崭露头角活跃达人CD!BD!坚持不懈灌水之王日积月累

孤雨独火 发表于 2020-7-21 12:54:25 | 显示全部楼层

回帖奖励 +200 活跃度

为什么tscale要用box,scale用lanczos
回复

使用道具 举报

7

主题

107

回帖

48

VC币

高级会员

Rank: 4

积分
25000
Ryougi_Kukoc  楼主| 发表于 2020-7-21 12:55:48 | 显示全部楼层
孤雨独火 发表于 2020-7-21 12:54
为什么tscale要用box,scale用lanczos

啊这有什么不妥吗?
回复

使用道具 举报

47

主题

2781

回帖

2020

VC币

星辰大海

Rank: 20Rank: 20Rank: 20Rank: 20Rank: 20

积分
432683

崭露头角活跃达人CD!BD!坚持不懈灌水之王日积月累

孤雨独火 发表于 2020-7-21 13:00:48 | 显示全部楼层

回帖奖励 +200 活跃度

本帖最后由 孤雨独火 于 2020-7-21 13:05 编辑
Ryougi_Kukoc 发表于 2020-7-21 12:55
啊这有什么不妥吗?

效率差不多,sinc的质量不如spline36(官方说法,实际看片)。box这个算法太非主流了吧,我第一次见到(文档里都找不到说明,也找不到相关的对比测试

既然要防抖,tscale就应该用oversample和interpolation他们配套

然后csale那边krigbilateral.glsl配置要求应该也不高,能用这个基本就不需要考虑别的算法了
回复

使用道具 举报

7

主题

107

回帖

48

VC币

高级会员

Rank: 4

积分
25000
Ryougi_Kukoc  楼主| 发表于 2020-7-21 13:16:52 | 显示全部楼层
孤雨独火 发表于 2020-7-21 13:00
效率差不多,sinc的质量不如spline36(官方说法,实际看片)。box这个算法太非主流了吧,我第一次见到(文 ...

关于box的部分,我参考了这篇文章mpv.conf_from_I_am_Scum
然后拿天气之子原盘里那段帆高向楼顶的鸟居跑、镜头围着楼转的片段肉眼对比了下几个tscale的interpolation效果,感觉文章里介绍的参数观感最佳,就这么选了。

回复

使用道具 举报

7

主题

107

回帖

48

VC币

高级会员

Rank: 4

积分
25000
Ryougi_Kukoc  楼主| 发表于 2020-7-21 13:20:57 | 显示全部楼层
孤雨独火 发表于 2020-7-21 13:00
效率差不多,sinc的质量不如spline36(官方说法,实际看片)。box这个算法太非主流了吧,我第一次见到(文 ...

scale和cscale的部分,我会再研究一下的,感谢建议
回复

使用道具 举报

您需要登录后才可以回帖 登录 | 立即注册

本版积分规则

快速回复 返回顶部 返回列表