Quantcast How to Properly Crop the Overscan in VirtualDub [GUIDE] - digitalFAQ Forum
  #1  
05-09-2012, 03:50 PM
kpmedia's Avatar
kpmedia kpmedia is offline
Site Staff | Web Hosting, Photo
 
Join Date: Feb 2004
Posts: 4,221
Thanks: 207
Thanked 346 Times in 327 Posts
As anybody converting VHS tapes to DVDs/Youtube quickly discovers, the video signal contains a lot of junk on the edges of the screen -- noise not seen when it was played on a television. This is actually an intentional "feature" of traditional video signals, as it allowed broadcasters to hide non-video signal functionality which did present itself as noise. Closed caption data, for example.

That concept has been explained in depth here: Errors on the edges of converted VHS tapes?

You want to hide this when making DVDs -- never crop it!

This is referred to as a "mask" in most editing programs. VirtualDub, a popular freeware, doesn't natively contain an obvious mask function, but it is there. You have to leverage the resize filter in conjunction with the crop function, in order to create a mask. It's a simple three-step process:


Step 1: Set the Resolution

You must be logged in to view this content; either login or register for the forum. The attached screen shots, before/after images, photos and graphics are created/posted for the benefit of site members. And you are invited to join our digital media community.


^ After opening your recorded VHS video in VirtualDub, go to the Video > Filters menu, click the Add button, and select the Resize filter. Configure the options to match the input of your source video -- be it 352x480, 704x480, 720x480 for NTSC; or 325x576 or 720x576 for PAL -- and input those numbers into both boxes shown above. Most importantly, be sure to select the proper radio (dot) button options, as shown above. OK when done.


Step 2: Set the Crop

You must be logged in to view this content; either login or register for the forum. The attached screen shots, before/after images, photos and graphics are created/posted for the benefit of site members. And you are invited to join our digital media community.


^ Enter the Cropping function on the Filters page, and alter the X and Y dimensions. Always select in multiples of 2. Otherwise you'll mess up the interlacing.

The X is left and right, and Y is top and bottom. Ideally you hide 8 pixels removed from each side.
  • At 352x resolutions, you don't really want to hide more than 12 on the Y (24 total) or 12 on the X (24 total).
  • At 704/720x resolutions, you don't want to hide more than 12 on the Y (24 total) or 20 on the X (40 total).
  • Hiding more pixels may show black edges on the screen, as you've left the overscan, and are now within the TV image area.
Note: You do NOT have to select the same numbers for each box, as sometimes the picture is shifted badly within the signal. This is where you can not only hide the overscan noise, but fix the image offset at the same time. Also understand that it's the total number that counts when hiding pixels. If you remove only 4 pixels on a Y side, you can remove 20 from the other side, and the picture will re-center itself, with a net overscan hidden of 12 pixels per side.

Guides like this are meant to help you think -- not let you monkey-see/monkey-do!


Example of Proper Overscan Mask

You must be logged in to view this content; either login or register for the forum. The attached screen shots, before/after images, photos and graphics are created/posted for the benefit of site members. And you are invited to join our digital media community.


^ This is an example of a hidden overscan. Notice that there is twice as much hidden on the left/right (X) as there is on the top/bottom (Y). This is a good example of proper overscan removal (masking) for interlaced video.

Nothing looks worse than a video with squiggly junk on all sides, when you're wanting to enjoy it.

It's easy to fix, using this method, prior to encoding and authoring for DVD.



- Did my advice help you? Then become a Premium Member and support this site.
- Please Like Us on Facebook | Follow Us on Twitter

- Need a good web host? Ask me for help! Get the shared, VPS, semi-dedicated, cloud, or reseller you need.
Reply With Quote
The following users thank kpmedia for this useful post: bar72 (10-19-2018), radiated23 (12-08-2017), robjv1 (05-15-2012)
Someday, 12:01 PM
admin's Avatar
Ads / Sponsors
 
Join Date: ∞
Posts: 42
Thanks: ∞
Thanked 42 Times in 42 Posts
  #2  
05-15-2012, 04:29 PM
robjv1 robjv1 is offline
Free Member
 
Join Date: Jun 2009
Posts: 185
Thanks: 12
Thanked 36 Times in 32 Posts
I'm not sure of the significant differences (if there are any) between the two methods, but this is also achievable in VirtualDub using the 'fill' filter if one prefers, although I cannot recall if that is a built in feature or not with a stock copy of VDub. Edit: Yes, it appears to be one of the internal filters.

You would use multiple instances of the 'fill' filter, one for the top, bottom, left and right portions of the screen (if you wish to mask all of them). Similarly to the above method, you have the option of choosing a color to mask the frame. To achieve the effect, you simply adjust the x/y offsets to isolate the area that will be the masked out portion of the frame (you can do this either by adjusting the values in the boxes or clicking and dragging the guides in the actual video frame). So for example, if the left 15 pixels of the frame are going to be masked, you would want just those pixels visible (and nothing else) in the filter window. Repeat for the other parts of the frame you wish to mask.

Also -- I haven't tried it myself but let's say you have a simple VHS to DVD recording on a DVD recorder that you want to mask, but don't wish to re-encode. This person came up with a clever solution using a subtitle.

http://forum.videohelp.com/threads/3...ut-Re-encoding
Reply With Quote
The following users thank robjv1 for this useful post: lordsmurf (05-25-2012)
  #3  
05-25-2012, 11:22 PM
lordsmurf's Avatar
lordsmurf lordsmurf is offline
Site Staff | Video
 
Join Date: Dec 2002
Posts: 7,578
Thanks: 778
Thanked 1,163 Times in 1,036 Posts
I'll have to try that subtitle trick. Very nice!

- Did my advice help you? Then become a Premium Member and support this site.
- Find television shows, cartoons, DVDs and Blu-ray releases at the TVPast forums.
Reply With Quote
  #4  
08-13-2015, 12:53 PM
friendly_jacek friendly_jacek is offline
Free Member
 
Join Date: Aug 2015
Location: USA (NTSC) but have PAL VHS tapes
Posts: 50
Thanks: 26
Thanked 0 Times in 0 Posts
noob question here on the above guide. why would you resize first and crop later. shouldn't it be crop first and resize later?

besides, some other digitalFAQ guide specifically said not to resize, but mask instead. so, which guide is actually right?

thanks!
Reply With Quote
  #5  
08-14-2015, 08:10 AM
lordsmurf's Avatar
lordsmurf lordsmurf is offline
Site Staff | Video
 
Join Date: Dec 2002
Posts: 7,578
Thanks: 778
Thanked 1,163 Times in 1,036 Posts
Quote:
Originally Posted by friendly_jacek View Post
noob question here on the above guide. why would you resize first and crop later. shouldn't it be crop first and resize later?
besides, some other digitalFAQ guide specifically said not to resize, but mask instead. so, which guide is actually right?
thanks!
First off, understand this guide is very accurate.

All video software tends to behave different, when it comes to cropping and masking. Many refer to "cropping" improperly, while others use nonsense terms like "clipping" to describe a mask/crop. ("Clipping" is a specific video and audio jargon, and NOT at all related to crop/mask!)

Avisynth, Adobe Premiere, Final Cut Pro, etc etc -- they're all different in behavior.

And in fact, there's several ways to accomplish masking in VirtualDub!

Technically, this is how masking works:
- first you have to crop a video (remove unwanted pixels)
- then pad it back with a solid color to create a mask (thus restoring the original resolution)

Some software has a "crop/mask/clip" filter/button/whatever. But crop-then-pad is the underlying task that is always taking place. VirtualDub is simply one of the few programs that reveals this fact.

Now, you can do the very manual method, by using the "null" filter, and cropping the footage, following by a second filter (including resize) to pad it back.

But the easiest method is to use only the "resize" filter, and cropping the video. First it crops ("crop" function in VirtualDub, under Video Filters), then it pads ("crop to size" in the Resize filter). This is all done in a single pass.

Make sense?

Perhaps the guide needs another image or two.

Note: You must be very careful with source resolutions with cropping or masking in VirtualDub. For example, full SD PAL is 720x576, while full SD NTSC is 720x480. You need to change accordingly. This was explained in the above quickie guide, but it needs to be emphasized. A bad crop will screw up the video.

- Did my advice help you? Then become a Premium Member and support this site.
- Find television shows, cartoons, DVDs and Blu-ray releases at the TVPast forums.
Reply With Quote
  #6  
08-14-2015, 10:20 AM
friendly_jacek friendly_jacek is offline
Free Member
 
Join Date: Aug 2015
Location: USA (NTSC) but have PAL VHS tapes
Posts: 50
Thanks: 26
Thanked 0 Times in 0 Posts
thanks lordsmurf for your explanation. i trust you but want to understand and not just blindly follow a script that i don't understand.

what is the function of the first resize filter? after all the resolution is not changed (352x480->352x480). is this the same function as the null filter some people use?

are you saying that the crop function in VD is actually doing masking and not removing pixels (as the name implies?)

i'm not so sure, when i used the VD crop function during capture, that resulted in decreased size (and resolution) of the frames.

now, how about capturing cropped (720x568) and then resize using VD filter with 720x576 and one of the letter box options?

i can try it tonight, if that's a better solution than the simple border control filter.

Last edited by friendly_jacek; 08-14-2015 at 10:42 AM.
Reply With Quote
  #7  
08-16-2015, 12:29 PM
lordsmurf's Avatar
lordsmurf lordsmurf is offline
Site Staff | Video
 
Join Date: Dec 2002
Posts: 7,578
Thanks: 778
Thanked 1,163 Times in 1,036 Posts
Never blindly follow anything. That's a wise move on your part. Test, then test again! Verify it does what you need before committing. It's too easy to screw up video, so be diligent.

The "crop" function crops doesn't work without a filter.

You must be logged in to view this content; either login or register for the forum. The attached screen shots, before/after images, photos and graphics are created/posted for the benefit of site members. And you are invited to join our digital media community.


But add a filter, then you can crop.
It crops BEFORE that filter runs, not after. This is important, and why this method works.
Note: You could add a null filter (does nothing), then add yet another filter to pad it (in order to mask it).

You must be logged in to view this content; either login or register for the forum. The attached screen shots, before/after images, photos and graphics are created/posted for the benefit of site members. And you are invited to join our digital media community.


If we add the resize filter, this function acts as a mask:

You must be logged in to view this content; either login or register for the forum. The attached screen shots, before/after images, photos and graphics are created/posted for the benefit of site members. And you are invited to join our digital media community.


The crop>resize does this: (imagine VirtualDub talking to itself) "Okay, cut off pixels. But we can't actually remove any pixels, since the resolution is defined to be the same as the source. We're also not allowed to stretch anything. The only option is to just leave blank (black!) data."

Note: It shows 320x240 because I didn't load a video. I'm not on a video system right now.

And no, never capture interlaced footage as anything other than x576 PAL or x480 NTSC. You cannot capture wrong, then pad it back to fix it. Never try to crop/mask footage in realtime, aside from some special situations (namely the mask ability of ATI MMC, with MPEG-2 capturing, with an ATI AIW Radeon card).



- Did my advice help you? Then become a Premium Member and support this site.
- Find television shows, cartoons, DVDs and Blu-ray releases at the TVPast forums.
Reply With Quote
The following users thank lordsmurf for this useful post: friendly_jacek (08-25-2015)
  #8  
08-21-2015, 04:21 PM
jmac698 jmac698 is offline
Free Member
 
Join Date: Dec 2010
Posts: 387
Thanks: 3
Thanked 69 Times in 52 Posts
Mr. Jacek brought my attention to his project, so upon reviewing his posts, I came across this. Could I just interject to add, that I think this was a problem in terminology or definitions. If I were to see some suggestion to "crop then resize", I would picture say, cropping 480->472, then resizing to 480, implying a (to use a better term?) "rescaling" that is a stretching back to 480, which is a definite no-no.

The key lies in how the "resize" options in this particular program work, with the steps described; they are actually doing a padding in order to resize, not a stretching. In this case I find calliing that a resizing somewhat ambiguous, as I usually think of resizing as being a stretching of pixels. The end effect I would call, masking.

The guide is fine, however I would hesitate to call it a crop/resize or resize crop, rather I would point out that "I'm doing a masking, but in this particular program it can be achieved by specific settings under the resize function".
Reply With Quote
The following users thank jmac698 for this useful post: friendly_jacek (08-25-2015), lordsmurf (08-21-2015)
  #9  
08-21-2015, 04:24 PM
lordsmurf's Avatar
lordsmurf lordsmurf is offline
Site Staff | Video
 
Join Date: Dec 2002
Posts: 7,578
Thanks: 778
Thanked 1,163 Times in 1,036 Posts
"re-scaling" is actually a perfect word to describe what VirtualDub is NOT doing here.

- Did my advice help you? Then become a Premium Member and support this site.
- Find television shows, cartoons, DVDs and Blu-ray releases at the TVPast forums.
Reply With Quote
  #10  
08-25-2015, 10:55 AM
friendly_jacek friendly_jacek is offline
Free Member
 
Join Date: Aug 2015
Location: USA (NTSC) but have PAL VHS tapes
Posts: 50
Thanks: 26
Thanked 0 Times in 0 Posts
Quote:
Originally Posted by jmac698 View Post
The guide is fine, however I would hesitate to call it a crop/resize or resize crop, rather I would point out that "I'm doing a masking, but in this particular program it can be achieved by specific settings under the resize function".
thanks. it was the goofy terminology that got me confused here.
Reply With Quote
  #11  
04-26-2017, 05:19 PM
skycaptain09 skycaptain09 is offline
Premium Member
 
Join Date: Mar 2016
Posts: 4
Thanks: 0
Thanked 1 Time in 1 Post
I know that when cropping, the amount taken off of each side needs to be a multiple of 2. Is the same true when adding borders back onto it?

For example, if I remove 10 pixels from the bottom of the frame to get rid of overscan, and 0 pixels from the top, is it safe to add 5 pixels of border back onto the top and bottom to re-center the video vertically?

I am using AviSynth's Crop and AddBorders to do this, but I would think that the same rules would apply in VDub. AviSynth's AddBorders won't let you add odd numbers of pixels on the left and right, but it allows it on the top and bottom. I just want to make sure I'm not screwing up the interlacing by doing this.
Reply With Quote
  #12  
04-26-2017, 06:34 PM
msgohan msgohan is offline
Free Member
 
Join Date: Feb 2011
Location: Vancouver, Canada
Posts: 888
Thanks: 49
Thanked 196 Times in 171 Posts
You can crop and add vertically by increments of 1 but to maintain the original field order, you must not alter the top of the image by 1. Altering the field order shouldn't cause a problem; you just need to know that you did it so that you can flag any encode correctly.

Horizontal is where you're limited to increments of 2 (both cropping and adding borders). This is because in the 4:2:2 format, chroma is subsampled by a factor of 1/2. 2 luma pixels share 1 chroma sample. Cropping 1 luma pixel would mean you would need to crop 0.5 chroma samples, which is obviously impossible.
Reply With Quote
  #13  
04-27-2017, 04:26 AM
lordsmurf's Avatar
lordsmurf lordsmurf is offline
Site Staff | Video
 
Join Date: Dec 2002
Posts: 7,578
Thanks: 778
Thanked 1,163 Times in 1,036 Posts
Quote:
Originally Posted by skycaptain09 View Post
For example, if I remove 10 pixels from the bottom of the frame to get rid of overscan, and 0 pixels from the top, is it safe to add 5 pixels of border back onto the top and bottom to re-center the video vertically?
6 / 2 = 3 = NO
8 / 2 = 4 = YES!
10 / 2 = 5 = NO
12 / 2 = 6 = YES!
etc

Get it? Both numbers must be even.

Quote:
Originally Posted by msgohan View Post
You can crop and add vertically by increments of 1 but to maintain the original field order, you must not alter the top of the image by 1.
Altering the field order shouldn't cause a problem; you just need to know that you did it so that you can flag any encode correctly.
Horizontal is where you're limited to increments of 2 (both cropping and adding borders). This is because in the 4:2:2 format, chroma
It's entirely about field order. The mess it makes is not worth 1 pixel. Do pairs, and KISS (keep it simple, stupid).

- Did my advice help you? Then become a Premium Member and support this site.
- Find television shows, cartoons, DVDs and Blu-ray releases at the TVPast forums.
Reply With Quote
  #14  
04-27-2017, 10:51 AM
msgohan msgohan is offline
Free Member
 
Join Date: Feb 2011
Location: Vancouver, Canada
Posts: 888
Thanks: 49
Thanked 196 Times in 171 Posts
I agree that it is silly to use odd numbers vertically when padding the video. How would you ever notice it is off-center by 1px? Especially when you're technically shifting the image center down by some pixels by adding black to the top if you only cropped the bottom.

If there was 1 line of garbage at the top, though, I would personally bother to not overcrop... since I know the risks and I want as many video lines intact as possible. Technically you lose about 320 "pixels" worth of VHS video for every line you remove.
Reply With Quote
  #15  
03-28-2018, 10:53 AM
Andrewjameshoward Andrewjameshoward is offline
Free Member
 
Join Date: Mar 2018
Posts: 1
Thanks: 0
Thanked 0 Times in 0 Posts
I'm jumping on to this old thread with a follow up question about masking/Virtualdub/Avisynth. I'm doing this because my question is ABOUT this issue and this seems to be THE site guide which is referred to by other threads. I "get" why masking is preferable to cropping. Suppose though I have a video where I want to mask a lot more on the left than on the right or a lot more on the bottom than on the top, but end up with a product which is "centred". I can see the Avisynth method given would allow me to do this manually. I read that the Virtualdub method will centre itself automatically. Well suppose I don't want it to? Or wish to introduce a deliberate L/R or up/down shift to the whole frame. Can Virtualdub do that?
Reply With Quote
Reply




Similar Threads
Thread Thread Starter Forum Replies Last Post
JVC VCR Interesting Overscan issue Blackout Videography: Cameras, TVs and Players 11 05-16-2011 12:46 PM
Magnavox H2160MW9 overscan ieee488 Capture, Record, Transfer 19 03-16-2010 07:49 AM
Can someone make a Widescreen PSD Overscan? Konfusion Author, Make Menus, Slideshows, Burn 7 06-15-2009 07:25 AM
Properly Clean VHS - use a wet or dry clearning tape? mrwhitethc Capture, Record, Transfer 6 03-09-2008 07:41 AM
How to properly hook up VCR, TBC and DVD recorder ? mrwhitethc Restore, Filter, Improve Quality 7 02-25-2008 11:47 PM

Thread Tools



 
All times are GMT -5. The time now is 06:22 AM  —  vBulletin Copyright Jelsoft Enterprises Ltd