Selur's Little Message Board
Hybrid 2022.03.20.1: No module named 'vsdpir' - Printable Version

+- Selur's Little Message Board (https://forum.selur.net)
+-- Forum: Hybrid - Support (https://forum.selur.net/forum-1.html)
+--- Forum: Problems & Questions (https://forum.selur.net/forum-3.html)
+--- Thread: Hybrid 2022.03.20.1: No module named 'vsdpir' (/thread-2330.html)

Pages: 1 2 3 4 5 6 7 8


RE: Hybrid 2022.03.20.1: No module named 'vsdpir' - Selur - 27.03.2022

You don't have to necessarily copy the dlls, installing the runtimes system wide is also a solution.

Cu Selur


RE: Hybrid 2022.03.20.1: No module named 'vsdpir' - sowbran - 28.03.2022

I have the same problem, im using BasicVSR++ and the preview works, but i cant encode the video.

But i get this warning title:


Quote:p, li { white-space: pre-wrap; }


C:\Program Files\Hybrid\64bit\Vapoursynth\Lib\site-packages\torch\functional.py:445: UserWarning: torch.meshgrid: in an upcoming release, it will be required to pass the indexing argument. (Triggered internally at ..\aten\src\ATen\native\TensorShape.cpp:2157.)
return _VF.meshgrid(tensors, **kwargs) # type: ignore[attr-defined]



C:\Program Files\Hybrid\64bit\Vapoursynth\Lib\site-packages\torch\functional.py:445: UserWarning: torch.meshgrid: in an upcoming release, it will be required to pass the indexing argument. (Triggered internally at ..\aten\src\ATen\native\TensorShape.cpp:2157.)
return _VF.meshgrid(tensors, **kwargs) # type: ignore[attr-defined]

[Image: M7S40QXM_o.png]

[Image: Bbx8FFXK_o.png]


RE: Hybrid 2022.03.20.1: No module named 'vsdpir' - Selur - 28.03.2022

I doubt it's the same issue, since BasicVSR++ has totally different dependencies, but without a debug output (read sticky) I can't tell for sure.
-> will look at your debug output after work if you post one.

--
side note: if you want to upgrade to the latest BasicVSR++, you need to call:
python -m pip install mmcv-full -f https://download.openmmlab.com/mmcv/dist/cu113/torch1.11/index.html
python -m pip install tqdm
python -m pip install opencv-python
python -m pip install --upgrade vsbasicvsrpp
python -m vsbasicvsrpp

Cu Selur


RE: Hybrid 2022.03.20.1: No module named 'vsdpir' - Dan64 - 28.03.2022

I was finally able to get the preview window working by performing a full installation of CUDA 11.4 developer option.

But the encoding still crash, I attached the debug output.


RE: Hybrid 2022.03.20.1: No module named 'vsdpir' - Selur - 28.03.2022

Quote:NVEnc output: y4m: failed to parse y4m header.
Seems like there's still an issue with the decoding of the script.


RE: Hybrid 2022.03.20.1: No module named 'vsdpir' - Dan64 - 28.03.2022

I was able to encode the script using vsViewer, below I attached the image of encoding

[Image: Debug-Encoding.png]


RE: Hybrid 2022.03.20.1: No module named 'vsdpir' - Selur - 28.03.2022

According to the debug output:
"D:\Programs\Hybrid\64bit\Vapoursynth\vspipe.exe" "F:\VideoTests\Test_vsDpir\encodingTempSynthSkript_2022-03-28@08_07_35_2910.vpy" - -c y4m | "D:\Programs\Hybrid\64bit\NVEncC.exe" --y4m -i - --fps 25.000 --codec h265 --profile main10 --level auto --tier high --sar 1:1 --lookahead 16 --output-depth 10 --vbrhq 0 --vbr-quality 22.00 --aq --aq-strength 1 --aq-temporal --gop-len 0 --ref 3 --nonrefp --bframes 3 --bref-mode each --mv-precision Q-pel --preset default --colorrange limited --colormatrix bt709 --cuda-schedule sync --psnr --ssim --output "F:\VideoTests\Test_vsDpir\Test_video_1m_new_2022-03-28@08_07_35_2910_02.265"
aborts with the above message. The calls seem fine to me.
-> will look at it after work.

Cu Selur


RE: Hybrid 2022.03.20.1: No module named 'vsdpir' - sowbran - 28.03.2022

(28.03.2022, 05:25)Selur Wrote: I doubt it's the same issue, since BasicVSR++ has totally different dependencies, but without a debug output (read sticky) I can't tell for sure.
-> will look at your debug output after work if you post one.

--
side note: if you want to upgrade to the latest BasicVSR++, you need to call:
python -m pip install mmcv-full -f https://download.openmmlab.com/mmcv/dist/cu113/torch1.11/index.html
python -m pip install tqdm
python -m pip install opencv-python
python -m pip install --upgrade vsbasicvsrpp
python -m vsbasicvsrpp

Cu Selur

Here's the debug file, thanks so much for your help

https://www.mediafire.com/file/zf0ut8n4soefxiw/HybridDebugOutput.txt/file


RE: Hybrid 2022.03.20.1: No module named 'vsdpir' - Selur - 28.03.2022

@sowbran:
y4m [error]: bad sequence header magic
x264 [error]: could not open input file `-'
is the error x264 reports when called with:
"C:\Program Files\Hybrid\64bit\Vapoursynth\vspipe.exe" "C:\Users\Nefi\AppData\Local\Temp\encodingTempSynthSkript_2022-03-27@00_47_22_7010.vpy" - -c y4m | "C:\Program Files\Hybrid\64bit\x264.exe" --preset veryfast --crf 2.00 --profile high --level 4.1 --ref 3 --direct auto --b-adapt 0 --sync-lookahead 18 --qcomp 0.50 --rc-lookahead 40 --qpmax 51 --partitions i4x4,p8x8,b8x8 --no-fast-pskip --subme 5 --aq-mode 0 --vbv-maxrate 62500 --vbv-bufsize 78125 --sar 1:1 --non-deterministic --range tv --colormatrix bt470bg --demuxer y4m --input-range tv --fps 30033/1000 --output-depth 8 --output "C:\Users\Nefi\AppData\Local\Temp\2022-03-27@00_47_22_7010_02.264" -
which normally indicates a problem with the script, but the script:
# Imports
import vapoursynth as vs
# getting Vapoursynth core
core = vs.core
# Loading Plugins
core.std.LoadPlugin(path="C:/Program Files/Hybrid/64bit/vsfilters/SourceFilter/LSmashSource/vslsmashsource.dll")
# source: 'C:\Users\Nefi\Videos\LOVETAKES.webm'
# current color space: YUV420P8, bit depth: 8, resolution: 634x480, fps: 30.033, color matrix: 470bg, yuv luminance scale: limited, scanorder: progressive
# Loading C:\Users\Nefi\Videos\LOVETAKES.webm using LWLibavSource
clip = core.lsmas.LWLibavSource(source="C:/Users/Nefi/Videos/LOVETAKES.webm", format="YUV420P8", cache=0, prefer_hw=0)
# Setting color matrix to 470bg.
clip = core.std.SetFrameProps(clip, _Matrix=5)
clip = clip if not core.text.FrameProps(clip,'_Transfer') else core.std.SetFrameProps(clip, _Transfer=5)
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 30.033
clip = core.std.AssumeFPS(clip=clip, fpsnum=30033, fpsden=1000)
clip = core.std.AddBorders(clip=clip, left=0, right=6, top=0, bottom=0) # add borders to archive mod 8 (vsBasicVSRPPFilter) - 640x480
# adjusting color space from YUV420P8 to RGBS for vsBasicVSRPPFilter
clip = core.resize.Bicubic(clip=clip, format=vs.RGBS, matrix_in_s="470bg", range_s="limited")
# Quality enhancement using BasicVSR++
from vsbasicvsrpp import BasicVSRPP
clip = BasicVSRPP(clip=clip, model=3, fp16=True)
clip = core.std.CropRel(clip=clip, left=0, right=6, top=0, bottom=0) # removing borders (vsBasicVSRPPFilter) -  634x480
# adjusting output color from: RGBS to YUV420P8 for x264Model
clip = core.resize.Bicubic(clip=clip, format=vs.YUV420P8, matrix_s="470bg", range_s="limited")
# set output frame rate to 30.033fps
clip = core.std.AssumeFPS(clip=clip, fpsnum=30033, fpsden=1000)
# Output
clip.set_output()
looks fine too.
Ony thing that looks strange is the frame rate of the input, but I assume the input is vfr and the frame rate is correct.

Does:
"C:\Program Files\Hybrid\64bit\Vapoursynth\vspipe.exe" --info "C:\Users\Nefi\AppData\Local\Temp\encodingTempSynthSkript_2022-03-27@00_47_22_7010.vpy"

correctly report the characteristics of the clip?

In case it does, if you call:
"C:\Program Files\Hybrid\64bit\Vapoursynth\vspipe.exe" --progress -c y4m "C:\Users\Nefi\AppData\Local\Temp\encodingTempSynthSkript_2022-03-27@00_47_22_7010.vpy"  C:\Users\Nefi\Videos\test.y4m"
does it create test.y4m ? (Warning: this will create an uncompressed file which will be huge if it works)


What NVIDIA drivers are you using? (I'm using 512.15 here)

Cu Selur

Ps.: I assume the Vapoursynth Preview does work correctly and shows no errors like it does for Dan64.


RE: Hybrid 2022.03.20.1: No module named 'vsdpir' - Selur - 28.03.2022

@Dan64: I tried to reproduce the issue in Hybrid but couldn't then using:
"D:\Programs\Hybrid\64bit\Vapoursynth\vspipe.exe" "F:\VideoTests\Test_vsDpir\encodingTempSynthSkript_2022-03-28@08_07_35_2910.vpy" - -c y4m | "D:\Programs\Hybrid\64bit\NVEncC.exe" --y4m -i - --fps 25.000 --codec h265 --profile main10 --level auto --tier high --sar 1:1 --lookahead 16 --output-depth 10 --vbrhq 0 --vbr-quality 22.00 --aq --aq-strength 1 --aq-temporal --gop-len 0 --ref 3 --nonrefp --bframes 3 --bref-mode each --mv-precision Q-pel --preset default --colorrange limited --colormatrix bt709 --cuda-schedule sync --psnr --ssim --output "F:\VideoTests\Test_vsDpir\Test_video_1m_new_2022-03-28@08_07_35_2910_02.265"
adjusted to:
"i:\Hybrid\64bit\Vapoursynth\vspipe.exe" "e:\Temp\encodingTempSynthSkript_2022-03-28@15_02_32_2510.vpy" - -c y4m | "D:\Programs\Hybrid\64bit\NVEncC.exe" --y4m -i - --fps 25.000 --codec h265 --profile main10 --level auto --tier high --sar 1:1 --lookahead 16 --output-depth 10 --vbrhq 0 --vbr-quality 22.00 --aq --aq-strength 1 --aq-temporal --gop-len 0 --ref 3 --nonrefp --bframes 3 --bref-mode each --mv-precision Q-pel --preset default --colorrange limited --colormatrix bt709 --cuda-schedule sync --psnr --ssim --output "E:\Temp\Test_video_1m_new_2022-03-28@08_07_35_2910_02.265"
and a similar script to the one you used, encoding works fine here too.
-> So it's not a problem with the script or the calls, but with the setup. :/

Just to be sure:
You don't have Vapoursynth installed in your system (aside from the portable version Hybrid comes with), right?

Does calling:
"D:\Programs\Hybrid\64bit\Vapoursynth\vspipe.exe" "F:\VideoTests\Test_vsDpir\encodingTempSynthSkript_2022-03-28@08_07_35_2910.vpy" - -c y4m | "D:\Programs\Hybrid\64bit\NVEncC.exe" --y4m -i - --fps 25.000 --codec h265 --profile main10 --level auto --tier high --sar 1:1 --lookahead 16 --output-depth 10 --vbrhq 0 --vbr-quality 22.00 --aq --aq-strength 1 --aq-temporal --gop-len 0 --ref 3 --nonrefp --bframes 3 --bref-mode each --mv-precision Q-pel --preset default --colorrange limited --colormatrix bt709 --cuda-schedule sync --psnr --ssim --output "F:\VideoTests\Test_vsDpir\Test_video_1m_new_2022-03-28@08_07_35_2910_02.265"
work for you?

Cu Selur