Log in

View Full Version : Black horizontal line with DVD Source Videos


loneboyz
13th July 2015, 07:39
I have a half-black line up the top left and bottom right of my video when it have been ripped from source PAL DVD
If I crop about 2 pixel each side, will remove the half-black lines from the side but result wrong aspect
Source have frame size 720x576 and encode with SAR 64:45 (1024x576)

http://t.imgbox.com/V9s27dOp.jpg (http://imgbox.com/V9s27dOp)

Does anyone know how to fix this with Avisynth use fillter StackHorizontal, Overlay or RemoveDirt?

Thanks in advance

creaothceann
13th July 2015, 08:41
These black parts are part of the TV standard, afaik. You have 625 lines in PAL, and the display is interlaced so it draws 313 even-numbered lines. That last line goes halfway into the bottom of the screen, then the vertical retrace kicks in. The rest of the line is drawn in the right half of the screen at the very top. And since only half of a line is drawn, the following lines are offset between the already drawn lines from the first pass until the full frame is filled.

To fix this, I'd just crop the lines or repeat the content of the neighboring lines:

ConvertToYV24

half_width = Width / 2
last_line = Height - 1

tl = Crop( 0, 1, half_width, 1)
br = Crop(half_width, last_line - 1, 0, 1)

Overlay(tl, x= 0, y= 0)
Overlay(br, x=half_width, y=last_line)

loneboyz
13th July 2015, 10:14
I'll try. Thank for your suggest!

Reel.Deel
13th July 2015, 15:04
I would do something like this (Padding function can be found here (http://forum.doom9.org/showthread.php?t=165946#post1596804)):

source("whatever")

y = ConvertToY8().Crop(0,1,0,-1).Padding(0,1,0,1)
u = UToY8().Crop(0,1,0,-1).Padding(0,1,0,1)
v = VToY8().Crop(0,1,0,-1).Padding(0,1,0,1)

YToUV(u,v,y)

Alternatively you can just use FillMargins(0,1,0,1) (http://avisynth.nl/index.php/FillMargins) to do the same thing. If you're looking for a more versatile way of doing it, then BorderControl (http://avisynth.nl/index.php/BorderControl) is what you need.

loneboyz
13th July 2015, 17:06
I'm using Avisynth 2.5 so I can't crop with odd numbers

I croped over 2 pixels

half_width = Width / 2
last_line = Height - 2

tl = Crop( 0, 2, half_width, 2)
br = Crop(0, last_line - 2, 0, 2)

Overlay(tl, x=0, y= 0)
Overlay(br, x=0, y=last_line)

and result

http://8.t.imgbox.com/FHmZ6CzT.jpg (http://imgbox.com/FHmZ6CzT)

At last, i upgraded Avs 2.6 and fix it by Padding function

Tks a lot Reel Deel!