View Full Version : Interlaced video, 1st pixel row in top field is black
kumi
3rd October 2007, 00:54
I have a NTSC DVD with interlaced material, and somehow, all the top-most fields have a black first row of pixels:
http://i23.tinypic.com/er0jns.png
But the bottom fields are OK:
http://i20.tinypic.com/fmkz1d.png
I wouldn't mind, except that I'm deinterlacing this video, and the results at the top of the frame are temporally unstable and generally annoying:
http://i21.tinypic.com/10fnkh3.png
How to alleviate this problem? :stupid:
Guest
3rd October 2007, 04:12
We don't ask for "best" around here, but here is one possibility:
Use Simon Walters' Border Control filter to replace the top line with a copy of the second line (use the Smear operator). Then apply your deinterlacer.
http://www.geocities.com/siwalters_uk/fnews.html
Maybe:
BorderControl(YTS=2)
If that doesn't work, I have another idea. Please let me know.
kumi
3rd October 2007, 06:00
Thank you very much neuron2, I think your suggestion is working just fine. My script is:
MPEG2Source("C:\foo.d2v",idct=7)
BorderControl(YTS=2)
AssumeTFF()
TDeint(order=-1, type=2)
Just out of curiosity, what was your other idea?
Guest
3rd October 2007, 14:00
Just to find a way to copy the second line to the first line using scripting.
kumi
3rd October 2007, 18:57
OK cheers, that's the avenue I was persuing before you told me about BorderControl.
themostestultimategenius
19th October 2007, 16:48
Just wondering, is it possible to smear just a part of the bottom few lines?
http://img34.picoodle.com/img/img34/6/10/19/f_1m_1e50fe9.png
Guest
19th October 2007, 17:10
You'd have to modify the filter or write a script to split the video into two pieces, apply the smear to one, and then re-stack them.
scharfis_brain
19th October 2007, 17:36
x= horizontal value where black line starts
stackvertical( crop(0, 0, 0, height - 1), stackhorizontal( crop( 0, height - 1, x, 0), crop( x + 1, heigth - 3, 0, -2)))
that should fix this problem in theory. not tried it
foxyshadis
19th October 2007, 18:12
Won't work in YV12, will have to be converted to YUY2 or RGB. Creating a mask is another solution, especially if it varies across the video.
themostestultimategenius
20th October 2007, 11:11
You'd have to modify the filter or write a script to split the video into two pieces, apply the smear to one, and then re-stack them.
I see. Thanks for the replies =)
I'll try out scharfis' suggestion when I'm not so busy. If it doesn't work I'll mask it as foxy has suggested.
Mug Funky
21st October 2007, 04:58
i used this one back when i was encoding DVDs:
function linefill (clip c, int "offset")
{
offset = default(offset,1)
offset = offset >= c.height/2 - 4 ? c.height/2 - 8 : offset
c.lanczosresize(c.width,c.height-(offset*2),0,1,c.width,c.height-(offset*2)).lanczosresize(c.width,c.height,0,-offset,c.width,c.height)
}
advantage is you get single line precision without going out of yv12.
disadvantage is it does a line on both the top and bottom of frame, and can't cut in halfway through a line. usually it's enough :)
this could quite easily be hacked to do what's needed though.
these days i don't bother because once you master to tape, hey presto the lines come back - don't ask me why this happens in the days of all-digital chains, but there was a reason for it back in the analog days.
vBulletin® v3.8.11, Copyright ©2000-2026, vBulletin Solutions Inc.