# Imports import ctypes import sys import os import vapoursynth as vs # using Vapoursynth R77 # getting Vapoursynth core core = vs.core # Import scripts folder scriptPath = 'C:/Program Files/Hybrid/64bit/vsscripts' sys.path.insert(0, os.path.abspath(scriptPath)) # Loading Support Files Dllref = ctypes.windll.LoadLibrary("C:/Program Files/Hybrid/64bit/vsfilters/Support/libfftw3f-3.dll") # loading plugins core.std.LoadPlugin(path="C:/Program Files/Hybrid/64bit/vsfilters/MiscFilter/LGhost/LGhost.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/SharpenFilter/AWarpSharp2/libawarpsharp2.dll") core.std.LoadPlugin(path="C:/Program Files/Hybrid/64bit/Vapoursynth/Lib/site-packages/vapoursynth/plugins2/cas.dll") core.std.LoadPlugin(path="C:/Program Files/Hybrid/64bit/Vapoursynth/Lib/site-packages/vapoursynth/plugins2/deblock.dll") core.std.LoadPlugin(path="C:/Program Files/Hybrid/64bit/vsfilters/DenoiseFilter/RemoveDirt/RemoveDirt.dll") core.std.LoadPlugin(path="C:/Program Files/Hybrid/64bit/vsfilters/DenoiseFilter/NEO_FFT3DFilter/neo-fft3d.dll") core.std.LoadPlugin(path="C:/Program Files/Hybrid/64bit/vsfilters/DenoiseFilter/DFTTest/DFTTest.dll") core.std.LoadPlugin(path="C:/Program Files/Hybrid/64bit/Vapoursynth/Lib/site-packages/vapoursynth/plugins2/bwdif.dll") core.std.LoadPlugin(path="C:/Program Files/Hybrid/64bit/Vapoursynth/Lib/site-packages/vapoursynth/plugins2/fmtconv.dll") core.std.LoadPlugin(path="C:/Program Files/Hybrid/64bit/Vapoursynth/Lib/site-packages/vapoursynth/plugins2/znedi3.dll") core.std.LoadPlugin(path="C:/Program Files/Hybrid/64bit/Vapoursynth/Lib/site-packages/vapoursynth/plugins2/vszip/vszip.dll") core.std.LoadPlugin(path="C:/Program Files/Hybrid/64bit/Vapoursynth/Lib/site-packages/vapoursynth/plugins2/addnoise.dll") core.std.LoadPlugin(path="C:/Program Files/Hybrid/64bit/Vapoursynth/Lib/site-packages/vapoursynth/plugins2/mvutensils/mvutensils.dll") core.std.LoadPlugin(path="C:/Program Files/Hybrid/64bit/Vapoursynth/Lib/site-packages/vapoursynth/plugins2/zsmooth/zsmooth.dll") core.std.LoadPlugin(path="C:/Program Files/Hybrid/64bit/vsfilters/SourceFilter/LSmashSource/LSMASHSource.dll") # Import scripts import sharpen import dehalo import denoise import artifacts import color import qtgmc import validate # Source: 'M:\Hybrid-IN\Orson_Welles_Show_Clips_(7-9-2026)_720_486.mov' # clip current meta; color space: YUV422P10, bit depth: 10, resolution: 720x486, fps: 29.97, color matrix: 170m, color primaries: Unspecific, color transfer: BT.709, yuv luminance scale: limited, scanorder: bottom field first, full height: true (Source) # Loading 'M:\Hybrid-IN\Orson_Welles_Show_Clips_(7-9-2026)_720_486.mov' using LWLibavSource clip = core.lsmas.LWLibavSource(source="M:/Hybrid-IN/Orson_Welles_Show_Clips_(7-9-2026)_720_486.mov", format="YUV422P10", stream_index=0, cache=0, prefer_hw=0) frame = clip.get_frame(0) # setting color matrix to 170m. clip = core.std.SetFrameProps(clip, _Matrix=vs.MATRIX_ST170_M) # setting color transfer (vs.TRANSFER_BT709), if it is not set. if validate.transferIsInvalid(clip): clip = core.std.SetFrameProps(clip=clip, _Transfer=vs.TRANSFER_BT709) # 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. prop_name = '_Range' if core.core_version.release_major >= 74 else '_ColorRange' clip = core.std.SetFrameProps(clip=clip, **{prop_name: 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: bottom field first) clip = core.std.SetFrameProps(clip=clip, _FieldBased=vs.FIELD_BOTTOM) # scan type: bottom field first # Deinterlacing using QTGMC clip = qtgmc.QTGMC(clip, Preset="Fast", TFF=False) # new fps: 59.94 # Making sure content is preceived as frame based clip = core.std.SetFrameProps(clip=clip, _FieldBased=vs.FIELD_PROGRESSIVE) # scan type: progressive # ColorMatrix: adjusting color matrix from fcc to 470bg # adjusting luma range to 'limited' due to post clipping clip = core.resize.Bicubic(clip, matrix_in_s="fcc", matrix_s="470bg", range_in=0, range=0) # adjusting color using Tweak clip = color.Tweak(clip, hue=0.00, sat=0.90, cont=1.00, coring=True) # adjusting color using SmoothLevels clip = color.SmoothLevels(clip, input_low=0, input_high=1020, output_low=0, output_high=1020, Ecurve=0) # adjusting color space from YUV422P10 to YUV444P16 for vsDeSpot clip = core.resize.Bicubic(clip=clip, format=vs.YUV444P16) # spot/dot removal using DeSpot for i in range(3): clip = artifacts.DeSpot(clip) # spot/dirt removal using RemoveSpots clip = artifacts.RemoveSpotsMCX(clip) clip = core.std.Crop(clip, left=56, right=40, top=4, bottom=10) # cropping to 624x472 # denoising using MCTemporalDenoise clip = denoise.MCTemporalDenoise(clip, settings="very high", ncpu=10) # contrast sharpening using CAS clip = core.cas.CAS(clip, sharpness=0.700) # applying dehalo using DeHalo_alpha clip = dehalo.DeHalo_alpha(clip, ss=2.0) # applying dehalo using YAHR for i in range(0,3): clip = dehalo.YAHR(clip, blur=3, depth=16) clip = core.lghost.LGhost(clip, mode=[3,3,3,3], shift=[2,2,2,2], intensity=[-40,-40,-40,-40]) # adjusting output color from YUV444P16 to YUV422P10 for ProResModel clip = core.resize.Bicubic(clip=clip, format=vs.YUV422P10, dither_type="error_diffusion") # set output frame rate to 59.94fps (progressive) clip = core.std.AssumeFPS(clip=clip, fpsnum=60000, fpsden=1001) # output clip.set_output() # clip current meta; color space: YUV422P10, bit depth: 10, resolution: 624x472, fps: 59.94, color matrix: 470bg, color primaries: Unspecific, color transfer: BT.709, yuv luminance scale: limited, scanorder: progressive, full height: true (Meta) # script was created by Hybrid 2026.07.17.1