Lypheo / vs-placebo

libplacebo-based debanding, scaling and color mapping plugin for VapourSynth
GNU Lesser General Public License v2.1
73 stars 13 forks source link

Error using core.placebo.Shader #11

Open GoodManWEN opened 3 years ago

GoodManWEN commented 3 years ago

Hi, I'm using placebo.Shader to run Alexkral/AviSynthAiUpscale's mpv syntax shader. As I'm a fresher to glsl shader and Alexkral is fresher to vapoursynth at all, we cannot locate the cause of the error.

It looks like we're using the same code, but I run into problems and he can run it correctly. I wonder if I can get help here, thx!

Further error description and informations at https://github.com/Alexkral/AviSynthAiUpscale/issues/5

Selur commented 3 years ago

Here's an example where I use 'AiUpscale_HQ_Sharp_3x_Photo.glsl' in Vapoursynth:

# Imports
import vapoursynth as vs
core = vs.get_core()
# Loading Plugins
core.std.LoadPlugin(path="I:/Hybrid/64bit/vsfilters/Support/libvs_placebo.dll")
core.std.LoadPlugin(path="I:/Hybrid/64bit/vsfilters/Support/fmtconv.dll")
core.std.LoadPlugin(path="I:/Hybrid/64bit/vsfilters/SourceFilter/FFMS2/ffms2.dll")
# source: 'G:\TestClips&Co\test.avi'
# current color space: YUV420P8, bit depth: 8, resolution: 640x352, fps: 25, color matrix: 470bg, yuv luminance scale: limited, scanorder: progressive
# Loading source using FFMS2
clip = core.ffms2.Source(source="G:/TestClips&Co/test.avi",cachefile="E:/Temp/avi_9dec25d3f707eb4813d42334c7f1a8d6_853323747.ffindex",format=vs.YUV420P8,alpha=False)
# 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=clip, fpsnum=25, fpsden=1)
# Setting color range to TV (limited) range.
clip = core.std.SetFrameProp(clip=clip, prop="_ColorRange", intval=1)
# adjusting color space from YUV420P8 to YUV444P16 for VsGLSLResizer
clip = core.resize.Bicubic(clip=clip, format=vs.YUV444P16, range_s="limited")
clip = core.placebo.Shader(clip=clip, shader="I:/Hybrid/64bit/vsfilters/ResizeFilter/GLSL/AiUpscale_HQ_Sharp_3x_Photo.glsl", width=1280, height=704)
# adjusting output color from: YUV444P16 to YUV420P10 for x265Model (i420@8)
clip = core.resize.Bicubic(clip=clip, format=vs.YUV420P10, range_s="limited")
# set output frame rate to 25.000fps
clip = core.std.AssumeFPS(clip=clip, fpsnum=25, fpsden=1)
# Output
clip.set_output()

may be that helps,..

My guess is in your script there is a problem with the file path to the shader file,...