![]() |
[HELP] Add more option To FSRCNNX - Printable Version +- Selur's Little Message Board (https://forum.selur.net) +-- Forum: Talk, Talk, Talk (https://forum.selur.net/forum-5.html) +--- Forum: Small Talk (https://forum.selur.net/forum-7.html) +--- Thread: [HELP] Add more option To FSRCNNX (/thread-1746.html) Pages:
1
2
|
Add more option To FSRCNNX - light - 25.02.2021 Hello. It is nice to see that there is a FSRCNNX GLSL resizer in Hybrid Encoder... But the problem is that I can only use one shader at a time for upscaling... I want to use more this... Since I am noob at this script writing I don't know how to use it to add more GLSL. I have all the GLSL shaders into this location C:\Program Files\Hybrid\64bit\vsfilters\ResizeFilter\GLSL So what do I need to write in that vapoursynth Custom secton if you can help me about this then it will be nice. RE: Add more option To FSRCNNX - Selur - 25.02.2021 Hybrid uses GLS resizing by using vs-placebo (https://github.com/Lypheo/vs-placebo) which has the following option in regard to using shaders: placebo.Shader(clip clip, [string shader, int width, int height, int chroma_loc = 1, int matrix = 2, int trc = 1, string filter = "ewa_lanczos", float radius, float clamp, float taper, float blur, float param1, float param2, float antiring = 0.0, int lut_entries = 64, float cutoff = 0.001, bool sigmoidize = 1, bool linearize = 1, float sigmoid_center = 0.75, float sigmoid_slope = 6.5, string shader_s]) The main part used during the resizing is: # adjusting color space from YUV420P8 to YUV444P16 for VsGLSLResizer In theory vs-placebo can probably be used to use other .glsl shaders in mpv syntax. I only tested a bunch of other shaders from Anime4k: https://github.com/bloc97/Anime4K/tree/master/glsl But I have no clue what other shaders are out there an whether they could even be used using vs-placebo. -> Without any details on what shader you want o apply to do what I can't really guess what you would need to write down in a custom section aside from: core.std.LoadPlugin(path="I:/Hybrid/64bit/vsfilters/Support/libvs_placebo.dll") # only needed if the library isn't already loaded Cu Selur RE: Add more option To FSRCNNX - light - 25.02.2021 Bro I tried a lot.. but I Don't think It is working..maybe i am doing something wrong.. so Can you add 5 GLSL shaders like if i want to use it just tick them...(Mainly I need FSRCNN x2_r2_32-0-2.glsl and FSRCNNX_x2_16-0-4-1.glsl) According to https://artoriuz.github.io/blog/mpv_upscaling.html FSRCNNX has highest score and it's fast.. I want to upscale Anime and it look really good when i upscale it.. Link to download if u can. https://github.com/igv/FSRCNN-TensorFlow/releases the GLSL works best are them https://ibb.co/rbPpGkY ... Although they are really good If u can add this RAVU then it will be perfect work..since FSRCNNX is too sharper and RAVU smoothen that line ..and it will look real cool... https://github.com/bjin/mpv-prescalers RAVU_lite_R4 is the best for smoothing... So Bro Can u please add this 6 things ![]() Please Help me...Since I am getting error in Vapoursynth tab.. RE: Add more option To FSRCNNX - Selur - 25.02.2021 Please properly format your text atm. it's to much of a mess to read,... RE: Add more option To FSRCNNX - light - 25.02.2021 (25.02.2021, 19:33)Selur Wrote: Please properly format your text atm. it's to much of a mess to read,... I don't know why it got it like that.. Some weird experience.. RE: Add more option To FSRCNNX - Selur - 25.02.2021 Okay now I at least can read what you want. ![]() Quote:Bro I tried a lot..For testing I did the following:
-> No clue where your problem is with using FSRCNN_x2_r2_32-0-2.glsl. (I also changed to FSRCNNX_x2_16-0-4-1.glsl and that also caused no problem.) About the pre-scalers: I don't know of any way to use those .hook files through Vapoursynth. Quote:Since I am getting error in Vapoursynth tab..No debut output, no mention of what error you get,.. -> no clue how to respond ![]() Cu Selur RE: Add more option To FSRCNNX - light - 25.02.2021 This is the Script i am using⬇⬇⬇⬇⬇ # Imports import os import sys import ctypes # Loading Support Files Dllref = ctypes.windll.LoadLibrary("C:/Program Files/Hybrid/64bit/vsfilters/Support/libfftw3f-3.dll") import vapoursynth as vs core = vs.get_core() # Import scripts folder scriptPath = 'C:/Program Files/Hybrid/64bit/vsscripts' sys.path.append(os.path.abspath(scriptPath)) # Loading Plugins core.std.LoadPlugin(path="C:/Program Files/Hybrid/64bit/vsfilters/ResizeFilter/nnedi3/NNEDI3CL.dll") core.std.LoadPlugin(path="C:/Program Files/Hybrid/64bit/vsfilters/Support/libvs_placebo.dll") core.std.LoadPlugin(path="C:/Program Files/Hybrid/64bit/vsfilters/Support/fmtconv.dll") core.std.LoadPlugin(path="C:/Program Files/Hybrid/64bit/vsfilters/SharpenFilter/AWarpSharp2/libawarpsharp2.dll") core.std.LoadPlugin(path="C:/Program Files/Hybrid/64bit/vsfilters/SharpenFilter/CAS/CAS.dll") core.std.LoadPlugin(path="C:/Program Files/Hybrid/64bit/vsfilters/DenoiseFilter/DFTTest/DFTTest.dll") core.std.LoadPlugin(path="C:/Program Files/Hybrid/64bit/vsfilters/DebandFilter/Flash3kDeband/flash3kyuu_deband.dll") core.std.LoadPlugin(path="C:/Program Files/Hybrid/64bit/vsfilters/DenoiseFilter/KNLMeansCL/KNLMeansCL.dll") core.std.LoadPlugin(path="C:/Program Files/Hybrid/64bit/vsfilters/Support/TCanny.dll") core.std.LoadPlugin(path="C:/Program Files/Hybrid/64bit/vsfilters/DenoiseFilter/CTMF/CTMF.dll") core.std.LoadPlugin(path="C:/Program Files/Hybrid/64bit/vsfilters/Support/libmvtools.dll") core.std.LoadPlugin(path="C:/Program Files/Hybrid/64bit/vsfilters/DeblockFilter/DeblockPP7/DeblockPP7.dll") core.std.LoadPlugin(path="C:/Program Files/Hybrid/64bit/vsfilters/DeCrawlFilter/DeDot/libdedot.dll") core.std.LoadPlugin(path="C:/Program Files/Hybrid/64bit/vsfilters/DeCrawlFilter/DotKill/DotKill.dll") core.std.LoadPlugin(path="C:/Program Files/Hybrid/64bit/vsfilters/SourceFilter/LSmashSource/vslsmashsource.dll") # Import scripts import muvsfunc import mcdegrainsharp import nnedi3_resample import mvsfunc import havsfunc # source: 'E:\[Anime]\Accel_World_-_EX_[BD][h264-720p_AAC][3E56EE18]_encoded\Accel World.mkv' # current color space: YUV420P8, bit depth: 8, resolution: 1280x720, fps: 24, color matrix: 709, yuv luminance scale: limited, scanorder: progressive # Loading E:\[Anime]\Accel_World_-_EX_[BD][h264-720p_AAC][3E56EE18]_encoded\Accel World.mkv using LWLibavSource clip = core.lsmas.LWLibavSource(source="E:/[Anime]/Accel_World_-_EX_[BD][h264-720p_AAC][3E56EE18]_encoded/Accel World.mkv", format="YUV420P8", cache=0, prefer_hw=0) # making sure input color matrix is set as 709 clip = core.resize.Point(clip, matrix_in_s="709",range_s="limited") # making sure frame rate is set to 24 clip = core.std.AssumeFPS(clip=clip, fpsnum=24, fpsden=1) # Setting color range to TV (limited) range. clip = core.std.SetFrameProp(clip=clip, prop="_ColorRange", intval=1) clip = core.dotkill.DotKillS(clip=clip) clip = core.dedot.Dedot(clip=clip) # applying deblocking using DeblockPP7 clip = clip = core.pp7.DeblockPP7(clip=clip) # removing grain using SMDegrain clip = clip = havsfunc.SMDegrain(input=clip, interlaced=False) # removing grain using MCDegrain clip = clip = mcdegrainsharp.mcdegrainsharp(clip=clip, bblur=0.15, csharp=0.05, plane=4) # denoising using KNLMeansCL clip = core.knlm.KNLMeansCL(clip=clip) # debanding using f3kdb clip = core.f3kdb.Deband(clip, y=32, cb=32, cr=32, grainy=32, grainc=32, keep_tv_range=True, output_depth=8) clip = havsfunc.LSFmod(input=clip, Smethod=3, Lmode=19, edgemaskHQ=True, preblur=3) clip = havsfunc.EdgeCleaner(c=clip) clip = havsfunc.FineDehalo(clip) # deringing using HQDeringmod clip = havsfunc.HQDeringmod(clip, nrmode=2, darkthr=3.0) # 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="C:/Program Files/Hybrid/64bit/vsfilters/ResizeFilter/GLSL/FSRCNN_x2_r2_32-0-2.glsl", width=1920, height=1080) # Anti Aliasing using NNedia3aa clip = muvsfunc.nnedi3aa(a=clip, opencl=True, device=0) # 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 24.000fps clip = core.std.AssumeFPS(clip=clip, fpsnum=24, fpsden=1) # Output clip.set_output() And Now I want to use another GLSL shader..like FSRCNNX_x2_8-0-4-1_LineArt.glsl so now i go the custom section>select before NNEDI3aa (which one will be good insert before thing?) So here Custom_Section what do i need do if i want to use another GLSL shader with that previous one? Please Make an example like what do i need to write there... RE: Add more option To FSRCNNX - Selur - 25.02.2021 Okay, there is a bug. ![]() All those 'clip = clip' calls are not intended. (they are no problem since they cause no harm, but they are unintended) -> will fix that and write a small example for loading FSRCNNX_x2_8-0-4-1_LineArt.glsl Cu Selur RE: Add more option To FSRCNNX - Selur - 25.02.2021 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:
# Imports No clue whether 'FSRCNN_x2_r2_32-0-2.glsl' allows additional option, but the script works fine here. Cu Selur RE: Add more option To FSRCNNX - light - 25.02.2021 Thanks a lot for trying.. I have another question.. # 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="C:/Program Files/Hybrid/64bit/vsfilters/ResizeFilter/GLSL/FSRCNN_x2_r2_32-0-2.glsl", width=1920, height=1080) here if I use Lanczos won't it will give me more quality output? ![]() |