johnsonspn
帖子: 8
注册时间: 2020-05-31 18:18

关于新版本VS一些插件的兼容问题

如题,我安装了VapourSynth R56与VSedit r19mod4后尝试运行脚本,发现一些插件存在兼容问题。如使用mvsfunc,出现如下错误:

Failed to evaluate the script:
Python exception: module 'vapoursynth' has no attribute 'get_core'

Traceback (most recent call last):
File "src\cython\vapoursynth.pyx", line 2832, in vapoursynth._vpy_evaluate
File "src\cython\vapoursynth.pyx", line 2833, in vapoursynth._vpy_evaluate
File "G:\name4.vpy", line 12, in
result = mvf.ToYUV(result,css='420',depth=16)
File "C:\Program Files\Python\lib\site-packages\mvsfunc.py", line 528, in ToYUV
core = vs.get_core()
AttributeError: module 'vapoursynth' has no attribute 'get_core'

在将插件代码中core = vs.get_core()全部替换为core = vs.core后,仍出现如下错误:

Failed to evaluate the script:
Python exception: module 'vapoursynth' has no attribute 'YCOCG'

Traceback (most recent call last):
File "src\cython\vapoursynth.pyx", line 2832, in vapoursynth._vpy_evaluate
File "src\cython\vapoursynth.pyx", line 2833, in vapoursynth._vpy_evaluate
File "G:\name4.vpy", line 12, in
result = mvf.ToYUV(result,css='420',depth=16)
File "C:\Program Files\Python\lib\site-packages\mvsfunc.py", line 536, in ToYUV
matrix = GetMatrix(input, matrix, False)
File "C:\Program Files\Python\lib\site-packages\mvsfunc.py", line 2448, in GetMatrix
sIsYCOCG = sColorFamily == vs.YCOCG
AttributeError: module 'vapoursynth' has no attribute 'YCOCG'

经查阅VapourSynth官方文档,发现他们似乎取消了对Ycocg和COMPAT色空间的支持:
The color family constants describe groups of formats and the basic way their color information is stored. You should be familiar with all of them apart from maybe YCOCG and COMPAT. The latter is a special junk category for non-planar formats.
http://www.vapoursynth.com/doc/pythonre ... #constants

但关于这部分的代码我是真不会改
lyglay1991
帖子: 33
注册时间: 2013-01-05 18:15

Re: 关于新版本VS一些插件的兼容问题

R55开始就取消对api3/2的支持了。建议要么使用R54,或者就是vapoursynth-classic
,以确保所有滤镜的兼容性

回到 “VapourSynth”