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.

 

Go Back   Doom9's Forum > Capturing and Editing Video > Avisynth Usage
Register FAQ Calendar Today's Posts Search

Reply
 
Thread Tools Search this Thread Display Modes
Old 19th December 2007, 14:46   #1  |  Link
Terka
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))
}
Terka is offline   Reply With Quote
Old 20th December 2007, 11:53   #2  |  Link
Terka
Registered User
 
Join Date: Jan 2005
Location: cz
Posts: 704
The file is 320kB small.
Could anyone give me an advice how to correct the script above?
Terka is offline   Reply With Quote
Old 26th December 2007, 12:30   #3  |  Link
Terka
Registered User
 
Join Date: Jan 2005
Location: cz
Posts: 704
have 2 sources
1st original
2nd with some pixels moved up (in comparation to original)
and some artifacts
want to select the pixels moved up (by 1 or 2 pixels)
can this be done?
Terka is offline   Reply With Quote
Old 2nd January 2008, 17:59   #4  |  Link
Terka
Registered User
 
Join Date: Jan 2005
Location: cz
Posts: 704
in my mask some green parts appears, nothing useful. could someone help please?
Terka is offline   Reply With Quote
Old 2nd January 2008, 19:37   #5  |  Link
Didée
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!)
Didée is offline   Reply With Quote
Reply


Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT +1. The time now is 04:15.


Powered by vBulletin® Version 3.8.11
Copyright ©2000 - 2024, vBulletin Solutions Inc.