找回密码
 立即注册
查看: 3242|回复: 12

各位能不能帮我看一下这个mpv的Profile条件能不能再修改一下

12

主题

56

回帖

0

VC币

中级会员

Rank: 3Rank: 3

积分
4039
kitanosan 发表于 2021-1-20 23:07:40 | 显示全部楼层 |阅读模式
本帖最后由 kitanosan 于 2021-1-20 23:24 编辑

出于节省性能的考虑,受到万年冷冻库文章中关于“Artifact Removal”的讲解的启发,我打算设置几个Profiles,当视频分辨率大于2560x1440且色深为10Bit及以上时设置deband=no,其余条件下保持启用。
然后根据在mpv.io查到的内容,我的Profiles条件是这么写的(我用的是d3d11va解码)。
8Bit:
  1. profile-cond=((p["video-params/w"]>2560 and p["video-params/h"]>1440)  and (p["video-params/hw-pixelformat"]=="nv12" or p["video-params/hw-pixelformat"]=="yuy2" or p["video-params/hw-pixelformat"]=="yv24" or p["video-params/hw-pixelformat"]=="rgb32" or p["video-params/hw-pixelformat"]=="yv12" or p["video-params/hw-pixelformat"]=="uyvy" or p["video-params/hw-pixelformat"]=="ayuv" or p["video-params/hw-pixelformat"]=="rgb24"))
复制代码
非8Bit:
  1. profile-cond=((p["video-params/w"]>2560 and p["video-params/h"]>1440) and (p["video-params/hw-pixelformat"]~="nv12" and p["video-params/hw-pixelformat"]~="yuy2" and p["video-params/hw-pixelformat"]~="yv24" and p["video-params/hw-pixelformat"]~="rgb32" and p["video-params/hw-pixelformat"]~="yv12" and p["video-params/hw-pixelformat"]~="uyvy" and p["video-params/hw-pixelformat"]~="ayuv" and p["video-params/hw-pixelformat"]~="rgb24"))
复制代码
(为什么我能写怎么多,别问,问就是照着LAV的8Bit那两栏抄下来的)
说实话这么一大堆看着有点头疼……各位能不能帮忙看看能不能做出简化,或者有没有什么问题,或者……有没有必要?
回复

使用道具 举报

47

主题

2781

回帖

2020

VC币

星辰大海

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

积分
432683

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

孤雨独火 发表于 2021-1-21 03:07:32 | 显示全部楼层
本帖最后由 孤雨独火 于 2021-1-21 04:02 编辑

说实话没必要...这个直接快捷键多方便
mpv的默认deband在渣机上很占性能吗,我没测试过(主力机开关没有感知

============

我看了几遍,真的各种意义上很多东西都没必要

我给出我的建议2:分辨率这个要求好奇怪,可以直接无视,只针对位深处理,8bit一律deband开启。mpv似乎没有bit depths这个属性参数,不然可以简化好多。p.s.我的版本里通用参数是默认关闭deband的

  1. [DEBAND]
  2. profile-desc=8位的源启用去色带
  3. profile-cond=p["video-params/hw-pixelformat"]=="nv12" or p["video-params/pixelformat"]=="yuv420p"

  4. deband

  5. profile-restore=copy
复制代码
防止手滑或者别的情况中途切成软解了也好对付。。。那些奇奇怪怪的非主流格式就别考虑了(你见过相关的实际成品吗

回复

使用道具 举报

12

主题

56

回帖

0

VC币

中级会员

Rank: 3Rank: 3

积分
4039
kitanosan  楼主| 发表于 2021-1-21 10:48:11 | 显示全部楼层
本帖最后由 kitanosan 于 2021-1-21 11:05 编辑
孤雨独火 发表于 2021-1-21 03:07
说实话没必要...这个直接快捷键多方便
mpv的默认deband在渣机上很占性能吗,我没测试过(主力机开关没有感 ...

我的配置文件(部分)如下:
  1. #Video
  2. hwdec=auto-safe
  3. gpu-api=d3d11
  4. vo=gpu
  5. hr-seek-framedrop=yes
  6. video-sync=display-resample
  7. #video-sync-max-video-change=5
  8. interpolation
  9. tscale=oversample
  10. #d3d11va-zero-copy=no
  11. gpu-shader-cache-dir="~~/shaders_cache"
  12. icc-profile-auto
  13. icc-3dlut-size=256x256x256
  14. icc-cache-dir="~~/icc_cache"
  15. target-prim=auto

  16. [High Quality Base]
  17. profile=gpu-hq
  18. scale=ewa_lanczossharp
  19. cscale=bicubic
  20. dscale=bicubic
  21. scale-antiring=1.0
  22. cscale-param1=0.6
  23. cscale-param2=0.4
  24. cscale-antiring=1.0
  25. dscale-param1=0
  26. dscale-param2=1.5
  27. dscale-antiring=1.0
  28. fbo-format=rgba32f #rgba16hf rgba32f
  29. vd-lavc-threads=0
  30. deband=no

  31. [UHDSDR]
  32. profile-cond=((p["video-params/w"]>2560 and p["video-params/h"]>1440) and p["estimated-vf-fps"]<31 and p["video-params/primaries"]~="bt.2020")
  33. profile=High Quality Base
  34. profile-restore=copy
  35. fbo-format=auto
  36. glsl-shaders-clr
  37. #glsl-shaders-append="~~/shaders/acme-0.5x.hook"
  38. #glsl-shaders-append="~~/shaders/KrigBilateral.glsl"
  39. #glsl-shaders-append="~~/shaders/SSimDownscaler.glsl"
  40. #dscale=mitchell
  41. #linear-downscaling=no
  42. #glsl-shaders-append="~~/shaders/adaptive-sharpen.glsl"
  43. #sigmoid-upscaling=no

  44. [Deband]
  45. profile-cond=p["video-params/hw-pixelformat"]=="nv12" or p["video-params/pixelformat"]=="yuv420p"
  46. deband
  47. profile-restore=copy
复制代码

片源是从B站上下载的Dreamin ChuChu 翻唱【鹿乃】4K版本。
实测开启deband/关闭deband后:
屏幕截图 2021-01-21 103545.png 屏幕截图 2021-01-21 103627.png
deband在渣机播放4K视频时的影响还是不能忽视的。
另外似乎mpv不支持将一个Profile的内容转至另一个Profile?总之它显示应用Deband和UHDSDR后结果是未开启deband……不知道是为什么。
另外,您提到的快捷键切换Deband,能不能具体说明一下?

点评

你看我懒人包里的input.conf  发表于 2021-1-21 16:02
deband是否启用这个竞争问题,把High Quality Base也变成自动配置,条件为 UHDSDR-cond and not Deband-cond 这样  发表于 2021-1-21 14:11
性能问题把fbo-format=rgba32f注释掉  发表于 2021-1-21 14:09
回复

使用道具 举报

3

主题

199

回帖

0

VC币

荣誉会员

Rank: 14Rank: 14Rank: 14Rank: 14

积分
87112
Starlight 发表于 2021-1-21 14:04:10 | 显示全部楼层
原本有位深度的属性,后来没了
https://github.com/Moodkiller/MPV-Made-Easy/issues/7

我个人是这样判断的
profile-cond=p["video-params/average-bpp"] < 24


  1. [stronger-deband]
  2. # yuv420p: 12
  3. # yuv420p10: 24
  4. # yuv444p10: 44
  5. profile-cond=p["video-params/average-bpp"] < 24
  6. profile-restore=copy
  7. deband-threshold=128
  8. deband-grain=24
复制代码
回复

使用道具 举报

12

主题

56

回帖

0

VC币

中级会员

Rank: 3Rank: 3

积分
4039
kitanosan  楼主| 发表于 2021-1-21 16:10:14 | 显示全部楼层
Starlight 发表于 2021-1-21 14:04
原本有位深度的属性,后来没了
https://github.com/Moodkiller/MPV-Made-Easy/issues/7

这个条件似乎无法生效,实测确认。
回复

使用道具 举报

12

主题

56

回帖

0

VC币

中级会员

Rank: 3Rank: 3

积分
4039
kitanosan  楼主| 发表于 2021-1-21 16:17:17 | 显示全部楼层
孤雨独火 发表于 2021-1-21 03:07
说实话没必要...这个直接快捷键多方便
mpv的默认deband在渣机上很占性能吗,我没测试过(主力机开关没有感 ...

问题现在有了一些进展。我按`打开mpv的控制台后发现mpv先调用的是Deband,然后调用的是UHDSDR,UHDSDR引用了High Quality Base,High Quality Base里又明确写了deband=no。于是就会出现即使Deband符合条件启用也会被后续的UHDSDR覆盖设置的情况。
将High Quality Base的内容改写成以下后问题基本解决:
  1. scale=ewa_lanczossharp
  2. cscale=bicubic
  3. dscale=bicubic
  4. scale-antiring=1.0
  5. cscale-param1=0.6
  6. cscale-param2=0.4
  7. cscale-antiring=1.0
  8. dscale-param1=0
  9. dscale-param2=1.5
  10. dscale-antiring=1.0
  11. dither-depth=auto
  12. correct-downscaling
  13. linear-downscaling
  14. sigmoid-upscaling
  15. fbo-format=rgba16hf #rgba16hf rgba32f
  16. vd-lavc-threads=0
复制代码
当然也有小瑕疵:凡是非8Bit视频都会关闭去色带。这也只能根据您提到的那样在input.conf里设置去色带的快捷键了。
总之非常感谢。
回复

使用道具 举报

47

主题

2781

回帖

2020

VC币

星辰大海

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

积分
432683

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

孤雨独火 发表于 2021-1-21 16:35:17 | 显示全部楼层
本帖最后由 孤雨独火 于 2021-1-21 16:37 编辑
kitanosan 发表于 2021-1-21 16:17
问题现在有了一些进展。我按`打开mpv的控制台后发现mpv先调用的是Deband,然后调用的是UHDSDR,UHDSDR引 ...

我再补点说明

icc-3dlut-size 这个默认值就可以了,icc的加载也是影响性能的
target-prim 加载icc就不需要这个了,当然你写的是默认值,不影响
xscale-antiring 这几个抗振铃不支持bilinear和bicubic_fast以及EWA全系
fbo-format 楼上讲了,和icc size差不多属于感知不强,性能徒增的类型
vd-lavc-threads 这个默认不就是0吗...

附全部缩放算法:(括号里带t的那些是tscale能用的)
  1. 以下 scale dscale cscale 都可用

  2.     bilinear
  3.     bicubic_fast
  4.     oversample (t)
  5. *** linear (这个只有tscale能用)
  6.     spline16 (t)
  7.     spline36 (t)
  8.     spline64 (t)
  9.     sinc (t)
  10.     lanczos (t)
  11.     ginseng (t)
  12.     jinc
  13.     ewa_lanczos
  14.     ewa_hanning
  15.     ewa_ginseng
  16.     ewa_lanczossharp
  17.     ewa_lanczossoft
  18.     haasnsoft
  19.     bicubic (t)
  20.     bcspline (t)
  21.     catmull_rom (t)
  22.     mitchell (t)
  23.     robidoux (t)
  24.     robidouxsharp (t)
  25.     ewa_robidoux
  26.     ewa_robidouxsharp
  27.     box (t)
  28.     nearest (t)
  29.     triangle (t)
  30.     gaussian (t)
复制代码


点评

感谢补充  发表于 2021-1-21 16:57
回复

使用道具 举报

3

主题

199

回帖

0

VC币

荣誉会员

Rank: 14Rank: 14Rank: 14Rank: 14

积分
87112
Starlight 发表于 2021-1-21 22:58:54 | 显示全部楼层

  1. [High Quality Base]
  2. profile-cond=not p["video-params/average-bpp"] < 24 and ((p["video-params/w"]>2560 and p["video-params/h"]>1440) and p["estimated-vf-fps"]<31 and p["video-params/primaries"]~="bt.2020")
复制代码

这样写就是了,再把profile=High Quality Base去掉

点评

非常感谢。  发表于 2021-1-21 23:52
回复

使用道具 举报

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

本版积分规则

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