You Know
11th July 2004, 23:30
Hi i need help for with little script.
My purpose is detect scene switch by script. i would improve the blended filed before and next bad frame after scene switch.
function DetectSceneChange(clip c)
{ return (YDifferenceFromPrevious() > 20) ? (UDifferenceFromPrevious() > 5.5) ? (VDifferenceFromPrevious() > 4.5) ? 1:0 :0 :0
}
MPEG2Source("F:\gto\gto.d2v",idct=4)
AssumeTFF()
SeparateFields()
ConvertToYV12()
even = SelectEven()
odd = Selectodd()
f = DetectSceneChange(even)
even = ConditionalFilter(even, even.DeleteFrame(0), even, "f", "=", "1")
odd = ConditionalFilter(odd, odd.DeleteFrame(0), odd, "f", "=", "1")
return Interleave(even, odd).weave()
I would calculate YUV Difference only one time and not one for each stream because the scene switch is same for both top and bottom field, but I do not understand how to do a working script. Anyone can help?
My purpose is detect scene switch by script. i would improve the blended filed before and next bad frame after scene switch.
function DetectSceneChange(clip c)
{ return (YDifferenceFromPrevious() > 20) ? (UDifferenceFromPrevious() > 5.5) ? (VDifferenceFromPrevious() > 4.5) ? 1:0 :0 :0
}
MPEG2Source("F:\gto\gto.d2v",idct=4)
AssumeTFF()
SeparateFields()
ConvertToYV12()
even = SelectEven()
odd = Selectodd()
f = DetectSceneChange(even)
even = ConditionalFilter(even, even.DeleteFrame(0), even, "f", "=", "1")
odd = ConditionalFilter(odd, odd.DeleteFrame(0), odd, "f", "=", "1")
return Interleave(even, odd).weave()
I would calculate YUV Difference only one time and not one for each stream because the scene switch is same for both top and bottom field, but I do not understand how to do a working script. Anyone can help?