View Full Version : Reversing interlaced DV footage
HighInBC
18th January 2005, 01:25
I am trying to reverse my footage, it in the DV format, NTSC and interlaced.
The problem is when I reverse the clips the interlacing lines don't work properly and it looks bad.
I have tried the following:
clip.Reverse()
and:
function interlaced_reverse(clip clip1)
{
clip1 = clip1.SeparateFields()
odd = clip1.SelectOdd.Reverse()
evn = clip1.SelectEven.Reverse()
return Interleave(evn,odd).Weave().DoubleWeave.SelectOdd()
}
but both cause different badness. I do not wish to deinterlace as my final destination is television. Please help me.
HighInBC
18th January 2005, 01:32
I figured it out! it was simply a matter of deleting one frame from the beggining after seperate feilds, this works(I added '.trim(1,0)'):
function interlaced_reverse(clip clip1)
{
clip1 = clip1.SeparateFields().trim(1,0)
odd = clip1.SelectOdd.Reverse()
evn = clip1.SelectEven.Reverse()
return Interleave(evn,odd).Weave().DoubleWeave.SelectOdd()
}
neuron2
18th January 2005, 01:34
Yes, that is one way. Another is to shift the whole picture up by one line (and fill in the new bottom line with a copy). Simon Walters has an Aviynth filter to do that and I have a VirtualDub one. You might prefer it if you want to keep the original fields paired as they are in the source clip. Also, it avoids losing a field at the beginning, affecting audio sync.
HighInBC
18th January 2005, 01:43
Thanks, I will remember that if I ever have to work with progressive frames. Once interlacing is properly conceptualized the solutions seem to be very simple.
neuron2
18th January 2005, 02:21
Originally posted by HighInBC
Once interlacing is properly conceptualized the solutions seem to be very simple. Shhhhh! That is a secret I've been trying to hide for a long time. :rolleyes:
People do seem to confuse field swapping and field dominance reversal, though. The easy way to think of it is that field swapping is a spatial exchange, and field dominance reversal is a temporal exchange. See here for more details:
http://neuron2.net/reverse/reverse.html
Your method loses a field at the beginning, affecting audio sync.
HighInBC
18th January 2005, 03:41
ack! I did not even think about audio synch... a bunch of those can add up. Since I wish to remain in the YUY2 colorspace, I cannot use your vdub filter. I believe this is a fine pure avisynth solution:
function interlaced_reverse(clip clip)
{
a = clip.Crop(0,1,720,479)
b = clip.Crop(0,479,720,1)
return StackVertical(a,b).Reverse()
}
neuron2
18th January 2005, 04:19
That will be much slower than Si's native filter. See here:
http://www.geocities.com/siwalters_uk/reversefielddominance.html
HighInBC
18th January 2005, 04:48
Done.
Mug Funky
19th January 2005, 13:39
this also works:
doubleweave().selectodd()
stickboy
20th January 2005, 10:59
Originally posted by neuron2
Your method loses a field at the beginning, affecting audio sync.You also could add a field at the beginning.
Why would audio sync be affected? Does Trim not modify the audio track properly on field-separated clips?
Originally posted by Mug Funky
this also works:
doubleweave().selectodd()DoubleWeave duplicates the last frame, so the last frame won't be quite right.
vBulletin® v3.8.4, Copyright ©2000-2010, Jelsoft Enterprises Ltd.