hooke007 / MPV_lazy

🔄 mpv player 播放器折腾记录 windows conf ; 中文注释配置 快速帮助入门 ; mpv-lazy 懒人包 win10 x64 config
https://hooke007.github.io
Other
4.28k stars 156 forks source link

[k7sfunc] MVT_STD 错误的参数 #397

Closed FlyGoat closed 11 months ago

FlyGoat commented 11 months ago

Log:

[vapoursynth] Script evaluation failed:
[vapoursynth] Python exception: Analyse: Function does not take argument(s) named _lambda
[vapoursynth] 
[vapoursynth] Traceback (most recent call last):
[vapoursynth]   File "src/cython/vapoursynth.pyx", line 3124, in vapoursynth._vpy_evaluate
[vapoursynth]   File "src/cython/vapoursynth.pyx", line 3125, in vapoursynth._vpy_evaluate
[vapoursynth]   File "/home/flygoat/.config/mpv/vs/MEMC_MVT_STD.vpy", line 23, in <module>
[vapoursynth]     clip = k7f.MVT_STD(clip, fps_in=container_fps, fps_out=Fps_Out)
[vapoursynth]            ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
[vapoursynth]   File "/usr/lib/python3.11/k7sfunc.py", line 1035, in MVT_STD
[vapoursynth]     cut_b = core.mv.Analyse(super=cut_s, blksize=64, searchparam=0, pelsearch=3, isb=True, _lambda=0, lsad=10000, overlapv=16, badrange=0, search_coarse=4)
[vapoursynth]             ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
[vapoursynth]   File "src/cython/vapoursynth.pyx", line 2828, in vapoursynth.Function.__call__
[vapoursynth] vapoursynth.Error: Analyse: Function does not take argument(s) named _lambda
[vapoursynth] 
[vapoursynth] could not init VS
Disabling filter vapoursynth.00 because it has failed.

Workaround:

--- ./k7sfunc.py        2023-12-26 18:03:25.151083958 +0000
+++ /usr/lib/python3.11/k7sfunc.py      2023-12-26 17:50:28.712130159 +0000
@@ -1032,8 +1032,8 @@

        cut1 = core.std.AssumeFPS(clip=cut0, fpsnum=int(vfps), fpsden=vden)
        cut_s = core.mv.Super(clip=cut1, sharp=1, rfilter=4)
-       cut_b = core.mv.Analyse(super=cut_s, blksize=64, searchparam=0, pelsearch=3, isb=True, _lambda=0, lsad=10000, overlapv=16, badrange=0, search_coarse=4)
-       cut_f = core.mv.Analyse(super=cut_s, blksize=64, searchparam=0, pelsearch=3, _lambda=0, lsad=10000, overlapv=16, badrange=0, search_coarse=4)
+       cut_b = core.mv.Analyse(super=cut_s, blksize=64, searchparam=0, pelsearch=3, isb=True, **{'lambda': 0}, lsad=10000, overlapv=16, badrange=0, search_coarse=4)
+       cut_f = core.mv.Analyse(super=cut_s, blksize=64, searchparam=0, pelsearch=3, **{'lambda': 0}, lsad=10000, overlapv=16, badrange=0, search_coarse=4)

        output = core.mv.BlockFPS(clip=cut1, super=cut_s, mvbw=cut_b, mvfw=cut_f, num=fps_out * 1000, den=vden, mode=2, thscd1=970, thscd2=255, blend=False)
        if w_tmp + h_tmp > 0 :

Thanks

hooke007 commented 11 months ago

我不认为这是py11的问题,你在使用过时版本的vapoursynth吗? 可以复现了

hooke007 commented 11 months ago

我在移除旧vs支持的时候删去了错误的行。 https://github.com/hooke007/MPV_lazy/blob/50b83d28290942ffa7980606f322f082ac0cf366/k7sfunc.py#L955-L960