分页: 1 / 1

新手求助:VapourSynth安装问题

发表于 : 2021-09-22 2:13
Jeoitim
所有选项默认安装了python3.9.7(64bit)和VapourSynth R55(64bit)后,打开vsedit编辑:

import vapoursynth as vs
import sys
import havsfunc as haf
import mvsfunc as mvf
core = vs.get_core()
core.max_cache_size = 2000
a="1.mkv"
src = core.lsmas.LWLibavSource(a,threads=1)
src = core.std.SetFrameProp(src, prop="_FieldBased", intval=0)
src = mvf.ToRGB(src)
src.set_output()

按F5测试时出现了这样的错误:

Failed to evaluate the script:
Python exception: No module named 'havsfunc'

Traceback (most recent call last):
File "src\cython\vapoursynth.pyx", line 2728, in vapoursynth._vpy_evaluate
File "src\cython\vapoursynth.pyx", line 2729, in vapoursynth._vpy_evaluate
File "D:/Downloads/ANIME/Untitled.vpy", line 3, in
import havsfunc as haf
ModuleNotFoundError: No module named 'havsfunc'

在python命令行输入以下指令确认版本号:
import vapoursynth as vs
core = vs.get_core()
print(core.version())

出现以下错误:
>>> import vapoursynth as vs
>>> core = vs.get_core()
Traceback (most recent call last):
File "<stdin>", line 1, in <module>
AttributeError: module 'vapoursynth' has no attribute 'get_core'
>>> print(core.version())
Traceback (most recent call last):
File "<stdin>", line 1, in <module>
NameError: name 'core' is not defined
>>>

在python module docs里面找到vapoursynth,并没有“get_core”的function也没有“havsfunc”的module
图片
求解

Re: 新手求助:VapourSynth安装问题

发表于 : 2021-09-22 11:39
vxzms
R55 更新为了 API4,vs.get_core() 已经无效,应该使用 core=vs.core 或者 from vapoursynth import core,而且原版的 vsedit 会失效需要换成 https://github.com/YomikoR/VapourSynth-Editor

如果想继续使用现在的 vs.get_core() 和 vsedit,则需要使用 R55-API3

Re: 新手求助:VapourSynth安装问题

发表于 : 2023-01-13 15:30
SH_Youth
我也有同样的问题