Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- # This script was generated by SVP 4 Manager.
- # Check https://www.svp-team.com for more details.
- # core.max_cache_size = 5000
- import vapoursynth as vs
- core = vs.get_core(threads=8)
- core.std.LoadPlugin("/home/ryan/SVP4/plugins/libsvpflow1_vs64.so")
- core.std.LoadPlugin("/home/ryan/SVP4/plugins/libsvpflow2_vs64.so")
- clip = core.ffms2.Source(source="/home/ryan/Videos/JCS.mkv")
- super_params = "{scale:{up:2},gpu:1,rc:true}"
- analyse_params = "{main:{search:{coarse:{distance:-8}}}}"
- smoothfps_params = "{gpuid:11,rate:{num:600000,den:10000,abs:true},algo:13,mask:{area:50},scene:{}}"
- src_fps = 23.976
- demo_mode = 0
- stereo_type = 0
- nvof = 0
- ########## BEGIN OF base.py ##########
- # This file is a part of SmoothVideo Project (SVP) ver.4
- # This is NOT the full Vapoursynth script, all used variables are defined via
- # JScript code that generates the full script text.
- def interpolate(clip):
- # input_um - original frame in 4:2:0
- # input_m - cropped and resized (if needed) frame
- # input_m8 - input_m converted to 8-bit
- input_um = clip.resize.Lanczos(format=vs.YUV420P8)
- input_m = input_um
- input_m8 = input_m
- if nvof:
- smooth = core.svp2.SmoothFps_NVOF(input_m,smoothfps_params,nvof_src=input_m8,src=input_um,fps=src_fps)
- else:
- super = core.svp1.Super(input_m8,super_params)
- vectors = core.svp1.Analyse(super["clip"],super["data"],input_m8,analyse_params)
- smooth = core.svp2.SmoothFps(input_m,super["clip"],super["data"],vectors["clip"],vectors["data"],smoothfps_params,src=input_um,fps=src_fps)
- if demo_mode==1:
- return demo(input_m,smooth)
- else:
- return smooth
- if stereo_type == 1:
- lf = interpolate(core.std.CropRel(clip,0,(int)(clip.width/2),0,0))
- rf = interpolate(core.std.CropRel(clip,(int)(clip.width/2),0,0,0))
- smooth = core.std.StackHorizontal([lf, rf])
- elif stereo_type == 2:
- lf = interpolate(core.std.CropRel(clip,0,0,0,(int)(clip.height/2)))
- rf = interpolate(core.std.CropRel(clip,0,0,(int)(clip.height/2),0))
- smooth = core.std.StackVertical([lf, rf])
- else:
- smooth = interpolate(clip)
- ########### END OF base.py ###########
- smooth.set_output()
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement