Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- # Imports
- import vapoursynth as vs
- import os
- import sys
- # getting Vapoursynth core
- core = vs.core
- # 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/MiscFilter/MiscFilters/MiscFilters.dll")
- core.std.LoadPlugin(path="F:/Hybrid/64bit/vsfilters/FrameFilter/RIFE/librife.dll")
- core.std.LoadPlugin(path="F:/Hybrid/64bit/vsfilters/SourceFilter/LSmashSource/vslsmashsource.dll")
- # source: 'C:\Users\Selur\Desktop\M3.avi'
- # current color space: RGB24, bit depth: 8, resolution: 1280x720, fps: 30, color matrix: 709, yuv luminance scale: limited, scanorder: progressive
- # Loading C:\Users\Selur\Desktop\M3.avi using LWLibavSource
- clip = core.lsmas.LWLibavSource(source="C:/Users/Selur/Desktop/M3.avi", format="RGB24", stream_index=0, cache=0, fpsnum=30, prefer_hw=0)
- # Setting color transfer info (709), when it is not set
- clip = clip if not core.text.FrameProps(clip,'_Transfer') else core.std.SetFrameProps(clip, _Transfer=1)
- # Setting color primaries info (), when it is not set
- clip = clip if not core.text.FrameProps(clip,'_Primaries') else core.std.SetFrameProps(clip, _Primaries=1)
- # Setting color range to TV (limited) range.
- clip = core.std.SetFrameProp(clip=clip, prop="_ColorRange", intval=1)
- # making sure frame rate is set to 30
- clip = core.std.AssumeFPS(clip=clip, fpsnum=30, fpsden=1)
- clip = core.std.SetFrameProp(clip=clip, prop="_FieldBased", intval=0) # progressive
- # adjusting color space from RGB24 to RGBS for vsFillDuplicateFrames
- clip = core.resize.Bicubic(clip=clip, format=vs.RGBS, range_s="limited")
- from FillDuplicateFrames import FillDuplicateFrames
- fdf = FillDuplicateFrames(clip=clip, method="RIFE")
- clip = fdf.out
- # adjusting output color from: RGBS to YUV444P8 for x264Model
- clip = core.resize.Bicubic(clip=clip, format=vs.YUV444P8, matrix_s="709", range_s="limited", dither_type="error_diffusion")
- # set output frame rate to 30fps (progressive)
- clip = core.std.AssumeFPS(clip=clip, fpsnum=30, fpsden=1)
- # Output
- clip.set_output()
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement