thescrapyard
22nd April 2014, 10:45
Just tried out this function I came across and did a very good job of calming down all grain on old 70's and 80's British Children's DVD's I'm trying to clean up (Fingerbobs, DangerMouse, Paddington Bear, Wind in The Willows), seems originally for grainy analogue captures but works perfectly for grainy BBC DVD transfers
It did exactly what I'm looking for, but using avsp as a test bed for the scripts to get the results I am looking for, I end up with quite bad flickering in the output, like the frame is slightly behind the first one. I'm not sure if this is down to avsp can't keep up when the output is played alongside the source or the cause oft he scripts
Any suggestion on how to stop this would be appreciated
Scripts I'm using are :
function TMedian2(clip c)
{
Median2(c.selectevery(1,-2),c.selectevery(1,-1),c,c.selectevery(1,1),c.selectevery(1,2))
}
Function Median2(clip "input_1", clip "input_2", clip "input_3", clip "input_4", clip "input_5", string "chroma")
{# median of 5 clips from Helpers.avs by G-force
chroma = default(chroma,"false") #default is "process". Alternates: "copy first" or "copy second"
#MEDIAN(i1,i3,i5)
Interleave(input_1,input_3,input_5)
chroma == "process" ? Clense(reduceflicker=false) : Clense(reduceflicker=false,grey=true)
m1 = selectevery(3,1)
#MAX(MIN(i1,i3,i5),i2)
m2 = input_1.MT_Logic(input_3,"min",chroma=chroma).MT_Logic(input_5,"min",chroma=chroma).MT_Logic(input_2,"max",chroma=chroma)
#MIN(MAX(i1,i3,i5),i4)
m3 = input_1.MT_Logic(input_3,"max",chroma=chroma).MT_Logic(input_5,"max",chroma=chroma).MT_Logic(input_4,"min",chroma=chroma)
Interleave(m1,m2,m3)
chroma == "process" ? Clense(reduceflicker=false) : Clense(reduceflicker=false,grey=true)
selectevery(3,1)
chroma == "copy first" ? last.MergeChroma(input_1) : chroma == "copy second" ? last.MergeChroma(input_2) : last
Return(last)
}
And I'm using this simpler set up until I can stop the flickering, then I can add back in the denoising using RemoveNoiseMC and a bit of levels alteration using RoboLevels or AutoLevels
And use this for testing what I'm doing
clip1=dss2("J:\ConvertXToDVD\test09.mkv").ConvertToYV12()
clip2=tdeint(type=4,slow=2,tryweave=true).tmedian2()
stackhorizontal(clip1,clip2)
Which works perfectly for every other filter I have used, until I tried seeing what median2 could help with
It did exactly what I'm looking for, but using avsp as a test bed for the scripts to get the results I am looking for, I end up with quite bad flickering in the output, like the frame is slightly behind the first one. I'm not sure if this is down to avsp can't keep up when the output is played alongside the source or the cause oft he scripts
Any suggestion on how to stop this would be appreciated
Scripts I'm using are :
function TMedian2(clip c)
{
Median2(c.selectevery(1,-2),c.selectevery(1,-1),c,c.selectevery(1,1),c.selectevery(1,2))
}
Function Median2(clip "input_1", clip "input_2", clip "input_3", clip "input_4", clip "input_5", string "chroma")
{# median of 5 clips from Helpers.avs by G-force
chroma = default(chroma,"false") #default is "process". Alternates: "copy first" or "copy second"
#MEDIAN(i1,i3,i5)
Interleave(input_1,input_3,input_5)
chroma == "process" ? Clense(reduceflicker=false) : Clense(reduceflicker=false,grey=true)
m1 = selectevery(3,1)
#MAX(MIN(i1,i3,i5),i2)
m2 = input_1.MT_Logic(input_3,"min",chroma=chroma).MT_Logic(input_5,"min",chroma=chroma).MT_Logic(input_2,"max",chroma=chroma)
#MIN(MAX(i1,i3,i5),i4)
m3 = input_1.MT_Logic(input_3,"max",chroma=chroma).MT_Logic(input_5,"max",chroma=chroma).MT_Logic(input_4,"min",chroma=chroma)
Interleave(m1,m2,m3)
chroma == "process" ? Clense(reduceflicker=false) : Clense(reduceflicker=false,grey=true)
selectevery(3,1)
chroma == "copy first" ? last.MergeChroma(input_1) : chroma == "copy second" ? last.MergeChroma(input_2) : last
Return(last)
}
And I'm using this simpler set up until I can stop the flickering, then I can add back in the denoising using RemoveNoiseMC and a bit of levels alteration using RoboLevels or AutoLevels
And use this for testing what I'm doing
clip1=dss2("J:\ConvertXToDVD\test09.mkv").ConvertToYV12()
clip2=tdeint(type=4,slow=2,tryweave=true).tmedian2()
stackhorizontal(clip1,clip2)
Which works perfectly for every other filter I have used, until I tried seeing what median2 could help with