Log in

View Full Version : apply script without touching quality of video


YKefas
4th January 2019, 08:07
does anyone know how to encode video without reducing quality.
i just want to apply the script below without reducing quality of the video and not making the video size too large from the original
Sorry bad english

core = vs.get_core(threads=19)

core.std.LoadPlugin("C:\Program Files (x86)\SVP 4 Dev\plugins64\svpflow1_vs.dll")
core.std.LoadPlugin("C:\Program Files (x86)\SVP 4 Dev\plugins64\svpflow2_vs.dll")

clip = clip.resize.Bicubic(format=vs.YUV420P8)

crop_string = ""
resize_string = "core.resize.Bicubic(input,1280,720,filter_param_a=0,filter_param_b=0.75)"
super_params = "{pel:1,scale:{up:0},gpu:1,full:false,rc:true}"
analyse_params = "{main:{search:{coarse:{distance:-8},distance:0}}}"
smoothfps_params = "{gpuid:11,rate:{num:2,den:1},algo:13,mask:{area:50},scene:{blend:true}}"

def interpolate(clip):
input = clip
if crop_string!='':
input = eval(crop_string)
if resize_string!='':
input = eval(resize_string)

super = core.svp1.Super(input,super_params)
vectors = core.svp1.Analyse(super["clip"],super["data"],input,analyse_params)
smooth = core.svp2.SmoothFps(input,super["clip"],super["data"],vectors["clip"],vectors["data"],smoothfps_params,src=clip)
smooth = core.std.AssumeFPS(smooth,fpsnum=smooth.fps_num,fpsden=smooth.fps_den)
return smooth

smooth = interpolate(clip)

smooth.set_output()

maybe the real question is How to apply this script without touching quality of the video & not make video size too large from original video
source script: https://www.svp-team.com/forum/viewtopic.php?id=3244

videoh
4th January 2019, 14:22
Re-encoding (other than lossless), even with a script that does nothing other than source the decoded frames, will always reduce quality to some extent. So your goal of "without touching quality" is unattainable.