Log in

View Full Version : Cropping & Centering Video


EpheMeroN
17th January 2006, 20:18
When I capture a certain tv station, there's a big black bar on the right side of the video, and a very small black bar on the left side.

How can I crop this out, then center the video, all while preserving proper aspect ratio? I want the end result to be a compliant dvd resolution.

Sample #1
http://img398.imageshack.us/img398/5958/untitled28or.th.png (http://img398.imageshack.us/my.php?image=untitled28or.png)

Sample #2
http://img487.imageshack.us/img487/2198/untitled8et.th.png (http://img487.imageshack.us/my.php?image=untitled8et.png)

Mug Funky
18th January 2006, 11:20
you might find (give or take) that adding the width of the bars together gives 16 pixels. trying it myself in photoshop (all i had open at the time) showed it was closer to 20 pixels, so i guess your capture card must sample a larger part of frame?

what you'll want to do is crop off until you get to the picture, then resize to 704, the add 8 to either side.

i think that's right :)

so you might want to try:

lanczosresize(704,last.height,4,0,last.width-20,last.height).addborders(8,0,8,0)

EpheMeroN
21st January 2006, 01:12
I don't know why the images are 720x575 because the video is 720x480. All I did was copy source frame while in VDubMod, and save as png in Paint.

My source is pure NTSC interlaced, will your resizing work ok? Or do I need to do something else because it's interlaced?

ChiDragon
25th January 2006, 09:21
Late here, but the script leaves the height as is (last.height) so you're fine. You only have to worry about vertically resizing interlaced material, not horizontally.