Quote:
Originally Posted by HolyWu
Generally I don't recommend invoking filters within FrameEval unless unavoidable, because that introduces extra overhead.
PHP Code:
from vapoursynth import core
import vapoursynth as vs
import functools
def frame_eval(n, clip):
return core.misc.AverageFrames(clip, weights=[1] * 5)
clip = core.std.BlankClip(width=720, height=480, format=vs.YUV420P8, length=10000)
#clip = core.misc.AverageFrames(clip, weights=[1] * 5)
# I get 1014.60 fps
#clip = core.std.FrameEval(clip, functools.partial(frame_eval, clip=clip))
# I get 566.09 fps
clip.set_output()
You should assign the filtered result to a variable outside FrameEval and then pass it in via functools.partial() as additional argument if possible.
|
Why didn't I think of that... it works perfectly.