Log in

View Full Version : Why I love Avisynth


MadRat
2nd November 2009, 16:54
I used my video capture card to record Lethal Weapon 3 off a local TV station that has a weak signal. The video is nearly unwatchable. The image quality will never equal a DVD but it's now tolerable and significantly better. If anyone knows of away of getting rid of those last few wrinkles I'd be greatful to hear it.

# Load video
#-----------
MPEG2Source("E:\MyVideos\Lethal Weapon 3.d2v", cpu=0)

# Rainbow removal #1
#-------------------
tcomb(mode=1,fthreshC=12,othreshC=35)

# Inverse Telecine
#-----------------
deinted = tdeint(mode=2)
tfm(clip2=deinted)
TDecimate(mode=0)

# Correct the color pallet & crop
#--------------------------------
ColorMatrix(mode="Rec.709->Rec.601")
Crop(16, 56, -0, -56)

# Rainbow removal #2
#-------------------
ChubbyRain2()

# Motion compensated noise removal with lots of sharpening
#---------------------------------------------------------
vf=last.mvanalyse(pel=2,blksize=8,isb=false,idx=1,overlap=4,sharp=2,truemotion=true)
vb=last.mvanalyse(pel=2,blksize=8,isb=true,idx=1,overlap=4,sharp=2,truemotion=true)
vf2=last.mvanalyse(pel=2,blksize=8,isb=false,idx=1,delta=2,overlap=4,sharp=2,truemotion=true)
interleave(\
mvcompensate(last,vf2,idx=1,thSCD1=600)\
, mvcompensate(last,vf,idx=1,thSCD1=600)\
, last\
, mvcompensate(last,vb,idx=1,thSCD1=600))
fft3dfilter(sigma=6,bt=4,plane=4,sharpen=1.0,bw=32,bh=32,ow=16,oh=16)
selectevery(4,2)

# Cross frequency interference reduction
# (Don't use these settings they only work with this specific video)
#-------------------------------------------------------------------
DeFreq(fy=0,fx=89,dx=3,dy=6)

# More sharpening
#----------------
LSFmod()

# Resize to mod16 with the same aspect ratio as before
#-----------------------------------------------------
spline64Resize(704,368,0, 0, -2, -2)


I'll probably get in some sort of trouble for this post but I want to say thanks to the ones who deserve the credit: the guys who wrote my favorite scripts and plugins. Thank you, tritical, Wilbert, Mug Funky, Lothar, Manao, Fizick, LaTo, Kassandro, sh0dan, tsp and Fredrik Mellbin.

Terranigma
2nd November 2009, 17:47
)
LSFmod()

I'll probably get in some sort of trouble for this post but I want to say thanks to the ones who deserve the credit: the guys who wrote my favorite scripts and plugins. Thank you, tritical, Wilbert, Mug Funky, Lothar, Manao, Fizick, LaTo, Kassandro, sh0dan, tsp and Fredrik Mellbin.


You left out someone... Didée. -P If it wasn't for him, there'd be no LimitedSharpen or all the variations that spun from it. He also helped LaTo a bit with his LSFmod script as well.

MadRat
3rd November 2009, 03:27
I keep thinking Didée belonged in there somewhere; I knew I must be using one of his filters or scripts but I couldn't figure out which one. Thank you, Didée.
I hope that someone will look at my script and find it useful or find a way to improve it.