Log in

View Full Version : vcm, can't find missing dependency :(


Selur
20th September 2020, 13:03
I'm trying to get vcm.fan (and others) working using portable 64bit Vapoursynth.

when using:
# Imports
import vapoursynth as vs
core = vs.get_core()
# Loading Plugins
core.std.LoadPlugin(path="I:/Hybrid/64bit/vsfilters/SourceFilter/LSmashSource/vslsmashsource.dll")
core.std.LoadPlugin(path="I:/Hybrid/64bit/vsfilters/MiscFilter/vcm.dll")
# loading source: F:\TestClips&Co\files\10bit Test.mkv
# color sampling YUV420P10@10, matrix:470bg, scantyp: progressive
# luminance scale TV
# resolution: 640x352
# frame rate: -1 fps
# input color space: YUV420P10, bit depth: 10, resolution: 640x352, fps: 25
# Loading F:\TestClips&Co\files\10bit Test.mkv using LWLibavSource
clip = core.lsmas.LWLibavSource(source="F:/TestClips&Co/files/10bit Test.mkv", format="YUV420P10", cache=0)
# making sure input color matrix is set as 470bg
clip = core.resize.Point(clip, matrix_in_s="470bg",range_s="limited")
# making sure frame rate is set to 25
clip = core.std.AssumeFPS(clip, fpsnum=25, fpsden=1)
# Setting color range to TV (limited) range.
clip = core.std.SetFrameProp(clip=clip, prop="_ColorRange", intval=1)
clip = core.vcm.fan(clip=clip,span=1,edge=1,uv=1,plus=0.02,minus=0.02)

# Output
clip.set_output()

I get:
Traceback (most recent call last):
File "src\cython\vapoursynth.pyx", line 2244, in vapoursynth.vpy_evaluateScript
File "src\cython\vapoursynth.pyx", line 2245, in vapoursynth.vpy_evaluateScript
File "C:\Users\Selur\Desktop\test.vpy", line 6, in <module>
core.std.LoadPlugin(path="I:/Hybrid/64bit/vsfilters/MiscFilter/vcm.dll")
File "src\cython\vapoursynth.pyx", line 2069, in vapoursynth.Function.__call__
vapoursynth.Error: Failed to load I:/Hybrid/64bit/vsfilters/MiscFilter/vcm.dll. GetLastError() returned 126. The file you tried to load or one of its dependencies is probably missing.


Okay, since it's a domain frequency filter it might depend on fft3w (even so neither the Avisynth documentation of http://www.avisynth.nl/users/vcmohan/FanFilter/FanFilter.html or the fan.html which comes with the plugin mentions it).
So I modified the script to:
# Imports
import os
import sys
import ctypes
# Loading Support Files
Dllref = ctypes.windll.LoadLibrary("I:/Hybrid/64bit/vsfilters/Support/libfftw3f-3.dll") # I tested with libfftw3f-3, libfftw3l-3, libfftw3-3
import vapoursynth as vs
core = vs.get_core()
# Loading Plugins
core.std.LoadPlugin(path="I:/Hybrid/64bit/vsfilters/SourceFilter/LSmashSource/vslsmashsource.dll")
core.std.LoadPlugin(path="I:/Hybrid/64bit/vsfilters/MiscFilter/vcm.dll")
# loading source: F:\TestClips&Co\files\10bit Test.mkv
# color sampling YUV420P10@10, matrix:470bg, scantyp: progressive
# luminance scale TV
# resolution: 640x352
# frame rate: -1 fps
# input color space: YUV420P10, bit depth: 10, resolution: 640x352, fps: 25
# Loading F:\TestClips&Co\files\10bit Test.mkv using LWLibavSource
clip = core.lsmas.LWLibavSource(source="F:/TestClips&Co/files/10bit Test.mkv", format="YUV420P10", cache=0)
# making sure input color matrix is set as 470bg
clip = core.resize.Point(clip, matrix_in_s="470bg",range_s="limited")
# making sure frame rate is set to 25
clip = core.std.AssumeFPS(clip, fpsnum=25, fpsden=1)
# Setting color range to TV (limited) range.
clip = core.std.SetFrameProp(clip=clip, prop="_ColorRange", intval=1)
clip = core.vcm.fan(clip=clip,span=1,edge=1,uv=1,plus=0.02,minus=0.02)

# Output
clip.set_output()
sadly that didn't help and the error is basically the same:
Traceback (most recent call last):
File "src\cython\vapoursynth.pyx", line 2244, in vapoursynth.vpy_evaluateScript
File "src\cython\vapoursynth.pyx", line 2245, in vapoursynth.vpy_evaluateScript
File "C:\Users\Selur\Desktop\test.vpy", line 11, in <module>
core.std.LoadPlugin(path="I:/Hybrid/64bit/vsfilters/MiscFilter/vcm.dll")
File "src\cython\vapoursynth.pyx", line 2069, in vapoursynth.Function.__call__
vapoursynth.Error: Failed to load I:/Hybrid/64bit/vsfilters/MiscFilter/vcm.dll. GetLastError() returned 126. The file you tried to load or one of its dependencies is probably missing.

So I thought using 64bit Dependency Walker (http://www.dependencywalker.com/) might shed some light on the problem, but loading the vcm.dll it only shows (https://ibb.co/3WnnCLx) kernel32.dll, MSVCP120.dll, MSVCR120.dll as dependencies all present and accounted for.

Does anyone have a clue what dependency I'm missing?

Thanks!

Cu Selur

ChaosKing
20th September 2020, 13:56
I does work for me. Try to update your dependencies and test again.

Selur
20th September 2020, 14:11
@ChaosKing: did you need libfftw3f-3.dll?
Thanks for testing. :)
According to Windows "Microsoft Visual C++ 2013 Redistributable (x64) - 12.0.30501" was installed.
over at:
https://support.microsoft.com/en-us/help/3179560/update-for-visual-c-2013-and-visual-c-redistributable-package
offered 12.0.40660, but installing those didn't help either.

Selur
20th September 2020, 14:28
Got it! typo in the path.

ChaosKing
20th September 2020, 14:30
[.\vcm.dll]
architecture: x86_64
machine name: AMD AMD64 (x64)
subsystem: Windows GUI
DLL: yes
stripped: no
file version: 0.0
minimum Windows version: 6.0
IMPORTS
KERNEL32.dll
MSVCP120.dll
MSVCR120.dll
EXPORTS
vcm.dll: VapourSynthPluginInit @ 1

did you need libfftw3f-3.dll?
Idk, it auto loads if necessary:)

You can test my dll versions. Maybe it helps: https://www.dropbox.com/s/t6g0reme3bm3979/deps.rar?dl=1

Selur
20th September 2020, 16:21
Everything works now. Like i wrote, it was a typo in the script which caused it. :)
Thanks.

vcmohan
9th October 2020, 08:21
I have added a new function ColorBox to this vcm plugin.
It outputs boxes of colors in all YUV formats (except YUV444PH). The frames are output for 100 sec at fps 24. May be useful as colorbars of avisynth.