Tutorial: Screencapping with VirtualDub

Feb 16, 2019 21:30

Screencapping with VirtualDub

I thought I would write this guide since this program is little understood as to how it can be utilized  for capping. At the current time there is no functionality in VirtualDub for autosaving multiple image captures to a directory, so in this tutorial I will demonstate how to use this software in conjunction  with Hypersnap-DX to cap a whole movie from a DVD. There is also a tutorial for taking a single capture and one for auto-capping.
Why use VirtualDub over other software?

The process is much more invovled, but with Vdub you are capping frames served directly from the source file when normally with most media and DVD players you would be capturing the overlay, which on some computers and with some software programs presents difficulties in doing this accurately. The difference can be seen here. If you are having quality issues with PowerDVD or any other software it might be worth your while checking this method out. There are quite a few other advantages of this program over others, including:

1. You can key forward or backward frame by frame by simply using the arrow keys on your keyboard. And, using in conjunction with Hypersnap-DX you can get the capping process down to a "one-hand" process whilst you use the other hand to do other things.

2. VirtualDubMod and VirtualDub-MPEG2 support DVD files - so with a couple of adjustments you can get caps from your DVD's.

3. You can resize your video to any size you desire with little loss in quality.

4. If your video is too dark (as many tv shows are) or there are other problems with the picture, there are many filters available to adjust the picture quality prior to capping.

5. The program is very quick loading. If you're ownly interested in obtaining one or two caps from an avi file it is much quicker than waiting for a media player to open.

6. Navigation between scenes and individual frames is very smooth and easy.

VirtualDub is freeware. Unfortunately however, Hypersnap is not - but there is a two week free trial period after which you have to pay US $35 for a license. There is most probably a freeware program somewhere that can also do the job but I've had no such luck in finding a good one. Hypersnap is a good all round professional capture program capable of doing many types of captures and you can even make favicons with it. In my opinion, it is well worth the money. If someone finds a freeware program let me know so I can update, adding a link to it.

I must stress though, this program picks up more detail than PDVD and other programs that use overlays. It is therefore, not suitable if you have a DVD with a lot of noise in the background. I have a couple of Australian produced DVD's in my collection and these are not suitable for this software since the caps come out too grainy. However, there are filters available in the program that can offset this, although some experimentation is required. Many old films or cheaply produced films will not be suitable. Nonetheless, you can get excellent results with quality DVD's and HDTV files. This method is especially very well suited to avi files with excellent results.

This guide is divided into three parts:

1. Taking a single capture using VirtualDubMod

2. Taking multiple captures using VirtualDub and Hypersnap - how to cap DVD's.

3. Autocapping



1. Taking a single capture with VirtualDub -MPEG2   - Revised!

Download and install VirtulDub-MPEG2. You may also use VirtualDubMod but it doesn't give the option for saving in JPEG format.

If you want to cap a DVD you'll need to first extract the VOB files you need from your DVD. You can find Smartripper and other suitable programs on this site and instructions for the former can be found here. It's best to extract and cap the individual chapters one at a time - navigation between scenes and frames becomes easier, the fewer frames there are loaded in Vdub.

Note: Steps 3 and 4 should be skipped if you do not wish to resize.

1. Go to file -> Open Video file (Ctrl-O). Note: If you have extracted from a DVD, your files will show up with extension  ".vob"

Your file will look something like this:



2. Using your mouse to move the Trackbar and the arrow keys on your keyboard, navigate to the exact frame you want to cap .If you hold down the shift key while pressing the right arrow key at the same time you can fast-forward through the video. Holding down the Alt key instead of Shift will take you through at a slightly slower pace. You can also use the key frame buttons on the toolbar. With some avi files, moving backwards between frames is a little bit slow - you can make the process smoother by decompressing the file, but you will need a very large amount (several Gb for each few min of video depending on the resolution of the source file) of disk space for this.

3. You can correct Aspect Ratio or make your caps larger by adding a resize filter. Go to 'video'->'filters'->'add'. The Add filter box looks like this:



scroll down and select 'resize'. A new box pops up and here you can set the new dimensions:



Use the formula: new width= new height x AR. AR=16/9 for widescreen and 4/3 for full screen. Some dimensions you might want to try are:

Widescreen 16:9 :- 1600x900, 1024x576 (PAL), 800x450, 854x480(NTSC).

Full screen 4:3 :- 1024x768, 768x576(PAL), 600x450, 400x300.

Choose any of the 'Precise bicubic' settings or Lanczos

If you are leaving the  height as it is and only increasing the width, then you can choose 'Precise Bilinear'.

Notes:

#1: you can also edit the picture quality here by adding one or more of the filters listed. A good one to try is the "levels" filter. The "deinterlace filter" is also very useful and may often be needed if they're are scanlines or just to improve on poor transfer.

#2:  An easier method of correcting aspect ratio is to simply right click on your output pane and select either 4:3 or widescreen 16:9 from the middle column. You can resize here too if you wish by selecting a value from the left hand column but your options are more limited.

4. If your enlarged Output Pane extends beyond your computer screen then swap the input and output windows around by going to 'options' -> 'swap input/output panes'.



5. click on the 'select scene start' button,
then move one frame forward using the right arrow key on your keyboard. Click on the 'select scene end' button,
.

6. On the file menu select 'save image sequence'.

A new window will open up and here you can name your image in the 'Filename prefix' box and select the file type and the directory to which it will be saved. The formats you have to choose from when saving are JPEG, bmp and targa. The default JPEG quality setting of 95  gives good quality. You can use 100 if you want - the files are not too big. Each time you take a new capture you must change the filename prefix, otherwise the program will overwrite the last file.



7. Click on 'OK'. A Box will very quickly flash up and disappear again. Virtdub has saved your frame and you can now go and look for your image in the directory you selected above.

Other tutorials:

2. Taking multiple captures using VirtualDub and Hypersnap - how to cap DVD's.

3. Autocapping

12 tips for high quality screencaps

2. Taking Multiple captures with VirtualDub and Hypersnap

I'm going to write these instructions as they apply to capping DVD's. If you're only interested in capping an avi file you'll still find this tutorial useful but you wont need to resize (unless you really want to - in which case you should find it particularly useful). I believe there are other file types  - asf and wmv and mpeg that can also be opened.

Important! There are many different versions of Virtualdub. They don't all have the same functionality and some won't handle DVD files - so please download the version I have linked to below.

Firstly, download and install Virtual Dub MPEG2 or VirtulDubMod and Hypersnap-DX6. You'll need to first extract the VOB files you need from your DVD. You can find Smartripper and other suitable programs on this site and instructions for the former can be found here. It's best to extract and cap the individual chapters one at a time - navigation between scenes and frames becomes easier, the smaller the file size as there are fewer frames loaded in Vdub. If you are capping an avi file it's easier if you decompress a few minutes worth at a time and then reload this to cap. You will skip over fewer frames doing it this way. It also helps having a wide monitor.

This next section has been divided into three parts:

1. Setting up VirtualDub MPEG2
2. Setting up Hypersnap
3. Using the two programs together to take multiple screen captures.

Part 1 - Setting up Virtual-Dub

Go to 'File' -> 'open video file' and navigate to the vob file you just extracted. Click on this and a little box will pop up saying that it is parsing the file - this should only take a couple of minutes depending on your computer resources. The file will look something like this when the process is finished:



You are now looking at the first frame of the  source file which has dimensions 720x576 which is the PAL DV standard. As you can see the picture is distorted - we are now going to correct this but you need to know whether your DVD is widescreen or full screen. If you are uncertain you can find out by clicking on 'file'->'file information' and on the second line you will see the aspect ratio.

Resizing

To resize to the correct AR, you can either right click on the display and select the appropriate setting (16:9 for widescreen or 4:3 for full screen) under Aspect Ratio in the middle column or you can use the resize filter under filters in the video menu.

Right click menu:



Using the resize filter you can resize the image in the output pane (right hand pane) to any dimension you desire.

First, to see what we are doing, we need to swap the input and output windows around by going to 'options' -> 'swap input/output panes'. Make sure this is checked as shown:



Go to 'video'->'filters'->'add'. The Add filter box looks like this:



scroll down and select 'resize'. A new box will appear and you can manually enter the dimensions you desire depending on what you need the caps for.



You must now do a little bit of math to keep the aspect ratio. You can use the formula: new width= new height x AR. AR=16/9 for widescreen and 4/3 for full screen. Some dimensions you might want to try are:

Widescreen 16:9 :- 1600x900, 1024x576 (PAL), 800x450, 854x480(NTSC).

Full screen 4:3 :- 1024x768, 768x576(PAL), 600x450, 400x300.

For filter mode choose either Lanczos3 or one of the precise bicubic settings. Experiment here and decide which you think is best. I prefer Lanczos.

A couple of notes:

1. I have taken some caps and miscalculated the correct width by as little as 15 pixels and all I can say is some of these are riddled with jaggies and look dreadful because the aspect ratio is out. So it is real important that you get this part right.

2. Resolution is limited to the size of the source file (typically 720x576 or 720x480 for DVD's). You will not gain anything in terms of definition or sharpness by making the picture 1600x900 for example. -  all you are doing is stretching the picture which will give a file big in Kb's. Unless you are making wallpapers or large graphics, for most purposes a size at or very near the source height is a good choice.

3. If the DVD transfer is poor, taking the size down will help to improve the look of your screencaps. Film grain and general scratchiness is more noticeable at higher resolutions.

Deinterlacing

more than occasionally, depending on the encoding of the DVD you will encounter scanline artifacts in your video. Every DVD is different. Sometimes these will not be visible at all. Sometimes these will not be immediately apparent but the image will still benefit from the filter. Other times you will be able to weave between frames, capturing the clear ones. Sometimes the scanlines will be right throughout the video and you will need to use the deinterlacing filter to get rid of them.  The deintlacing filter can be found in the list of filters (video->filters->add). Here you have a number of options.  I prefer the "drop fields" option since "blend fields together" tends to blur in areas where there is motion and you lose some detail. It also has a tendency to darken the picture slightly.

It is good practice to keep the deinterlace filter right at the very top of the list of filters. You can do this by clicking on the 'move up' button. The resize filter needs to be added after it, if you choose "drop fields".

There are other filters in the list above that can be used to enhance picture quality. A useful one is the levels filter





Setting up Hypersnap

This program adds a little camera icon to your taskbar after launching and is free to go using the default settings with a couple of changes needed to adapt it to taking multiple caps.

Firstly go to 'Capture' and then click on 'capture settings' right at the very bottom.

Select the 'Capture' tab. And set it up as such:

I have highlighted the important ones



next, click on the 'Quick Save' tab.

make sure 'Automatically save each capture to file' and 'Increment file name' are selected



Next to the file path, click on "Change". The "save as" box pops up and here, right at the very top, you can select the folder to where you want your caps to be saved.



Select the file type you would like your caps saved as. You have a few choices here. If you go with JPEG, then beneath select the sub format JFIF 4:4:4 (no chroma subsampling) and save at  a quality of %100. I tested the quality at %95 and there were blocking artifacts present in the image. The file size at Q=100 is not too big, typically around 100-130Kb for a 768x576 image.

Next,  to configure hotkeys go to 'Options' on the main menu and select 'configure hot keys..'



The functions we are most interested in are 'Capture Window' and 'Repeat Last Capture'.  I've set up the zero key on the numeric keypad  for 'Repeat last capture' because it is right next to the arrow keys and we will be using this key to take all but the very first capture.

Using the two programs together to take captures

1. In Vdub move the trackbar with your mouse to navigate to the scene you want. Clicking on the arrow buttons with the little yellow keys will move you between key frames (roughly 16 frames at a time)  Use the arrow keys on your keyboard to move forward or back one frame at a time to the picture you want. Holding down the Alt or shift key at the same time as the arrow key will allow you to fastforward or backtrack through the video.

2. Launch Hypersnap and then minimize it to your task bar.

3. To take a capture, hit the decimal key (capture frame) on the numerical key pad. A flashing rectangle will appear. Now position the mouse cursor over your frame  and hit enter to take the capture.

4. We don't have to go through this last step again - the next capture you take - just navigate to the new position and then hit the zero key (repeat last capture) and this will do a repeat of the first capture with the new frame in place. Continue taking caps with this key.

If you wish to change the size of the frame (as outlined above) then you will need to repeat step 3 with the new size frame.

The files will be saved to the folder that you selected under the quick save tab and you can view them in Hypersnap by clicking on each individual tab.

Removing Black Horizontal Bars

Instead of doing a 'window capture' of the frame do a 'region capture'.

Hold down keys  Control + Shift + R

A large Cross hair will appear. Position this in the upper left hand corner of the frame below the black bar. Click the left mouse button and drag out the rectangle all the way down to the bottom right hand side of the picture frame to where the black bar begins. Click again or hit enter to finish the capture.

For subsequent captures, just hit the repeat capture key as in (4) above.

3. Autocapping

1. Download and install VirtualDubMod or VirtualDub-MPEG2. Both of these can used for capping DVD's. (For instuctions for DVD's see tutorial 2 linked at the bottom of this page)

2. Press Ctrl+O to open your video.

3. Using the trackbar and arrow keys, navigate to the start of the scene you want to cap and click on the 'select scene start' button,
. Write down the frame number.

4. Navigate to the end of the scene and click on the 'select scene end' button,
. Again, make a note of the frame number.

5. Calculate the number of frames in the scene by subracting the frame number in 3 from the frame number in 4.

6. Go to 'Video' -> and then click on 'Frame Rate'.



If you have a lot of frames in your scene it isn't really practical to save all of them and you will want the program to save say every 4th or 5th frame. Under 'Frame rate conversion' in the middle box check 'Decimate by' and enter a value here. For example, if you have a 4 minute scene with approx 5000 frames you might want to decimate by 5 and this wil leave you with approx 1000 caps with which you will then have to go through to weed out all of the bad and blurry frames. If you consider this too much work, then maybe 10 is a better value to use - that way you only have to weed through about 500 instead - but, be aware also that you will miss 9 out of every 10 frames. The figures become much more daunting for a whole movie or television episode, the latter having about 65,000 frames (depending upon the frame rate) total.

If you only have a very small scene with a limited number of frames then you can select 'process all frames'.

7. On the file menu select 'save image sequence'.



7. Select the directory to which you would like Vdub to save your images and then select the file format - either BMP, Targa or JPEG. The default JPEG quality setting of 95  gives good quality. You can use 100 if you want - the files are not too big. Choose a smaller value if you are making an animation and need to keep the file size down.

You can name the files here too. Just enter your movie or scene name in the 'Filename prefix' Box



8. Click OK. VirtualDub will start to save your frames and a status box will pop up showing the progress. When this disappears you can go look for the images in the folder you nominated above. You will need to look at them in a photo browser or manager so that you can weed out all the bad and blurry frames.

Other Tutorials:

1. Taking a single capture using VirtualDubMod

2. Taking multiple captures using VirtualDub and Hypersnap - how to cap DVD's.

12 tips for high quality screencaps

info: how to, art: video tutorial, fandom: screencaps

Previous post Next post
Up