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.

[HELP] Add more option To FSRCNNX
#9
Will send you a link to a dev version which fixes the 'clip = clip = '-bug.

And here's an example on how to add 'FSRCNNX_x2_8-0-4-1_LineArt.glsl' between "FSRCNN_x2_r2_32-0-2.glsl" and nnedi3aa.

What I did to create the script:
  • I copied the 'FSRCNNX_x2_8-0-4-1_LineArt.glsl' file into the 'Hybrid\64bit\vsfilters\ResizeFilter\GLSL' (any other folder would be fine too)
  • I started Hybrid
  • loaded a source (resolution: 640x352)
  • enable "Crop/Resize->Base->Resize"
  • set "Crop/Resize->Base->Resize->Target resolution" to (width) "1280"
  • enabled "Filtering->Vaporusynth->Resize->Resizer"
  • selected "Filtering->Vaporusynth->Resize->Resizer->GLSL Resizer"
  • selected "Filtering->Vaporusynth->Resize->Resizer->GLSL Resizer" "Hybrid/64bit/vsfilters/ResizeFilter/GLSL/FSRCNN_x2_r2_32-0-2.glsl"
  • enabled "Filtering->Vaporusynth->Line->Nedi3AA"
    script now looked like this:
    # Imports import os import sys import vapoursynth as vs core = vs.get_core() # Import scripts folder scriptPath = 'I:/Hybrid/64bit/vsscripts' sys.path.append(os.path.abspath(scriptPath)) # Loading Plugins core.std.LoadPlugin(path="I:/Hybrid/64bit/vsfilters/ResizeFilter/nnedi3/vsznedi3.dll") 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") # Import scripts import mvsfunc import muvsfunc # source: 'F:\TestClips&Co\files\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="F:/TestClips&Co/files/test.avi",cachefile="E:/Temp/avi_078c37f69bb356e7b5fa040c71584c40_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/FSRCNN_x2_r2_32-0-2.glsl", width=1920, height=1056) # Anti Aliasing using NNedia3aa clip = muvsfunc.nnedi3aa(a=clip) # adjusting output color from: YUV444P16 to YUV420P8 for x264Model (i420@8) clip = core.resize.Bicubic(clip=clip, format=vs.YUV420P8, range_s="limited") # set output frame rate to 25.000fps clip = core.std.AssumeFPS(clip=clip, fpsnum=25, fpsden=1) # Output clip.set_output()
  • set "Filtering->Vaporusynth->Custom->Insert before" to "NNedi3AA" and enabled the custom section
  • entered:
    clip = core.placebo.Shader(clip=clip, shader="I:/Hybrid/64bit/vsfilters/ResizeFilter/GLSL/FSRCNNX_x2_8-0-4-1_LineArt.glsl", width=1920, height=1056)
    Note that there is no need to adjust the color space since it was already adjusted to YUV444P16 for FSRCNN_x2_r2_32-0-2.glsl.
The generated script now looks like this:
# Imports import os import sys import vapoursynth as vs core = vs.get_core() # Import scripts folder scriptPath = 'I:/Hybrid/64bit/vsscripts' sys.path.append(os.path.abspath(scriptPath)) # Loading Plugins core.std.LoadPlugin(path="I:/Hybrid/64bit/vsfilters/ResizeFilter/nnedi3/vsznedi3.dll") 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") # defining beforeNNedi3AA-function - END def beforeNNedi3AA(clip): clip = core.placebo.Shader(clip=clip, shader="I:/Hybrid/64bit/vsfilters/ResizeFilter/GLSL/FSRCNNX_x2_8-0-4-1_LineArt.glsl", width=1920, height=1056) return clip # defining beforeNNedi3AA-function - END # Import scripts import mvsfunc import muvsfunc # source: 'F:\TestClips&Co\files\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="F:/TestClips&Co/files/test.avi",cachefile="E:/Temp/avi_078c37f69bb356e7b5fa040c71584c40_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/FSRCNN_x2_r2_32-0-2.glsl", width=1920, height=1056) clip = beforeNNedi3AA(clip) # Anti Aliasing using NNedia3aa clip = muvsfunc.nnedi3aa(a=clip) # adjusting output color from: YUV444P16 to YUV420P8 for x264Model (i420@8) clip = core.resize.Bicubic(clip=clip, format=vs.YUV420P8, range_s="limited") # set output frame rate to 25.000fps clip = core.std.AssumeFPS(clip=clip, fpsnum=25, fpsden=1) # Output clip.set_output()

No clue whether 'FSRCNN_x2_r2_32-0-2.glsl' allows additional option, but the script works fine here.

Cu Selur
----
Dev versions are in the 'experimental'-folder of my GoogleDrive, which is linked on the download page.
Reply


Messages In This Thread
Add more option To FSRCNNX - by light - 25.02.2021, 16:03
RE: Add more option To FSRCNNX - by Selur - 25.02.2021, 17:03
RE: Add more option To FSRCNNX - by light - 25.02.2021, 19:30
RE: Add more option To FSRCNNX - by Selur - 25.02.2021, 19:33
RE: Add more option To FSRCNNX - by light - 25.02.2021, 19:37
RE: Add more option To FSRCNNX - by Selur - 25.02.2021, 20:01
RE: Add more option To FSRCNNX - by light - 25.02.2021, 20:22
RE: Add more option To FSRCNNX - by Selur - 25.02.2021, 20:33
RE: Add more option To FSRCNNX - by light - 25.02.2021, 20:54
RE: Add more option To FSRCNNX - by Selur - 25.02.2021, 20:51
RE: Add more option To FSRCNNX - by Selur - 25.02.2021, 21:14
RE: Add more option To FSRCNNX - by light - 25.02.2021, 21:16
RE: Add more option To FSRCNNX - by Selur - 26.02.2021, 06:14

Forum Jump:


Users browsing this thread: 1 Guest(s)