#RESULT3: AUTOLEVELS, MANUAL COLOR CORRECTIONS addborders(bord_left, bord_top, bord_right, bord_bot) Result2= interpolated.levels(black_level,1.0,white_level,0,255).coloryuv(autowhite=true)\ autolevels().crop(X,0,-X2,-0).addborders(bord_left, bord_top, bord_right, bord_bot) sharpen(last_sharp).sharpen(last_sharp).blur(last_blur) Interpolated= denoised.MFlowFps(super, backward_vec, forward_vec, num=numerator, den= denumerator, ml=100)\ #CHANGING FRAME RATE WITH INTERPOLATION/FINALSHARPENINGīackward_vec= MAnalyse(super, blksize=block_size, blksizev= block_size_v, overlap=block_over, isb=true)įorward_vec= MAnalyse(super,blksize=block_size, blksizev= block_size_v, overlap=block_over, isb= false)
Vectors= cleaned.MVAnalyseMulti(refframes=denoising_frames, pel=2, blksize=block_size, blksizev= block_size_v, overlap=block_over, idx=1)ĭenoised= cleaned.MVDegrainMulti(vectors, thSAD=denoising_strength, SadMode=1, idx=2).unsharpmask(USM_sharp_ness3,USM_radi_us3,0) unsharpmask(USM_sharp_ness2,USM_radi_us2,0).Lanczos4Resize(W,H) Noise_baseclip= stab2.levels(0,gamma,255,0,255).tweak(sat=saturation).blur(dirt_blur)Ĭleaned= RemoveDirtMC(noise_baseclip,dirt_strength).unsharpmask(USM_sharp_ness1,USM_radi_us1,0)\ Stab5= Lanczos4Resize(stab2,W,H).sharpen(0.5) Stab3=DePanStabilize(source1,data=mdata,cutoff=0.5,dxmax=maxstabH,dymax=maxstabV,method=0,info=true) Stab2= stab.crop(CLeft,CTop,-CRight,-CBottom) Stab=DePanStabilize(source1,data=mdata,cutoff=0.5,dxmax=maxstabH,dymax=maxstabV,method=0,mirror=15).deflicker() Mdata=DePanEstimate(stab_reference,trust=1.0,dxmax=maxstabH,dymax=maxstabV) Stab_reference= source1.crop(est_left,est_top,-est_right,-est_bottom).tweak(cont=est_cont).MT_binarize(threshold=80).greyscale().invert() Source1= AviSource(film).assumefps(play_speed).trim(trim_begin,0).converttoYV12() SetMTMode(5) #disable all MT calls if you are using a single core computer SetMemoryMax(1500) #set this to 1/3 of the available memory X2=2 # X2 is a special parameter for reducing the autolevels effect on the blacks X=2 # X is a special parameter for reducing the autolevels effect on the whites Last_blur= 0.2 #this smooths out the heavy sharpening effects Last_sharp= 0.4 #final sharpening step after interpolation USM_sharp_ness3= 15 USM_radi_us3=1 #third sharpening (UnsharpMask) after degraining with MVDegrainMulti() USM_sharp_ness2= 20 USM_radi_us2=2 #second harpening (UnsharpMask) after cleaning with removedirtMC() USM_sharp_ness1= 40 USM_radi_us1= 3 #first sharpening (UnsharpMask) after cleaning with removedirtMC() MaxstabV=8 #maximum values for the stabiliser (in pixels) 20 is a good start valueĮst_left=8 est_top=8 est_right=8 est_bottom=8 est_cont=1.4 #crop and contast values for special Estimate clipĭirt_blur= 1.4 # some blur before cleaning to avoid pixel artifactsĭirt_strength=40 # set this lower for clean films.ĭenoising_strength= 400 #denoising level of second denoiser: MVDegrainMulti()ĭenoising_frames= 3 #number of frames for averaging (forwards and backwards) 3 is a good start valueīlock_size= 8 #block size of MVDegrainMulti()īlock_over= 4 #block overlapping of MVDegrainMulti() Values can be positive or negativeīlack_level=0 white_level=255 output_black=0 output_white=255 # manual levels, when returning result4ĬLeft=8 CTop=8 CRight=8 CBottom=8 #crop values after Depan and before final resizingīord_left=0 bord_top=0 bord_right=0 bord_bot=0 #720p= borders 150 Numerator= 25 #numerator for the interpolator (final frame rate)ĭenumerator= 1 #denumerator example: 60000/1001= 59.94fpsīlue= -0 red= -0 #manual color adjustment, when returning result3 or result4. Result="resultS4" # specify the wanted output here # cleaning, degraining, resizing, stabilizing, sharpening, auto-levels and auto-white balance.įilm="C:\Users\lapivar\Downloads\- samsung sp2014n SAVE\5.LEPCSO\filmscan_3_tek.avi" # source clip, please specify the full path here # added removedirtMC() as suggested by John Meyer RAW Paste Data # film restoration script by videoFred.