Go Back    Forum > Digital Video > Video Project Help > Edit Video, Audio

Reply
 
LinkBack Thread Tools
  #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,311
Thanked 374 Times in 341 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: http://www.digitalfaq.com/forum/vide...converted.html

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

virtualdub-overscan1.jpg

^ 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

virtualdub-overscan2.jpg

^ 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: archivarious (02-27-2021), Aya_Rei (08-31-2023), bar72 (10-19-2018), dknoll (01-26-2020), hi8caps (04-09-2019), radiated23 (12-08-2017), robjv1 (05-15-2012), Schlockmaster (07-10-2023)
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: 187
Thanked 37 Times in 33 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: 13,503
Thanked 2,448 Times in 2,080 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.
- For sale in the marketplace: TBCs, workflows, capture cards, VCRs
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
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: 13,503
Thanked 2,448 Times in 2,080 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.
- For sale in the marketplace: TBCs, workflows, capture cards, VCRs
Reply With Quote
The following users thank lordsmurf for this useful post: Delta (05-02-2021)
  #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
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: 13,503
Thanked 2,448 Times in 2,080 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.

vdub-crop1.jpg

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:

vdub-crop2.jpg

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.
- For sale in the marketplace: TBCs, workflows, capture cards, VCRs
Reply With Quote
The following users thank lordsmurf for this useful post: Amanjm (12-29-2019), friendly_jacek (08-25-2015), robertzombie (03-24-2020)
  #8  
08-21-2015, 04:21 PM
jmac698 jmac698 is offline
Free Member
 
Join Date: Dec 2010
Posts: 387
Thanked 73 Times in 56 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: 13,503
Thanked 2,448 Times in 2,080 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.
- For sale in the marketplace: TBCs, workflows, capture cards, VCRs
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
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
Free Member
 
Join Date: Mar 2016
Posts: 5
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: 1,323
Thanked 334 Times in 276 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: 13,503
Thanked 2,448 Times in 2,080 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.
- For sale in the marketplace: TBCs, workflows, capture cards, VCRs
Reply With Quote
  #14  
04-27-2017, 10:51 AM
msgohan msgohan is offline
Free Member
 
Join Date: Feb 2011
Location: Vancouver, Canada
Posts: 1,323
Thanked 334 Times in 276 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
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
  #16  
06-23-2020, 11:31 AM
Squash22 Squash22 is offline
Free Member
 
Join Date: Jun 2020
Posts: 6
Thanked 0 Times in 0 Posts
So I followed the guide, the results were great. But my file size went from 16.6 gb to 158 gb! Is this expected? Did I do something wrong?

I did change one thing. Instead of Letterbox/crop to size, I used Letterbox to aspect ratio.
I'm a very much a newb at this, but it was showing a crop down to 320x240 which seemed a great reduction in resolution.
Using the "Letterbox to aspect ratio" it took the resolution up to 720 x 540, so the increase is expected, just not a 9 fold increase.

My intention was to take my 720x480 DV (AVI's) capture from VHS, crop out the overscan lines and then use Handbrake to compress the size down for streaming. Handbrake can take a 16 gb down to 2-3 gb using HEVC compression. But 158 gb is still going to be ridiculous in size even after compression. Is there a better, less space consuming way to crop the overscan? Or again did I do something wrong?

Ok wait, I missed this line:
"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"

I thought VirtualDub was inputting it's own values based on calculation, but I guess I have to put in my own resolutions.

Does maintaining a 100 x 100 relative percentage matter?
Because once you edit the crop, that percentage changes.

Last edited by Squash22; 06-23-2020 at 12:00 PM.
Reply With Quote
  #17  
06-23-2020, 04:17 PM
Squash22 Squash22 is offline
Free Member
 
Join Date: Jun 2020
Posts: 6
Thanked 0 Times in 0 Posts
Ok followed the guide to a tee this time. Kept everything at 720 x 480. Edited 18 pixels off the top (because of some bad tape) and 6 off the bottom for the overscan, saved to AVI and I got a 140 gb file. What is going on?

any help would be greatly appreciated.
Reply With Quote
  #18  
06-24-2020, 10:54 AM
lordsmurf's Avatar
lordsmurf lordsmurf is offline
Site Staff | Video
 
Join Date: Dec 2002
Posts: 13,503
Thanked 2,448 Times in 2,080 Posts
Quote:
Originally Posted by Squash22 View Post
Ok followed the guide to a tee this time. Kept everything at 720 x 480. Edited 18 pixels off the top (because of some bad tape) and 6 off the bottom for the overscan, saved to AVI and I got a 140 gb file. What is going on?

any help would be greatly appreciated.
What codec did you choose?
Video > Compression

- Did my advice help you? Then become a Premium Member and support this site.
- For sale in the marketplace: TBCs, workflows, capture cards, VCRs
Reply With Quote
  #19  
08-03-2020, 07:31 AM
Okiba Okiba is offline
Free Member
 
Join Date: Jul 2019
Posts: 68
Thanked 1 Time in 1 Post
Note for VirtualDub newbies like me:

Filters are only access-able on 'Full Process Mode' (took me couple of tries to understand why it's greyed out). And because it's being processed again, make sure set the Compression and Colorspace to what you used during Capture (in my case, HufYuv and YUV2).

Please correct me if I'm wrong or there's more settings needed to be made in order to keep the original Capture file quality when Reprocessing.

EDIT: By the way. I'm assuming "Always select in multiples of 2" - means 0 is also valid (in case you want to crop 8 pixels from the bottom and none at the top?)
Reply With Quote
  #20  
08-03-2020, 07:41 AM
lordsmurf's Avatar
lordsmurf lordsmurf is offline
Site Staff | Video
 
Join Date: Dec 2002
Posts: 13,503
Thanked 2,448 Times in 2,080 Posts
Quote:
Originally Posted by Okiba View Post
Filters are only access-able on 'Full Process Mode' (took me couple of tries to understand why it's greyed out). And because it's being processed again, make sure set the Compression and Colorspace to what you used during Capture (in my case, HufYuv and YUV2).
Correct.

Quote:
EDIT: By the way. I'm assuming "Always select in multiples of 2" - means 0 is also valid (in case you want to crop 8 pixels from the bottom and none at the top?)
0 is valid, not cropping a side is fine. 0 is a multiple of 2. 2x0=0
good = 0-2-4-6-8-10-etc
bad = 1-3-5-7-9-etc

- Did my advice help you? Then become a Premium Member and support this site.
- For sale in the marketplace: TBCs, workflows, capture cards, VCRs
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 01:08 PM