Log in

View Full Version : Match 2 fields


O.S.D
28th April 2006, 08:46
Hi

How can i match this 2 fields togeder in avisynth?

Look at the sampel.

http://www.savefile.com/files/3221808

Thanks

hanfrunz
28th April 2006, 10:49
Hello O.S.D.,

one field is 8 lines higher than the other. If this 8 lines are constant in your video this should work:

imagereader("test.bmp")
assumeframebased()
movefield(0,0,-8)

function movefield(clip c, int field, int x, int y) {
separatefields(c)

a=selectodd()
b=selecteven()

d = (field==0) ? a : b
d= (x>0) ? crop(d,0,0,-x,0).addborders(x,0,0,0) : crop(d,-x,0,0,0).addborders(0,0,-x,0)
d= (y>0) ? crop(d,0,y,0,0).addborders(0,0,0,y) : crop(d,0,0,0,y).addborders(0,-y,0,0)
d = (field==0) ? interleave(d,b) : interleave(a,d)
d=weave(d)
return d
}

hanfrunz

O.S.D
28th April 2006, 12:53
Thanks for the help hanfrunz, it worked! So now the frame is good but it ended up 1 line higer then the rest of the frames in the video can i some howe move the hole frame down 1 line?

:thanks:

hanfrunz
28th April 2006, 14:40
you can just crop() the bottom-line and add a blackborder of one line to the top, so whole frame moves down. But be aware that moving one line down means swapping field-order so you alway should move a multiple of 2 lines.

hanfrunz