This forum uses cookies
This forum makes use of cookies to store your login information if you are registered, and your last visit if you are not. Cookies are small text documents stored on your computer; the cookies set by this forum can only be used on this website and pose no security risk. Cookies on this forum also track the specific topics you have read and when you last read them. Please confirm whether you accept or reject these cookies being set.

A cookie will be stored in your browser regardless of choice to prevent you being asked this question again. You will be able to change your cookie settings at any time using the link in the footer.

Hybrid 2022.03.20.1: No module named 'vsdpir'
#65
I tried to understand the source of the problem.

I have 2 different versions of Hybrid installed on my PC, using the portable mode (i.e. local settings).

The version 2021.12.10.1 is working perfectly (no crash), while the last version 2022.03.31.1 is unable to encode the movies if I use Vapoursynth filters.

using Hibrid I generate 2 Vapoursynth script which are doing exactly the same job but are generated using the 2 different versions.

The script generated using the version 2021.12.10.1 (script V1) is the following.

# Imports
import vapoursynth as vs
# getting Vapoursynth core
core = vs.core
# Loading Plugins
core.std.LoadPlugin(path="D:/Programs/Hybrid/64bit/vsfilters/DenoiseFilter/KNLMeansCL/KNLMeansCL.dll")
core.std.LoadPlugin(path="D:/Programs/Hybrid/64bit/vsfilters/SourceFilter/LSmashSource/vslsmashsource.dll")
# source: 'F:\VideoTests\Test_vsDpir\Test_video_1m.mkv'
# current color space: YUV420P10, bit depth: 10, resolution: 1280x712, fps: 25, color matrix: 709, yuv luminance scale: limited, scanorder: progressive
# Loading F:\VideoTests\Test_vsDpir\Test_video_1m.mkv using LWLibavSource
clip = core.lsmas.LWLibavSource(source="F:/VideoTests/Test_vsDpir/Test_video_1m.mkv", format="YUV420P10", cache=0, fpsnum=25)
# making sure input color matrix is set as 709
clip = core.resize.Bicubic(clip, matrix_in_s="709",range_s="limited")
# making sure frame rate is set to 25
clip = core.std.AssumeFPS(clip=clip, fpsnum=25, fpsden=1)
# Setting color range to TV (limited) range.
clip = core.std.SetFrameProp(clip=clip, prop="_ColorRange", intval=1)
# denoising using KNLMeansCL
clip = core.knlm.KNLMeansCL(clip=clip)
# set output frame rate to 25.000fps
clip = core.std.AssumeFPS(clip=clip, fpsnum=25, fpsden=1)
# Output
clip.set_output()

The script generated using the version 2022.03.31.1 (script V2) is the following

# Imports
import os
import sys
import vapoursynth as vs
# getting Vapoursynth core
core = vs.core
# Import scripts folder
scriptPath = 'D:/Programs/Hybrid/64bit/vsscripts'
sys.path.insert(0, os.path.abspath(scriptPath))
# Loading Plugins
core.std.LoadPlugin(path="D:/Programs/Hybrid/64bit/vsfilters/DenoiseFilter/KNLMeansCL/KNLMeansCL.dll")
core.std.LoadPlugin(path="D:/Programs/Hybrid/64bit/vsfilters/SourceFilter/LSmashSource/vslsmashsource.dll")
# Import scripts
import havsfunc
# source: 'F:\VideoTests\Test_vsDpir\Test_video_1m.mkv'
# current color space: YUV420P10, bit depth: 10, resolution: 1280x712, fps: 25, color matrix: 709, yuv luminance scale: limited, scanorder: progressive
# Loading F:\VideoTests\Test_vsDpir\Test_video_1m.mkv using LWLibavSource
clip = core.lsmas.LWLibavSource(source="F:/VideoTests/Test_vsDpir/Test_video_1m.mkv", format="YUV420P10", cache=0, fpsnum=25)
# Setting color matrix to 709.
clip = core.std.SetFrameProps(clip, _Matrix=1)
clip = clip if not core.text.FrameProps(clip,'_Transfer') else core.std.SetFrameProps(clip, _Transfer=1)
clip = clip if not core.text.FrameProps(clip,'_Primaries') else core.std.SetFrameProps(clip, _Primaries=1)
# Setting color range to TV (limited) range.
clip = core.std.SetFrameProp(clip=clip, prop="_ColorRange", intval=1)
# making sure frame rate is set to 25
clip = core.std.AssumeFPS(clip=clip, fpsnum=25, fpsden=1)
# denoising using KNLMeansCL
clip = havsfunc.KNLMeansCL(clip=clip)
# set output frame rate to 25.000fps
clip = core.std.AssumeFPS(clip=clip, fpsnum=25, fpsden=1)
# Output
clip.set_output()

Then, to be sure that the proper Vapoursynth varsion is loaded, I executed the following command in the Vapoursynth folder of the selected Hybrid version.

\Vapoursynth> .\vspipe.exe "F:\VideoTests\Test_vsDpir\encodingTempSynthSkript_2022-03-31@19_42_16_V1.vpy" - -c y4m | ..\x265.exe --input - --output-depth 10 --y4m --crf 18.00 --preset fast --output "F:\VideoTests\Test_vsDpir\Test.265"

\Vapoursynth> .\vspipe.exe "F:\VideoTests\Test_vsDpir\encodingTempSynthSkript_2022-03-31@19_42_16_V2.vpy" - -c y4m | ..\x265.exe --input - --output-depth 10 --y4m --crf 18.00 --preset fast --output "F:\VideoTests\Test_vsDpir\Test.265"


The scripts were executed properly. But when I tried to execute the scripts using the Vapoursynth folder of the new Hybrid version, I started to get errors.

The First error was

Script evaluation failed:
Python exception: Plugin D:/Programs/Hybrid/64bit/vsfilters/DenoiseFilter/KNLMeansCL/KNLMeansCL.dll already loaded (com.Khanattila.KNLMeansCL) from D:/Programs/VapourSynth64Portable/VapourSynth64/vapoursynth64/plugins/KNLMeansCL.dll

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 "F:\VideoTests\Test_vsDpir\encodingTempSynthSkript_2022-03-31@19_42_16_V1.vpy", line 6, in <module>
    core.std.LoadPlugin(path="D:/Programs/Hybrid/64bit/vsfilters/DenoiseFilter/KNLMeansCL/KNLMeansCL.dll")
  File "src\cython\vapoursynth.pyx", line 2580, in vapoursynth.Function.__call__
vapoursynth.Error: Plugin D:/Programs/Hybrid/64bit/vsfilters/DenoiseFilter/KNLMeansCL/KNLMeansCL.dll already loaded (com.Khanattila.KNLMeansCL) from D:/Programs/VapourSynth64Portable/VapourSynth64/vapoursynth64/plugins/KNLMeansCL.dll

x265 [error]: unable to open input file <->

Then I commented out from the scripts the loading of dlls, but I got the following error

Script evaluation failed:
Python exception: knlm.KNLMeansCL: only YUV444P10 and RGB30 are supported!

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 "F:\VideoTests\Test_vsDpir\encodingTempSynthSkript_2022-03-31@19_42_16_V2.vpy", line 28, in <module>
    clip = havsfunc.KNLMeansCL(clip=clip)
  File "D:\Programs\Hybrid\64bit\vsscripts\havsfunc.py", line 5410, in KNLMeansCL
    return clip.knlm.KNLMeansCL(d=d, a=a, s=s, h=h, wmode=wmode, wref=wref, device_type=device_type, device_id=device_id).knlm.KNLMeansCL(
  File "src\cython\vapoursynth.pyx", line 2580, in vapoursynth.Function.__call__
vapoursynth.Error: knlm.KNLMeansCL: only YUV444P10 and RGB30 are supported!

x265 [error]: unable to open input file <->


So I suspect the y4m header problem is due to the fact that the execution of script fails.
Reply


Messages In This Thread
RE: Hybrid 2022.03.20.1: No module named 'vsdpir' - by Dan64 - 31.03.2022, 21:03

Forum Jump:


Users browsing this thread: 5 Guest(s)