turnipzoink
25th September 2009, 12:44
Hi
I'm converting low quality mp2 vhs to h264. Total novice here.
I'm happy with the results of this script, but maybe it could be better. Is there anything I'm missing, or maybe the order of things should be different for better compression.
What do you think?
# Includes
function RemoveDirt(clip input, bool "_grey", int "repmode")
{
_grey=default(_grey, false)
repmode=default(repmode, 16)
clmode=17
clensed=Clense(input, grey=_grey, cache=4)
sbegin = ForwardClense(input, grey=_grey, cache=-1)
send = BackwardClense(input, grey=_grey, cache=-1)
alt=Repair(SCSelect(input, sbegin, send, clensed, debug=true), input, mode=repmode, modeU = _grey ? -1 : repmode )
restore=Repair(clensed, input, mode=repmode, modeU = _grey ? -1 : repmode)
corrected=RestoreMotionBlocks(clensed, restore, neighbour=input, alternative=alt, gmthreshold=70, dist=1, dmode=2, debug=false, noise=10, noisy=12, grey=_grey)
return RemoveGrain(corrected, mode=clmode, modeU = _grey ? -1 : clmode)
}
DGDecode_mpeg2source("D:\~\g1,AV_2008-10-02_12-27-27.d2v", info=3)
ColorMatrix(hints=true, interlaced=true, threads=0)
ConverttoYV12(interlaced=true)
# Inverse Telecine with field matching and decimate functions
tfm()
tdecimate()
# Remove Dirt
RemoveDirt()
AutoCrop(mode=0,wMultOf=16,hMultOf=16)
I'm converting low quality mp2 vhs to h264. Total novice here.
I'm happy with the results of this script, but maybe it could be better. Is there anything I'm missing, or maybe the order of things should be different for better compression.
What do you think?
# Includes
function RemoveDirt(clip input, bool "_grey", int "repmode")
{
_grey=default(_grey, false)
repmode=default(repmode, 16)
clmode=17
clensed=Clense(input, grey=_grey, cache=4)
sbegin = ForwardClense(input, grey=_grey, cache=-1)
send = BackwardClense(input, grey=_grey, cache=-1)
alt=Repair(SCSelect(input, sbegin, send, clensed, debug=true), input, mode=repmode, modeU = _grey ? -1 : repmode )
restore=Repair(clensed, input, mode=repmode, modeU = _grey ? -1 : repmode)
corrected=RestoreMotionBlocks(clensed, restore, neighbour=input, alternative=alt, gmthreshold=70, dist=1, dmode=2, debug=false, noise=10, noisy=12, grey=_grey)
return RemoveGrain(corrected, mode=clmode, modeU = _grey ? -1 : clmode)
}
DGDecode_mpeg2source("D:\~\g1,AV_2008-10-02_12-27-27.d2v", info=3)
ColorMatrix(hints=true, interlaced=true, threads=0)
ConverttoYV12(interlaced=true)
# Inverse Telecine with field matching and decimate functions
tfm()
tdecimate()
# Remove Dirt
RemoveDirt()
AutoCrop(mode=0,wMultOf=16,hMultOf=16)