View Full Version : Masking the bottom overscanned distorted bar
GGuyZ
3rd October 2006, 16:17
Hi everyone.
After capturing video, I have a lower distorted bar, which is supposed to be unseen on a TV screen due to overscanning. However, it seems some of the line is still seen on my TV screen. In addition, I heard it's a good idea to mask that bar for better compression.
I read about how to crop this line. but I was wondering if there a way to mask it somehow in avisynth so it won't change the resolution, and won't hurt the hurt of the image.
With Regards,
Guy.
unskinnyboy
3rd October 2006, 17:01
You can crop that line away and then resize the image back to whatever resolution you want. It is a bit lossy, but that's the best way.
GGuyZ
3rd October 2006, 17:26
Why is that better than masking?
By masking I don't have to resize anything. So wouldn't that be better?
unskinnyboy
3rd October 2006, 18:17
And what exactly do you mean by "masking" here? Just "covering" it up? Cover it up with what? In Avisynth, "masking" refers to isolating a portion of the image for selective processing (or in some cases, for processing the rest of the image, while leaving the masked portion untouched).
If you don't want to resize the image and lose quality, crop the offending bar away and add a border one pixel thick. That way, you'd be replacing the ugly line with a better looking one, but keep in mind that this border will affect compression, albeit in a small manner.
GGuyZ
3rd October 2006, 18:38
Thanks for the help :)
I saw in other forums people referring to masking as a better solution to this issue than cropping. What it is and how to do it - they didn't mention and I don't know, which is why I'm asking here :) .
I heard somewhere that you can also put a black bar instead of the distorted line. Something with a letterbox() function. Was that what you were referring to? That sounds like a better option then cropping to me. How is it done?
unskinnyboy
3rd October 2006, 18:57
I heard somewhere that you can also put a black bar instead of the distorted line. Something with a letterbox() function. Was that what you were referring to? That sounds like a better option then cropping to me. How is it done?
Yes, that's what I meant by adding a border.
Crop(0,0,-0,-1).AddBorders(0,0,0,1)
or
Letterbox (0,1)
Actually, Letterbox is better for this purpose. It does the same purpose as Crop() + AddBorders(), but faster.
GGuyZ
3rd October 2006, 19:04
Thank you!
Why only 1 pixel though? shouldn't I check with photoshop how many pixels that bar takes?
unskinnyboy
3rd October 2006, 19:13
Yes, you should. For demonstration purposes, I just assumed it to be 1 pixel. Of course, in your case, you would use the exact number of pixels that needs to be cropped/bordered/letterboxed.
Trixter
4th October 2006, 04:17
Yes, you should. For demonstration purposes, I just assumed it to be 1 pixel. Of course, in your case, you would use the exact number of pixels that needs to be cropped/bordered/letterboxed.
Actually, I'd round upwards to multiples of 8, to land on DCT block boundaries.
Mug Funky
4th October 2006, 04:42
if you've got a VHS cap, then you might need to shave off up to 16 pixels (adjusting for mod8)
usually that bar goes from 10-12 pixels up, but if the VHS is a dub of another VHS, it'll be up higher (it's like rings on a tree - you can count the dub generations by how many shifted bars at the bottom, and how far they're shifted).
GGuyZ
5th October 2006, 01:24
I didn't really get that DCT thing. what's that?
The distorted bar is about 9 pixels. Can't I just leave it at that? maybe 10? 16 seems to much...
Mug Funky
6th October 2006, 06:38
10 is fine.
the DCT thing:
MPEG (and most other video compressy things) will use an 8x8 pixel transform to store texture. because of the nature of this transform, if there's a discontinuity (say, a hard edge between black and a picture) halfway inside one of these blocks, compression will suffer.
it's not a pronounced effect, but if you're squeezing everything out of a given bitrate, keeping things on multiples of 8 can save you a bit.
however, losing parts of the picture through cropping is also a quality decision... so it can be a tough call to make. 16 pixels is a bit much, and on some TVs could even sneak into the visible picture area, so if your bitrate is high enough (i'd draw the line at about 4.5mbps), then just keep the letterboxing at 10 pixels.
[edit]
i think either syskin or akupenguin made a graph of different amounts of cropping vs PSNR. the multiples of 8 came out the best, but i think it wasn't that big of a difference.
Si
6th October 2006, 22:50
You might want to try out my BorderControl (http://www.geocities.com/siwalters_uk/bdrcntrl.html) filter as well to see if you prefer a bit of smearing/fading instead of cropping.
regards
Simon
vBulletin® v3.8.11, Copyright ©2000-2026, vBulletin Solutions Inc.