Welcome to Doom9's Forum, THE in-place to be for everyone interested in DVD conversion. Before you start posting please read the forum rules. By posting to this forum you agree to abide by the rules. |
|
19th December 2007, 14:46 | #1 | Link |
Registered User
Join Date: Jan 2005
Location: cz
Posts: 704
|
mvtools-how make a vertical mask
Please help with following:
Tried to select parts with deinterlace artefacts (FLICKER) using mvtools. But im not able to select them sucessfully. Could someone give me an advice? The idea what i want to do is visible in following script. Thank you, Terka source avi: http://www.pate15.de/entrelacement/p...m-mvbobmod.avi Code:
PluginPath = "C:\Program Files\AviSynth\plugins\" LoadPlugin(pluginpath+"mvtools.dll") orig=avisource("c:\stockholm-mvbobmod.avi") input=orig.DuplicateLastFrame() Odd=input.SelectOdd() Even=input.SelectEven() OddNew=Even.DoubleFramerate().SelectOdd() final=Interleave(Even,Oddnew) comp=Interleave(Odd,Oddnew) # todo compare Oddnew with Odd and get parts with vertical movement with # lenght 1 or 2 pixel. Then take the masked parts from Oddnew, rest from Odd. # tried following (see below) but not much sucessful source=comp vectors = source.MVAnalyse(isb = true, truemotion=true, pel=2, idx=1,search=3) o=source.MVMask(kind=4,vectors) StackHorizontal(o, orig) #to see if the mask is suitable function DoubleFramerate (clip c) { #To double fps with MVFlowFps for 'best' results (but slower processing): backward_vec = c.MVAnalyse( isb = true, pel=2, search=3, idx=1) #pel 2 +-ok pel 1 rozmazne forward_vec = c.MVAnalyse( isb = false, pel=2, search=3, idx=1) c.MVFlowFps(backward_vec, forward_vec, num=2*FramerateNumerator(c), den=FramerateDenominator(c), idx=1) } function DuplicateLastFrame (clip c) { DuplicateFrame(c,Framecount(c)) } |
2nd January 2008, 19:37 | #5 | Link |
Registered User
Join Date: Apr 2002
Location: Germany
Posts: 5,391
|
Why "nothing useful"? The masks of MVMask() contain the same information in luma and chroma channels. The colors might seem strange, but it's correct that way. For verification if your masking is similar to what you want, just use greyscale() on the mask.
__________________
- We´re at the beginning of the end of mankind´s childhood - My little flickr gallery. (Yes indeed, I do have hobbies other than digital video!) |
|
|