Log in

View Full Version : One more help with VapourSynth


Enigma0456
2nd February 2022, 19:44
It's been almost four years since ChaosKing wrote this (https://pastebin.com/1JgR1Z9N) script and I still trying to use Vapoursynth, but every time I try an error (https://imgur.com/a/7miWCZm) appears. I already reinstalled Vapoursynth and I almost sure that I installed all mentioned plugins in the script. Would help me a lot if someone made a version for Avisynth from ChaosKing script.

poisondeathray
2nd February 2022, 19:59
https://github.com/Irrational-Encoding-Wizardry/vsutil

Enigma0456
2nd February 2022, 22:34
https://github.com/Irrational-Encoding-Wizardry/vsutil

I got another error (https://imgur.com/a/yrU4KWo).

Update: I tried to remove line 5 and guess what...

Failed to evaluate the script:
Python exception: name 'core' is not defined

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 "C:/VapourSynthEditor-r19-64bit/CK script.vpy", line 6, in
NameError: name 'core' is not defined

ChaosKing
2nd February 2022, 22:38
New VapourSynth version uses a new function: Try core = vs.core

Enigma0456
2nd February 2022, 22:49
New VapourSynth version uses a new function: Try core = vs.core

I'm receiving one more error.

Error forming pixmap from frame. Expected format CompatBGR32. Instead got 'YUV420P16'.

ChaosKing
2nd February 2022, 22:57
Download this editor https://github.com/YomikoR/VapourSynth-Editor/releases/tag/r19-mod-5-beta2
The "old" one is not compatible with newer Vapoursynth versions.

Enigma0456
2nd February 2022, 23:14
So, we getting in someplace

Failed to evaluate the script:
Python exception: knlm.KNLMeansCL: no compatible opencl platforms available!

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 "C:/R19/CK script.vpy", line 16, in
File "C:/R19/CK script.vpy", line 11, in mega
def mega(clip):
File "src\cython\vapoursynth.pyx", line 2580, in vapoursynth.Function.__call__
vapoursynth.Error: knlm.KNLMeansCL: no compatible opencl platforms available!


Update: Apparently my GPU doesn't support OpenCL

ChaosKing
2nd February 2022, 23:17
KNLMeansCL is a gpu filter, what kind of gpu is installed in your system?

Enigma0456
2nd February 2022, 23:23
It's a old GTX 550 TI. I'm screwed, right?

ChaosKing
2nd February 2022, 23:48
You card only supports opencl 1.1. You can either try this older version https://github.com/Khanattila/KNLMeansCL/releases/tag/v0.6.11
or just replace pre=clip.knlm.KNLMeansCL(d=4, a=8, h=4) with something like this pre=haf.SMDegrain(clip, tr=3, thSAD = 700, thSADC = 650, prefilter=2)

Enigma0456
3rd February 2022, 03:55
I just installed the old version of KNLMeansCL and another error appeared

Failed to evaluate the script:
Python exception: No attribute with the name rgvs exists. Did you mistype a plugin namespace?

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 "C:/R19/CK script.vpy", line 17, in
clip = mega(clip)
File "C:/R19/CK script.vpy", line 14, in mega
return haf.SMDegrain(clip, tr=3, pel=2, contrasharp=True, thSAD = 550, thSADC = 450, blksize = 8, truemotion = False, RefineMotion=True, prefilter=pre)
File "C:\Users\eduar\AppData\Roaming\Python\Python39\site-packages\havsfunc.py", line 3797, in SMDegrain
return ContraSharpening(output, CClip, planes=planes)
File "C:\Users\eduar\AppData\Roaming\Python\Python39\site-packages\havsfunc.py", line 5924, in ContraSharpening
ssDD = core.rgvs.Repair(ssD, allD, mode=[rep if i in planes else 0 for i in range(denoised.format.num_planes)]) # limit the difference to the max of what the denoising removed locally
File "src\cython\vapoursynth.pyx", line 2385, in vapoursynth._CoreProxy.__getattr__
File "src\cython\vapoursynth.pyx", line 2228, in vapoursynth.Core.__getattr__
AttributeError: No attribute with the name rgvs exists. Did you mistype a plugin namespace?

Enigma0456
3rd February 2022, 04:12
I know we're dealing with a lot of errors, but Vapoursynth is something absolutely new for me. In advance, I thank you all for the assistance I'm receiving.

poisondeathray
3rd February 2022, 05:16
for rgvs you need removegrain

I think this is the version
https://github.com/vapoursynth/vs-removegrain

Enigma0456
3rd February 2022, 05:35
We're almost there

Failed to evaluate the script:
Python exception: NNEDI3CL: Invalid Program

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 "C:/R19/CK script.vpy", line 20, in
clip = nn.nnedi3_rpow2(clip, nsize =4, qual =2, nns =4)
File "C:\Users\eduar\AppData\Roaming\Python\Python39\site-packages\nnedi3_rpow2.py", line 89, in nnedi3_rpow2
last = nnedi3(last, field=field, **pkdnnedi)
File "src\cython\vapoursynth.pyx", line 2580, in vapoursynth.Function.__call__
vapoursynth.Error: NNEDI3CL: Invalid Program

poisondeathray
3rd February 2022, 05:42
The error refers NNEDI3CL , which is the OpenCL version of NNEDI3

https://github.com/HomeOfVapourSynthEvolution/VapourSynth-NNEDI3CL

Enigma0456
3rd February 2022, 14:15
I uninstalled NNEDI3CL and finally I got no more errors. But the image of the video is duplicated and there's "source" write in the top. Since I'm a completely noob with Vapoursynth, how do I crop the image?

poisondeathray
3rd February 2022, 16:08
I uninstalled NNEDI3CL and finally I got no more errors. But the image of the video is duplicated and there's "source" write in the top. Since I'm a completely noob with Vapoursynth, how do I crop the image?

Comment out the StackHorizontal line to "deactivate" it

put a "#" in front

ChaosKing
3rd February 2022, 16:19
Just delete

crop = 0
clip = core.std.StackHorizontal([
core.std.CropRel(nn.nnedi3_rpow2(orig).fmtc.bitdepth(bits=10), crop,crop,0,0).text.Text("source"), \
core.std.CropRel(clip, crop,crop,0,0), \
])

It was only there for comparing the source clip with the filtered clip in vsedit.