Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #Avisynth script to extract progressive frames super 8mm and postprocess from a modified eumig 610D with microswitch connected to microphone input of DSLR
- #Most of the good parts in this script is from VideoFred www.super-8.be
- # Info on the hardware setup: oysteineliassen.blogspot.com
- SetMemoryMax(800)
- #LoadPlugin("D:\telecine\Film_Extractor_v1\GetDups.dll")
- LoadPlugin("C:\Program Files (x86)\AviSynth 2.5\plugins\qtsource.dll")
- LoadPlugin("C:\Program Files (x86)\AviSynth 2.5\plugins\removedirt.dll")
- LoadPlugin("C:\Program Files (x86)\AviSynth 2.5\plugins\Antiflicker.dll")
- Loadplugin("C:\Program Files (x86)\AviSynth 2.5\plugins\Depan.dll")
- LoadPlugin("C:\Program Files (x86)\AviSynth 2.5\plugins\DepanEstimate.dll")
- LoadPlugin("plugins/autolevels_06.dll")
- Import("plugins/03_RemoveDirtMC.avs")
- v= QTInput("MVI_4124.mov", audio=1 )+QTInput("MVI_4125.mov", audio=1 )
- fs_camera = 25
- fs_projector = 6
- #v=FlipHorizontal(v)
- v=FlipVertical(v)
- start=0#(30)*fs_camera
- end=0#(17*60+53)*fs_camera
- v=Trim(v,start,end)
- #v=ReduceBy2(v)
- #STABILISING PARAMETERS, YOU REALY MUST USE STABS TO CHECK STABILISATION!
- #----------------------------------------------------------------------------------------------------------------------------
- maxstabH=20
- maxstabV=20 #maximum values for the stabiliser (in pixels) 20 is a good start value
- est_left=200 est_top=200 est_right=200 est_bottom=200 #crop values for special Estimate clip
- trust_value= 1.0 # scene change detection, higher= more sensitive
- cutoff_value= 0.5 # no need to change this, but you can play with it and see what you get
- #COLOR AND LEVELS PARAMATERS
- #----------------------------------------------------------------------------------------------------------------------------
- saturation=1.2 #for all outputs
- gamma= 1.2 # for all outputs
- blue= -10 red= 0 #manual color adjustment, when returning result3 or result4. Values can be positive or negative
- black_level=0 white_level=235 output_black=0 output_white=255 # manual levels, when returning result4
- #AUTO LEVELS PARAMETERS
- #--------------------------------------------------------------------------------------------------------------------------------
- autolev_low= 0 # limit of autolevels low output
- autolev_high= 235 # limit of autolevels high output
- # SHARPENING PARAMETERS
- #--------------------------------------------------------------------------------------------------------------------------------
- USM_sharp_ness= 38 USM_radi_us= 3 #this is the start value for the unsharpmask sharpening
- #do not set radius less then 3
- #the script will automatically add two other steps with lower radius
- #CLEANING PARAMETERS
- #--------------------------------------------------------------------------------------------------------------
- dirt_strenght=40 # set this lower for clean films.
- #UNSHARPMASK AUTO_PARAMETERS
- #-------------------------------------------------------------------------------------------------------------------------------------------
- USM_sharp_ness1 = USM_sharp_ness
- USM_sharp_ness2 = USM_sharp_ness+(USM_sharp_ness/2)
- USM_sharp_ness3 = USM_sharp_ness*2
- USM_radi_us1 = USM_radi_us
- USM_radi_us2 = USM_radi_us-1
- USM_radi_us3 = USM_radi_us2-1
- convertAudioTo16Bit(v)
- n_total = framecount()
- n=n_total * fs_projector/fs_camera
- source=GetDups(mode=1,show=0, audio=2, audio_thr=400, audio_shift =-8)
- source1= source.trim(0,n).converttoYV12()
- stab_reference= source1.crop(est_left,est_top,-est_right,-est_bottom).colorYUV(autogain=true)
- mdata=DePanEstimate(stab_reference,trust=trust_value,dxmax=maxstabH,dymax=maxstabV)
- stab2= DePanStabilize(source1,data=mdata,cutoff=cutoff_value,dxmax=maxstabH,dymax=maxstabV,method=0,mirror=15)
- noise_baseclip= stab2.levels(0,gamma,255,0,255).tweak(sat=saturation)
- cleaned=RemoveDirtMC(noise_baseclip,dirt_strenght).unsharpmask(USM_sharp_ness1,USM_radi_us1,0).unsharpmask(USM_sharp_ness2,USM_radi_us2,0)
- # FINAL SHARPENING
- #.................................................................................................................................................
- sharpened=cleaned.unsharpmask(USM_sharp_ness3,USM_radi_us3,0)
- sharpened.coloryuv(autowhite=true).converttoRGB24().autolevels(output_low= autolev_low, output_high= autolev_high)\
- .converttoYV12()
- Crop(300,0,-400,-50)
- w=width()
- h=height()
- h2=720
- w2=h2*w/h
- border=(1280-w2)/2
- Lanczos4Resize(w2,h2)
- addborders(border, 0, border, 0)
- #ReduceBy2()
- KillAudio()
- AssumeFPS(18)
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement