# Imports import vapoursynth as vs # getting Vapoursynth core import ctypes # Loading Support Files Dllref = ctypes.windll.LoadLibrary("C:/Program Files/Hybrid/64bit/vsfilters/Support/libfftw3f-3.dll") Dllref = ctypes.windll.LoadLibrary("C:/Program Files/Hybrid/64bit/Avisynth/avisynthPlugins/d3d9.dll") # getting Vapoursynth core core = vs.core # Loading Plugins core.std.LoadPlugin(path="C:/Program Files/Hybrid/64bit/vsfilters/SourceFilter/LSmashSource/vslsmashsource.dll") core.std.LoadPlugin(path="C:/Program Files/Hybrid/64bit/vsfilters/SourceFilter/FFMS2/ffms2.dll") core.avs.LoadPlugin(path="C:/Program Files/Hybrid/64bit/Avisynth/avisynthPlugins/LoadDll.dll") core.avs.LoadPlugin(path="C:/Program Files/Hybrid/64bit/Avisynth/avisynthPlugins/FFT3dGPU.dll") # source: 'C:\TMP\FFT3DGPU FFT3DFILTER NEO_FFT3D\4K\4k-Testclip.mp4' # current color space: YUV420P8, bit depth: 8, resolution: 3840x2160, fps: 50, color matrix: 2020ncl, yuv luminance scale: limited, scanorder: progressive # Loading C:\TMP\FFT3DGPU FFT3DFILTER NEO_FFT3D\4K\4k-Testclip.mp4 using LibavSMASHSource clip = core.lsmas.LibavSMASHSource(source="C:/TMP/FFT3DGPU FFT3DFILTER NEO_FFT3D/4K/4k-Testclip.mp4") # Setting color matrix to 2020ncl. clip = core.std.SetFrameProps(clip, _Matrix=9) clip = clip if not core.text.FrameProps(clip,'_Transfer') else core.std.SetFrameProps(clip, _Transfer=9) clip = clip if not core.text.FrameProps(clip,'_Primaries') else core.std.SetFrameProps(clip, _Primaries=9) # Setting color range to TV (limited) range. clip = core.std.SetFrameProp(clip=clip, prop="_ColorRange", intval=1) # making sure frame rate is set to 50 clip = core.std.AssumeFPS(clip=clip, fpsnum=50, fpsden=1) clip = core.avs.fft3dGPU(bw=64,bh=64,plane=4,mode=2,bordersize=0,precision=1) # adjusting output color from: YUV420P8 to YUV420P10 for x264Model clip = core.resize.Bicubic(clip=clip, format=vs.YUV420P10, range_s="limited") # set output frame rate to 50.000fps clip = core.std.AssumeFPS(clip=clip, fpsnum=50, fpsden=1) # Output clip.set_output()