Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- # Imports
- import vapoursynth as vs
- # getting Vapoursynth core
- import sys
- import os
- core = vs.core
- # Limit frame cache to 48449MB
- core.max_cache_size = 48449
- # Import scripts folder
- scriptPath = 'F:/Hybrid/64bit/vsscripts'
- sys.path.insert(0, os.path.abspath(scriptPath))
- # loading plugins
- core.std.LoadPlugin(path="F:/Hybrid/64bit/vsfilters/DenoiseFilter/CTMF/CTMF.dll")
- core.std.LoadPlugin(path="F:/Hybrid/64bit/vsfilters/DenoiseFilter/ZSmooth/zsmooth.dll")
- core.std.LoadPlugin(path="F:/Hybrid/64bit/vsfilters/Support/libmvtools.dll")
- core.std.LoadPlugin(path="F:/Hybrid/64bit/vsfilters/Support/akarin.dll")
- core.std.LoadPlugin(path="F:/Hybrid/64bit/vsfilters/Support/vszip.dll")
- core.std.LoadPlugin(path="F:/Hybrid/64bit/vsfilters/DeCrawlFilter/DotKill/DotKill.dll")
- core.std.LoadPlugin(path="F:/Hybrid/64bit/vsfilters/SharpenFilter/CAS/CAS.dll")
- core.std.LoadPlugin(path="F:/Hybrid/64bit/vsfilters/Support/libsangnom.dll")
- core.std.LoadPlugin(path="F:/Hybrid/64bit/vsfilters/Support/fmtconv.dll")
- core.std.LoadPlugin(path="F:/Hybrid/64bit/vsfilters/Support/EEDI2.dll")
- core.std.LoadPlugin(path="F:/Hybrid/64bit/vsfilters/Support/EEDI3m_opencl.dll")
- core.std.LoadPlugin(path="F:/Hybrid/64bit/vsfilters/ResizeFilter/nnedi3/NNEDI3CL.dll")
- core.std.LoadPlugin(path="F:/Hybrid/64bit/vsfilters/Support/vcm.dll")
- core.std.LoadPlugin(path="F:/Hybrid/64bit/vsfilters/SourceFilter/BestSource/BestSource.dll")
- # Import scripts
- import nnedi3_resample
- import smdegrain
- import SpotLess
- import residual
- import antiAliasing
- import validate
- # Source: 'G:\clips\drop outs - comets\test_20000.mov'
- # Current color space: YUV444P12, bit depth: 12, resolution: 760x488, frame rate: 29.97fps, scanorder: progressive, yuv luminance scale: limited, matrix: 709, format: prores
- # Loading 'G:\clips\drop outs - comets\test_20000.mov' using BestSource
- clip = core.bs.VideoSource(source="G:/clips/drop outs - comets/test_20000.mov", cachepath="J:/tmp/test_20000_bestSource", track=0, hwdevice="opencl")
- frame = clip.get_frame(0)
- # setting color matrix to 709.
- clip = core.std.SetFrameProps(clip, _Matrix=vs.MATRIX_BT709)
- # setting color transfer (vs.TRANSFER_BT601), if it is not set.
- if validate.transferIsInvalid(clip):
- clip = core.std.SetFrameProps(clip=clip, _Transfer=vs.TRANSFER_BT601)
- # setting color primaries info (to vs.PRIMARIES_BT470_BG), if it is not set.
- if validate.primariesIsInvalid(clip):
- clip = core.std.SetFrameProps(clip=clip, _Primaries=vs.PRIMARIES_BT470_BG)
- # setting color range to TV (limited) range.
- clip = core.std.SetFrameProps(clip=clip, _ColorRange=vs.RANGE_LIMITED)
- # making sure frame rate is set to 29.97fps
- clip = core.std.AssumeFPS(clip=clip, fpsnum=30000, fpsden=1001)
- # making sure the detected scan type is set (detected: progressive)
- clip = core.std.SetFrameProps(clip=clip, _FieldBased=vs.FIELD_PROGRESSIVE) # scan type: progressive
- # Adjusting color sampling to YUV444P16 for vsDeJitterGimmick
- clip = core.resize.Bicubic(clip=clip, format=vs.YUV444P16, dither_type="error_diffusion")
- # remove jitter using DeJitter
- clip = core.vcm.DeJitter(clip, jmax=10, wsyn=4, thresh=0.03)
- # applying anti aliasing using santiag
- clip = antiAliasing.santiag(clip, type="sangnom", opencl=True)
- # contrast sharpening using CAS
- clip = core.cas.CAS(clip, sharpness=1.000)
- # adjusting color space from YUV444P16 to YUV444P8 for vsDotKill
- clip = core.resize.Bicubic(clip=clip, format=vs.YUV444P8)
- clip = core.dotkill.DotKillS(clip)
- clip = core.vszip.Checkmate(clip, tmax=80)
- clip = residual.Vinverse(clip, sstr=100.00)
- # Spot removal using SpotLess
- clip = SpotLess.SpotLess(clip, pel=1, smoother="zsmooth")
- clip = core.std.Crop(clip, left=4, right=14, top=4, bottom=4) # cropping to 742x480
- # removing grain using SMDegrain
- clip = smdegrain.SMDegrain(clip, tr=3, thSAD=600, thSADC=356, contrasharp=50, interlaced=False, chroma=False, opencl=True, device=-1)
- # adjusting output color from YUV444P8 to YUV420P10 for NVEncModel
- clip = core.resize.Bicubic(clip=clip, dither_type="error_diffusion", format=vs.YUV420P10, range_in_s="limited")
- # set output frame rate to 29.97fps (progressive)
- clip = core.std.AssumeFPS(clip=clip, fpsnum=30000, fpsden=1001)
- # output
- clip.set_output()
- # script was created by Hybrid 2026.03.05.1
Advertisement
Add Comment
Please, Sign In to add comment