View Single Post
Old 2nd June 2010, 20:40   #10  |  Link
kypec
User of free A/V tools
 
kypec's Avatar
 
Join Date: Jul 2006
Location: SK
Posts: 826
Thank you very much Didée, your approach did wonders to my source. I had to replace MedianBlurT with Clense (hopefully you mentioned that as well) because the encoding process kept crashing at the very end. First I thought that it's x264 latest revision to blame (r1613) but the error persisted even with r1538. Once I found the offending part in this filter chain and replaced it the encoding finished always fine.
Here is my complete script, I tried to smooth big uniformly coloured areas (sky, water surface) even more with FFT3DFilter but didn't see any effect really so in the end I left it out completely.
Code:
# Open source video clip
AVISource("D:\SOURCE\Family-Ness\Rodina Nessovcov.avi",audio=false).Trim(0,7599)
# Initialize variable with path to my A/V tools
avdir=GetSystemEnv("PROGRAMFILES")+"\AVTools\"
# Load all the plugins that will be used in the script
LoadPlugin(avdir + "plugins\mvtools2.dll")         # MVTools (v2.5.10)
#~ LoadPlugin(avdir + "plugins\FFT3DFilter.dll")      # FFT3Dfilter (v2.1.1)
LoadPlugin(avdir + "plugins\aWarpSharp.dll")       # aWarpSharp (2009.06.19)
#~ LoadPlugin(avdir + "plugins\medianblur.dll")       # MedianBlur (v0.84)
LoadPlugin(avdir + "plugins\DePan.dll")            # DePan (v1.10.1)
LoadPlugin(avdir + "plugins\DePanEstimate.dll")    # DePanEstimate (v1.9.2)
LoadPlugin(avdir + "plugins\RepairSSE2.dll")       # Repair (v1.0PR)
LoadPlugin(avdir + "plugins\RemoveGrainSSE2.dll")  # RemoveGrain (v1.0PR)
LoadPlugin(avdir + "plugins\RemoveGrainTSSE2.dll") # RemoveGrainT (v1.0PR)
Import(avdir + "plugins\Stab.avsi")                # Stabilize script (v1.0)

# remove single-frame spots
o=last
osup = o.MSuper(pel=2,sharp=2)
bv1  = osup.MAnalyse(isb=true, delta=1,blksize=8,overlap=4,search=4)
fv1  = osup.MAnalyse(isb=false,delta=1,blksize=8,overlap=4,search=4) 
bc1  = o.MCompensate(osup,bv1)
fc1  = o.MCompensate(osup,fv1)
Interleave(fc1,o,bc1)
#~ MedianblurT(0,0,0,1)   #  you can also use "Clense(reduceflicker=false)" instead
Clense()
SelectEvery(3,1)
# stabilize subtle shaking of whole image
Stab(8,10,10)
# crop and resize
Crop(8,2,-0,-0).Spline36Resize(640,480)
#~ FFT3DFilter(plane=3, bt=3, sigma=3, bw=16, bh=16, ow=8, oh=8) # denoise chroma
aWarpSharp2(thresh=160, blur=3, type=0, depth=16, chroma=4) # sharpen the image, make it crisp and less blurry
#~ StackHorizontal(o,last)
The resulting MP4 (AVC+AAC-HE) is only 41% size of original AVI (ASP+MP3) with better visual quality, isn't that simply amazing?
kypec is offline   Reply With Quote