Not a member of Pastebin yet?
                        Sign Up,
                        it unlocks many cool features!                    
                - # Imports
 - import vapoursynth as vs
 - import os
 - import ctypes
 - # Loading Support Files
 - Dllref = ctypes.windll.LoadLibrary("i:/Hybrid/64bit/vsfilters/Support/libfftw3f-3.dll")
 - import sys
 - # getting Vapoursynth core
 - core = vs.core
 - # Import scripts folder
 - scriptPath = 'i:/Hybrid/64bit/vsscripts'
 - sys.path.insert(0, os.path.abspath(scriptPath))
 - # Loading Plugins
 - core.std.LoadPlugin(path="i:/Hybrid/64bit/vsfilters/Support/TCanny.dll")
 - core.std.LoadPlugin(path="i:/Hybrid/64bit/vsfilters/DeblockFilter/DeblockPP7/DeblockPP7.dll")
 - core.std.LoadPlugin(path="i:/Hybrid/64bit/vsfilters/GrainFilter/RemoveGrain/RemoveGrainVS.dll")
 - core.std.LoadPlugin(path="i:/Hybrid/64bit/vsfilters/GrainFilter/AddGrain/AddGrain.dll")
 - core.std.LoadPlugin(path="i:/Hybrid/64bit/vsfilters/DenoiseFilter/FFT3DFilter/fft3dfilter.dll")
 - core.std.LoadPlugin(path="i:/Hybrid/64bit/vsfilters/DenoiseFilter/DFTTest/DFTTest.dll")
 - core.std.LoadPlugin(path="i:/Hybrid/64bit/vsfilters/Support/EEDI3m_opencl.dll")
 - core.std.LoadPlugin(path="i:/Hybrid/64bit/vsfilters/ResizeFilter/nnedi3/NNEDI3CL.dll")
 - core.std.LoadPlugin(path="i:/Hybrid/64bit/vsfilters/Support/libmvtools.dll")
 - core.std.LoadPlugin(path="i:/Hybrid/64bit/vsfilters/Support/scenechange.dll")
 - core.std.LoadPlugin(path="i:/Hybrid/64bit/vsfilters/Support/fmtconv.dll")
 - core.std.LoadPlugin(path="i:/Hybrid/64bit/vsfilters/MiscFilter/MiscFilters/MiscFilters.dll")
 - core.std.LoadPlugin(path="i:/Hybrid/64bit/vsfilters/DeinterlaceFilter/Bwdif/Bwdif.dll")
 - core.std.LoadPlugin(path="i:/Hybrid/64bit/vsfilters/SourceFilter/LSmashSource/vslsmashsource.dll")
 - # defining beforeVFM-function - START
 - def beforeVFM(clip):
 - [Y, U, V] = core.std.SplitPlanes(clip)
 - U = core.resize.Bilinear(U, height=clip.height/2.5)
 - U = core.resize.Bilinear(U, height=clip.height)
 - V = core.resize.Bilinear(V, height=clip.height/2.5)
 - V = core.resize.Bilinear(V, height=clip.height)
 - clip = core.std.ShufflePlanes(clips=[Y, U, V], planes=[0, 0, 0], colorfamily=vs.YUV)
 - return clip
 - # defining beforeVFM-function - END
 - # Import scripts
 - import mcdegrainsharp
 - import lostfunc
 - import havsfunc
 - # source: 'C:\Users\Selur\Desktop\sample-clip.mov.mov'
 - # current color space: YUV422P10, bit depth: 10, resolution: 720x576, fps: 25, color matrix: 170m, yuv luminance scale: limited, scanorder: top field first
 - # Loading C:\Users\Selur\Desktop\sample-clip.mov.mov using LibavSMASHSource
 - clip = core.lsmas.LibavSMASHSource(source="C:/Users/Selur/Desktop/sample-clip.mov.mov")
 - # Setting color matrix to 170m.
 - clip = core.std.SetFrameProps(clip, _Matrix=6)
 - clip = clip if not core.text.FrameProps(clip,'_Transfer') else core.std.SetFrameProps(clip, _Transfer=6)
 - clip = clip if not core.text.FrameProps(clip,'_Primaries') else core.std.SetFrameProps(clip, _Primaries=5)
 - # Setting color range to TV (limited) range.
 - clip = core.std.SetFrameProp(clip=clip, prop="_ColorRange", intval=1)
 - # making sure frame rate is set to 25
 - clip = core.std.AssumeFPS(clip=clip, fpsnum=25, fpsden=1)
 - clip = core.std.SetFrameProp(clip=clip, prop="_FieldBased", intval=2)
 - # setting field order to what QTGMC should assume (top field first)
 - clip = core.std.SetFrameProp(clip=clip, prop="_FieldBased", intval=2)
 - # Deinterlacing using QTGMC
 - clip = havsfunc.QTGMC(Input=clip, Preset="Fast", TFF=True, opencl=True) # new fps: 50
 - # make sure content is preceived as frame based
 - clip = core.std.SetFieldBased(clip, 0)
 - clip = beforeVFM(clip)
 - # applying deblocking using DeblockPP7
 - clip = core.pp7.DeblockPP7(clip=clip, qp=4.00, mode=2)
 - # adjusting color space from YUV422P10 to YUV444P16 for vsDeSpot
 - clip = core.resize.Bicubic(clip=clip, format=vs.YUV444P16, range_s="limited")
 - clip = lostfunc.DeSpot(o=clip)
 - # cropping the video to 696x572
 - clip = core.std.CropRel(clip=clip, left=12, right=12, top=2, bottom=2)
 - # Fix bright and dark line artifacts near the border of an image using BalanceBorders
 - clip = havsfunc.bbmod(c=clip,cLeft=16,cTop=0,cRight=8,cBottom=16)
 - # removing grain using MCDegrain
 - clip = mcdegrainsharp.mcdegrainsharp(clip=clip)
 - # Resizing using 10 - bicubic spline
 - clip = core.fmtc.resample(clip=clip, kernel="spline16", w=1440, h=1080, interlaced=False, interlacedd=False) # resolution 1440x1080
 - # adjusting output color from: YUV444P16 to YUV420P10 for x265Model
 - clip = core.resize.Bicubic(clip=clip, dither_type="none", format=vs.YUV420P10, range_s="limited")
 - # set output frame rate to 50fps
 - clip = core.std.AssumeFPS(clip=clip, fpsnum=50, fpsden=1)
 - # Output
 - clip.set_output()
 
Advertisement
 
                    Add Comment                
                
                        Please, Sign In to add comment