Learning VirtualDub: The Complete Guide to Capturing, Processing and Encoding Digital Video

By Georgios Diamantopoulos , Sohail Salehi
  • Instant online access to over 7,500+ books and videos
  • Constantly updated with 100+ new titles each month
  • Breadth and depth in over 1,000+ technologies
  1. Introducing VirtualDub

About this book

VirtualDub is one of the most popular video processing applications for Windows. As an open source application, it's free, and is constantly updated and expanded by an active community of developers and experts. VirtualDub is particularly popular for capturing video from analogue sources such as video tape, cleaning up the image and compressing it ready for distribution over the Internet.

This book provides a rapid and easy to use tutorial to the basic features of VirtualDub to get you up and running quickly. It explains how to capture great quality video from various sources, use filters to clean up the captured image and add special effects. The book also shows how to use VirtualDub to cut and paste video to remove or insert sequences, including removing ad breaks or trailers. It goes on to cover the art of effective encoding and compression, so you end up with great quality videos that won't hog your bandwidth forever.

VirtualDub is the fastest and most effective way to capture, process and encode video on your PC. This book gets you started fast, and goes on to give you full control of all the features of this legendary tool.

Publication date:
May 2005
Publisher
Packt
Pages
210
ISBN
9781904811350

 

Chapter 1. Introducing VirtualDub

VirtualDub is an unusual and interesting name for video software. Having used VirtualDub hundreds of times during the writing of this introductory chapter, I’ve come to appreciate how apt the name is. By selecting a video file and then applying a myriad of individual or grouped filters, I quickly see what would happen if I decided to go forward and capture the changes in a new file. Since I preview them and don’t create a new one, I’m looking at a ‘virtual’ file—one being ‘dubbed’ from the source file but with the changes I want. It’s so easy, quick, and wonderful that you can easily forget the long time spent in seeing such previews when you were working with video editing software. Such is the world of VirtualDub.

You may have heard good things about VirtualDub. You probably bought or picked up this book because you’re eager to explore the topic. Or maybe you just bumped into it while browsing books about digital video editing. In either case, this is the right book.

If you’re already dabbling in digital video editing, you may have VirtualDub for no other reason than it was a free download and you had heard about it, but you don’t know how to use it. Hopefully you have a camcorder or a library of old videos and a yearning to try your hand at digital video editing. But you’re not sure where to begin and can use some more knowledge and skills, especially with VirtualDub.

Millions of photographers, videographers, amateurs, and computer users are in the same situation. Many use their computers to retouch images, make slide shows, and even try their hand at non-linear video editing. Others are eager to learn and try.

The constant rollout of new digital hardware and software products is dazzling and exciting, but it can also be intimidating to those who don’t understand the basics or need to develop their skills further. Continued education and skill development are critical to enjoying the editing process and achieving results.

Thousands of software applications and utilities are being developed and rolled out as commercial products, shareware, or freeware. Most are short-lived or used by very few. Rarely does new software gain global acceptance (from casual to power users) and go on to enjoy a full life of its own. VirtualDub is one of those rarities. That in itself is a good reason to explore what it’s all about.

Started only a few years ago, it has emerged since then to global awareness, acceptance, use, and accolades. It has a significant community of users and has inspired or spawned the development of other related software products such as VDubMod and AviSynth. According to the statistics at SourceForge.net there have been over 17 million downloads of VirtualDub or its associated packages for the four and a half year period from mid-2000 through the end of 2004.

VirtualDub and related software products make up the world of VirtualDub and this book will either introduce you to it or help you develop your skills with it.

Don’t expect to stop when you finish reading this book. With ongoing development and expanding usage, there may never be a final product. It’s the kind of software that continues growing and evolving. Use the book to get the background knowledge of the VirtualDub world, develop your skills to become totally comfortable with the software, and from there follow and adopt future developments with ease and excitement. Keep this book in your library for continued reference.

Whatever your main video editing software is and your personal video goals are, VirtualDub will enhance your videos.

What is VirtualDub?

The main web page http://www.virtualdub.org/ defines VirtualDub as follows:

"VirtualDub is a video capture/processing utility for 32-bit Windows platforms (95/98/ME/NT4/2000/XP), licensed under the GNU General Public License (GPL). It lacks the editing power of a general-purpose editor such as Adobe Premiere, but is streamlined for fast linear operations over video. It has batch-processing capabilities for processing large numbers of files and can be extended with third-party video filters. VirtualDub is mainly geared toward processing AVI files, although it can read (not write) MPEG-1 and also handle sets of BMP images."

VirtualDub is an Open Source tool and freely available to all. Various software tools have their place in the VirtualDub world, and we will cover them to some degree in this book. Use those that best fit your needs.

My personal video efforts revolve around the world of Windows XP and its Movie Maker software: a digital video editor that, like VirtualDub, has a significant user base. Movie Maker is similar to VirtualDub in that it focuses on handling AVI files. I can do lots without leaving Movie Maker, but video editors are always looking for that something special in their next project. When I have that yearning, I often turn to the world of VirtualDub to achieve it. It’s been in my toolbox for years and I’m always encouraging others to use it too. I’ve written books and magazine articles on Movie Maker and publish a weekly newsletter. I try to keep my writings focused on Movie Maker but felt honored when asked to write this introductory chapter. VirtualDub is just too good a software package; writing about it is easy.

Besides providing great editing touches, the world of VirtualDub builds bridges and links for those needing to work with files from different environments. In fact, as I’m writing this chapter in one window on my computer, VDubMod is actively working in another, converting a file from a DVD to an AVI file that I can use in Movie Maker.

VirtualDub started with a Windows AVI base for computer-based work, but has been branching out to other file types. CD/DVD/TV systems use a different video format, standardized by MPEG files. MPEG-1 files are the standard for VCDs. MPEG-2 is the standard for SVCDs and DVDs. VirtualDub, with its roots in AVI files, can’t open the MPEG-2 files of a DVD. VdubMod, however, can handle the file type.

You don’t have to wait any longer to see what you can do with VirtualDub. Pictures are worth a thousand words and videos are even more so. Here’s a figure showing a video of a bride and her attendants arriving for the wedding ceremony, with the overlying text being added by the subtitler filter—one of the add-on filters for VirtualDub:

It’s playing in the filter preview window, which lets you quickly scrub through the video (‘scrub through’ means to quickly change the frame location by grabbing and moving that slider under the preview window) to see what the applied effect looks like at any frame of the video.

When you want to add some effect to a clip, and your primary editing software can’t do so, check VirtualDub and its related software. You’ll be pleasantly surprised.

 

What is VirtualDub?


The main web page http://www.virtualdub.org/ defines VirtualDub as follows:

"VirtualDub is a video capture/processing utility for 32-bit Windows platforms (95/98/ME/NT4/2000/XP), licensed under the GNU General Public License (GPL). It lacks the editing power of a general-purpose editor such as Adobe Premiere, but is streamlined for fast linear operations over video. It has batch-processing capabilities for processing large numbers of files and can be extended with third-party video filters. VirtualDub is mainly geared toward processing AVI files, although it can read (not write) MPEG-1 and also handle sets of BMP images."

VirtualDub is an Open Source tool and freely available to all. Various software tools have their place in the VirtualDub world, and we will cover them to some degree in this book. Use those that best fit your needs.

My personal video efforts revolve around the world of Windows XP and its Movie Maker software: a digital video editor that, like VirtualDub, has a significant user base. Movie Maker is similar to VirtualDub in that it focuses on handling AVI files. I can do lots without leaving Movie Maker, but video editors are always looking for that something special in their next project. When I have that yearning, I often turn to the world of VirtualDub to achieve it. It’s been in my toolbox for years and I’m always encouraging others to use it too. I’ve written books and magazine articles on Movie Maker and publish a weekly newsletter. I try to keep my writings focused on Movie Maker but felt honored when asked to write this introductory chapter. VirtualDub is just too good a software package; writing about it is easy.

Besides providing great editing touches, the world of VirtualDub builds bridges and links for those needing to work with files from different environments. In fact, as I’m writing this chapter in one window on my computer, VDubMod is actively working in another, converting a file from a DVD to an AVI file that I can use in Movie Maker.

VirtualDub started with a Windows AVI base for computer-based work, but has been branching out to other file types. CD/DVD/TV systems use a different video format, standardized by MPEG files. MPEG-1 files are the standard for VCDs. MPEG-2 is the standard for SVCDs and DVDs. VirtualDub, with its roots in AVI files, can’t open the MPEG-2 files of a DVD. VdubMod, however, can handle the file type.

You don’t have to wait any longer to see what you can do with VirtualDub. Pictures are worth a thousand words and videos are even more so. Here’s a figure showing a video of a bride and her attendants arriving for the wedding ceremony, with the overlying text being added by the subtitler filter—one of the add-on filters for VirtualDub:

It’s playing in the filter preview window, which lets you quickly scrub through the video (‘scrub through’ means to quickly change the frame location by grabbing and moving that slider under the preview window) to see what the applied effect looks like at any frame of the video.

When you want to add some effect to a clip, and your primary editing software can’t do so, check VirtualDub and its related software. You’ll be pleasantly surprised.

 

The World of VirtualDub


We will assume you’re a novice at digital video editing: you have never used VirtualDub, and know nothing of the world of VirtualDub beyond having heard about or downloaded it. When you’re finished with this book, you’ll know all you need to and more.

VirtualDub supplements your main video editing software. It can be used to do some simple editing, but it’s more about what you can do with the filters that have already been developed and the countless possibilities for new ones. The filters are those included in the software, provided by third parties, or developed by you. The world of VirtualDub is wide open to use, learn from, or contribute to.

A filter is anything that changes a frame or multiple frames of a video. You can apply one or many at the same time. You select the VirtualDub filter(s), choose filter settings, and VirtualDub applies them to the frames of the input file as it makes (renders) a new file. The change might be the addition of text as you saw above, a color change, the addition of a logo in the corner, a rotation by a few degrees, cropping—anything you can think of wanting or needing to do to a video file. Some changes fix problems and others enhance the video by achieving your desired effect.

Software

Avery Lee, who later donated it to the public domain, via the Free Software Foundation ( http://www.fsf.org/), started VirtualDub.

The General Public Licenses are designed to make sure you have the freedom to distribute copies of free software (and charge for this service if you wish), receive source code or get it if you want it, change the software, or use pieces of it in new free programs. Use this freedom to the fullest.

VirtualDub has been adopted whole-heartedly and developed further. Features continue to be added or developed and other related applications are being spun off.

As you read through this book, you’ll learn to use VirtualDub as well as encounter two popular complementary programs:

VDubMod

Think of this as a super version of VirtualDub. If you can’t do something with VirtualDub, try VDubMod. For example, if you open an MPEG-2 file in VirtualDub you’ll get an error message about no video frames being found in it. Try this in VDubMod and it’ll open fine. (This, however, isn’t a guarantee.)

Each computer has many video and audio codecs on it to render or play an audio or video file. They work in the background, but sometimes there are software conflicts that need to be resolved. Dig in and try things—use all your tools and you’ll sort those that work on your system from those that don’t. VDubMod with its expanded set of features will help.

AviSynth

VirtualDub and VDubMod are applications you open as usual, and work with in windows. AviSynth is a bit harder to grasp as it works more behind the scenes. It’s a frame server.

A frame server takes the video frames from a movie file and feeds or serves them to the software that needs them for playback or processing/editing.

You can use AviSynth in two ways. The easiest way is to simply change the extension of a video file to read .avs. Open such a file and the frames will be obtained by AviSynth and passed to the default associated player, such as the Windows Media Player.

The other way is to create a simple text-based script file using Notepad. Enter some commands in the script file, give the script file an .avs extension, and AviSynth will execute the commands as it passes the frames on. A very simple script is a two liner, the first one pointing to the source file, and the second one saying ‘reverse’. When AviSynth serves the frames to the player or editing software, it’ll be serving them in reverse order: an effect sought after by many, but perhaps not included in their main editor.

You can use script commands to do lots of fun and useful things.

Users

There are some great and very established online websites and forums to get the latest in software downloads, follow continued developments, and get support. Here are some:

  • http://forums.virtualdub.org/, started in mid-2002, has over 13,000 members. In addition to the forums in English, there are ones for Spanish, French, and German. The overall administrator is the extremely active ChristianHJW.

  • Donald Graft’s website http://neuron2.net/ provides a source to download plug-ins for VirtualDub and AviSynth.

    Doom9’s forums at http://forum.doom9.org/ include two for AviSynth usage and development, and another for VirtualDub and VDubMod. With the latest tally showing over 50,000 posts on these three forums, you won’t run out of reading material.

  • The official VirtualDub site page at http://www.virtualdub.org /virtualdub_docs provides comprehensive online documentation.

  • The AviSynth site at http://www.avisynth.org/ has information about filter expressions and all aspects of AviSynth, including its official manual.

 

About this Book


VirtualDub and related software are Open Source tools for capturing, processing, and encoding video. Most tools belonging to the VirtualDub world will be covered to some degree in this book. We realize that different people use different software as their primary video editors and encourage readers to use the tools that best fit their purposes.

As the options and complexity for computers and software expand and the user community grows with them, so does the need for good tutorial information. That is the main reason for this book.

The concepts of digital video are easy to grasp. A common theme is to get a digital camcorder, copy the file into your computer, edit it a bit, burn a DVD, and watch it on your TV. It’s only while starting from scratch and going down that path that you realize the many details that need some knowledge, understanding, and skills. As you learn about VirtualDub, you’ll also be learning more about your primary editing software and other utilities in your toolbox.

We’ll help you understand the scope and power of VirtualDub by using impressive and practical examples.

The book will give you a working knowledge of the terminology involved, to understand more easily the online documentation and forum posts. Key terms will be explained clearly as you read them. We don’t assume you already know the world of digital video and the terms it uses.

You will end up with the confidence and background needed to effectively use VirtualDub and its related software, and to experiment on your own or with the community of forum users.

Read this book cover to cover, perhaps many times. Use it for reference as you continue to explore what you can do with your personal videos.

Let’s look at the icons you’ll have for the installed software and then go into some basic information about them, including the downloading and installing.

 

Installation Preview


When you finish this introductory chapter, you’ll have downloaded and installed VirtualDub, VirtualDub Mod, and AviSynth. The figure shows the new icons that will be displayed on your computer desktop.

The topmost icons open Virtual Dub and a test utility included with it (which tests the performance of your hard drive). This checks how well it can handle the demands of digital video work:

The icon on the second row opens VDubMod.

The lowest icon opens an AviSynth folder, not the AviSynth engine. Since it is the behind-the-scenes frame server, you don’t start the engine from an icon. Use the icon to open a folder filled with the scripts you use to give commands to the AviSynth frame server engine. The engine stays under the hood and you call on it as needed by tweaking and opening a script. We’ll look at the engine and some scripts a little later in this chapter.

 

About VirtualDub


VirtualDub is simply a great video editing utility!

VirtualDub’s strength isn’t in putting together the timeline or storyboard of a movie, but rather in providing a simple way to apply one or more filters to alter video, frame-by-frame. Many of the filters or their functionality may be absent in your main editing software, for example, an option to rotate a clip by 4 or 5 degrees for fine-tuning, instead of being limited to the 90-degree increments.

VirtualDub is free to download and use. The download package is small and quick to get, it doesn’t really need an installation (just copy it to your selected folder), and it works extremely fast and well. It’s hard to think of a reason not to have it.

VirtualDub started with the processing of AVI files in the Windows environment, and there lies its strength. As per its documentation, it can read (not write) MPEG-1 and handle sets of BMP still pictures. It can handle both types I and II DV-AVI files. However, it can’t read QuickTime, MPEG-2, Real Media, or Windows Media file types.

VirtualDub ignores filename extensions when determining a file type, so renaming a file extension won’t change its ability to open it.

What VirtualDub Can Do

So if VirtualDub isn’t an editor, what can it do? Despite being focused on pre- and post-processing rather than editing, it has an impressive feature list. It is a useful standalone video tool and a great companion to full-fledged editors because:

  • It can read and write AVI2 (OpenDML) and multi-segment AVI clips.

  • It has integrated MPEG-1 and Motion-JPEG decoders.

  • It lets you remove and replace audio tracks without affecting the video.

  • It includes a wide variety of video filters: blur, sharpen, emboss, smooth, 3x3 convolution, flip, resize, rotate, brightness/contrast levels, deinterlace, and threshold. It also allows users to write their own video filters.

  • It supports bilinear and bicubic resampling, which help avoid blocky resizes and rotates.

  • It can decompress, recompress, and adjust compression of audio and video.

  • It’s great for quickly removing segments of a video, without recompressing the whole sequence.

  • It can adjust frame rate, decimate frames, and perform 3:2 pulldown removal.

  • VirtualDub can preview the effects of changes quickly, complete with audio.

You can take a captured clip, trim the ends, clean up some of the noise, convert it to the proper frame size, and write out a better one. Don’t see a video filter you want? Write your own, with the filter SDK. In addition to these features, version 1.6.0 can use type I or II DV-AVI files as inputs, although it saves output files as type II.

Capturing Video with VirtualDub

For many users, video editing starts with the capture of video from a camcorder or other device to get the file to your computer. VirtualDub provides an option to do it, provided your device is compatible with Video for Windows. However, VirtualDub offers some powerful features that are rare in run-of-the-mill capture applications:

  • Fractional frame rates. Instead of being forced to have a whole number of frames per second, VirtualDub will enable you to select (for example) 29.97 frames per second.

  • Optimized disk access for more consistent hard disk usage.

  • Create AVI2 (OpenDML) files that exceed the AVI 2GB barrier and multiple files to break the FAT32 4GB limit.

  • Integrated volume meter and histogram for input level monitoring.

  • Real-time downsizing, noise reduction, and field swapping.

  • Verbose monitoring, including compression levels, CPU usage, and free disk space.

  • Access hidden video formats which your capture card may support, but not have a setting for, such as 352x480.

  • Keyboard and mouse shortcuts for faster operation. To capture, just hit F6.

  • Clean interface layout: caption, menu bar, information panel, status bar.

The http://www.virtualdub.org/docs_capture page of the website has a number of tips including the following:

"VirtualDub needs a Video for Windows capture driver to capture. Most Firewire (DV) devices do not provide a VFW driver, and thus cannot be used by VirtualDub at all. Also, ATI appears to be shipping their current devices with a WDM (Windows Driver Model) driver only; this can be used indirectly by VirtualDub through a Microsoft wrapper, but it is crippled in functionality and it also appears that the wrapper is buggy. The wrapper will show up as "Microsoft WDM Image Capture (Win32)". If it works for you, great."

You may not need VirtualDub to capture your video, as your main editing software provides such features.

VirtualDub’s Early Development Years

In the days when Avery Lee created VirtualDub, previewing and rendering video was a time-consuming process. Many would say that this is true even with today’s more powerful computers. One of Lee’s goals was to make things happen quickly, and he achieved it. The software was designed for speed, both in its user interface and in the under-the-hood computer processing. You can easily see his results as you use it.

The http://www.virtualdub.org/virtualdub_history page at virtualdub.org gives us some insights into why Avery Lee started Virtual Dub, and some interesting information about it.

Ongoing Development

We’ll use version 1.6.0 for the book. There are other versions available.

The latest experimental version 1.6.3 and its source code are also available for download and use, with information included about known issues.

If you intend to use the source code and do your own development, be sure to check the online information and support forums, including the pages at http://www.virtualdub .org/docs_compiling and http://www.virtualdub.org/filtersdk.

 

About VDubMod


As mentioned earlier, VDubMod is a super-version of VirtualDub. Whereas VirtualDub is the rock foundation and offers the ultimate in stability, much of the development into new areas has gone into VDubMod.

If you can’t do something with VirtualDub, try VDubMod. An example is using an MPEG-2 source file. In VirtualDub you get an error message about there being no video frames in it. Try opening it in VDubMod.

Take the MPEG-2 example a step further. Put a DVD disc into your DVD drive, open a VOB file on it with VDubMod, and rip the video and audio to an AVI file.

This isn’t a guarantee. Each computer has many video and audio codecs on it that are needed to render or play audio and video files. The codecs run in the background. Sometimes the right codec isn’t installed or registered, and at other times software conflicts need to be resolved. If these issues are not effectively resolved, one or more programs could hang or crash.

After you have VirtualDub under your belt, dig into VDubMod and try some things you can’t do in VirtualDub. Use all the tools you have, and you’ll sort the ones that work from those that don’t. A lot of your learning about video editing area is done experientially. Dig in and see how things go.

The introduction to the Help file says:

"VirtualDubMod is a project that was born when suddenly a lot of modifications to the original VirtualDub by Avery Lee sprung up, mainly on the Doom9 forums. Some people got tired of needing several different modified VirtualDub executables, so the idea arose to put them all together into a single application, VirtualDubMod."

The founders were:

  • VirtualDubOGM: Cyrius

  • VirtualDubMPeg2: Pulco-Citron

  • VirtualDubAVS: Belgabor

The Help file provides information about the extended features of VDubMod beyond those of VirtualDub, which include:

  • Preferences: Expanded and include a new audio section.

  • AVI information: Includes the FourCC code and the audio tag.

  • Image formats: Uses the Corona library. This library handles BMP, TARGA, PNG, JPEG, GIF, and PCX image formats on input, and PNG on output. This means that you can open image sequences in one of those formats (BMP and TARGA are still handled by VirtualDub internal routines though), and save to a BMP (using VirtualDub BMP routines), TARGA (using VirtualDub TARGA routines), or PNG (using Corona PNG routines) sequence of images.

  • Streams menu: Uses multiple streams in its standard use (for example when writing AVI files). The Audio menu was replaced by Streams in the main menu. This new menu lets you access features for the Video stream and the list of currently available streams (Stream list).

  • Multiple streams handling: Manage the available streams thanks to Streams | Stream list. The window that appears lists all the additional streams presently opened in VDubMod (those beyond the video stream).

  • Comments and chapters handling: Access specific comments or chapters for a stream using Comments and Chapters. The video comments and chapters are accessible thanks to Video comments and Video chapters in the Streams menu.

  • Previewing and saving: A few things changed in the File menu.

  • Batch mode: The job file will save all information concerning used streams and their options (compression), comments, and chapters, so you can still use the Don’t run this job now; add it to job control so I can run it in batch mode feature. Note that a Skip button has been added in the Job list window. Unlike Abort (which stops jobs processing), it aborts the current job and goes on to the next one. Also your current configuration (input streams selected and their associated comments and chapters) can be saved using Save processing settings, and can be reloaded using Load processing settings.

  • Miscellanea: The Go to last keyframe feature was added in the Edit menu. This feature lets you jump to the nearest previous key frame preceding a certain position (expressed in megabytes) in the file.

We’ll get into downloading and installing VDubMod after taking a summary look at the features of AviSynth.

 

About AviSynth


The documentation included with AviSynth provides this answer to "What is AviSynth?"

AviSynth (AVI SYNTHesizer) is a frame server. This means that it serves up video, frame by frame, to another video application. The core of AviSynth’s power is scripting. Scripts are simple text files that contain a set of commands referencing one or more videos, and the effects you want to run on them.

When you open these script files in VirtualDub or another video application, AviSynth takes action. AviSynth performs the commands in the script, and sends the resulting video—frame by frame—to the video application. The video application has no idea what AviSynth is doing. As far as the application is concerned, it’s opened a standard AVI file with all the filters and other commands already applied.

There are five main reasons why people would want to use AviSynth:

  1. 1. AviSynth can join videos together on the fly, or otherwise combine media from two sources (for example dubbing a new soundtrack).

  2. 2. AviSynth has a lot of support for filtering video, including built-in filters for resizing, cropping, and sharpening.

  3. 3. Many programs do not support video files larger than 2GB. By using AviSynth as the ‘middle-man’ between your video application and the video file, you can break the 2GB barrier.

  4. 4. AviSynth can make just about any type of video look like a normal AVI, including MPEGs and some Quicktime MOVs. Therefore, AviSynth is an easy way to get applications to open unsupported video formats.

  5. 5. AviSynth scripts take up only a small amount of disc space, yet can seem like completely new videos. Because the filtering and joining take place on the fly, there is no need to waste disk space on temporary files or intermediate videos.

As VirtualDub users, our main interest with AviSynth will be applying filters. But the disk space savings are also a handy feature for the heavy VirtualDubber.

Let’s move on to downloading and installing these three software packages from the world of VirtualDub. We’ll do VirtualDub first, followed by VDubMod and AviSynth.

 

Downloading and Installing VirtualDub


The download is a zipped package of size less then a megabyte. Get it from the official website at http://www.virtualdub.org/, or for v1.6.0 from this link at SourceForge.net: http://prdownloads.sourceforge.net/virtualdub/VirtualDub-1.6.0.zip?use_mirror=optusnet. The file name includes the version number, so your downloaded file will be something like VirtualDub-1.6.0.zip.

Install by extracting the zipped files to any folder. An installation process isn’t required. You can use WinZip to extract files from the zipped package, available from http://www.winzip.com/.

Be sure to tell the unzip utility to include folders in the unzip operation as some of the files need to be in their own folder. The following figure shows the files and subfolders you’ll have:

One of the subfolders is named plugins. This contains all filter files. Let’s drill down into it and install a few filters.

Additional Filters

You can download and add additional filters to the 30 included in the basic VirtualDub software. They are available from Donald Graft’s website at http://neuron2.net/.

Load a VirtualDub filter manually by clicking on the Load button that appears in the Add Filters dialog box. You can also have them automatically loaded at the startup of VirtualDub by copying the .vdf files into the plugins subfolder.

A few of the available filters are:

  • Deshaker: Takes the unplanned shakes out of your recorded footage. Download the Deshaker.zip file from http://home.bip.net/gunnart/video/Deshaker.zip and copy the deshaker.vdf filter file to the plugins folder.

  • Subtitler: Overlays text on a video. The text is defined in an SSA script file. You can use different size fonts, colors, and positioning.

  • Delogo: Removes an embedded logo or timestamp by changing the selected area such that the pixels blend into the surrounding ones. The filter is available from http://neuron2.net/delogo132/delogo.html.

  • Warpsharp: Tightens edges in an image by warping the image toward edge boundaries.

Filters have an extension of .vdf (VirtualDub filter). The following figure shows a few of them in the plugins folder:

Copying the filter file from a downloaded zip file to the plugins subfolder is all that is needed to use it. The delogo filter comes with a complete instruction manual,

which we’ve placed in a delogomanual subfolder.

The next figure shows the delogo filter being applied to remove the time stamp from a video that inadvertently included it in the recording. Not only was it in the video, but the monorail in Seattle was running on Pacific Time while the camcorder was on Eastern, so it was three hours off:

It’s unusual but possible for filters to conflict with each other. If you have problems with a particular group of filters, check them individually and change the sequence they are applied in.

VirtualDub Source Code

If you’re curious about the source code and how VirtualDub works, or want to try your hand at developing it further, the source code packages are a download away, in files packed using the bzip2 block-sorting compressor. The links to the latest stable and developmental releases are:

http://prdownloads.sourceforge.net/virtualdub/VirtualDub-1.6.0-src.zip.bz2?download

http://prdownloads.sourceforge.net/virtualdub/VirtualDub-1.6.3-src.zip.bz2?download

You can extract the files from the 1+ MB packages using a utility such as WinRAR, available from http://www.rarlab.com/.

This codebase will build both normal and P4 versions. All tools necessary to build the release executable and help file are included (verinc, mapconv, disasm, and Lina).

You’ll need Microsoft Visual C++ 6.0 Service Pack 5 + Processor Pack or later to build the general release, and Intel C/C++ 6.0 or later to build the P4 version.

And, as with other aspects of VirtualDub, the source code to study how the filters work or develop them further is also available for download.

 

Downloading and Installing VDubMod


Download VDubMod from http://www.free-codecs.com/download/ VirtualDubMod.htm.

The VirtualDubMod _1_5_10_1_All_inclusive.zip file is about twice as large as the VirtualDub download file. It’s bigger because it’s all of what’s in Virtual Dub and more.

Extract it from its zipped file and install as you did VirtualDub, placing the files and subfolders in any folder. An installation process isn’t included or needed. The following figure shows the files and subfolders you’ll have:

 

Downloading and Installing AviSynth


Download AviSynth from http://sourceforge.net/projects/avisynth2/. The downloaded file is a self-extracting/self-installing executable, not a zipped one like VirtualDub.

Open or run it after downloading to do the installation. It’ll offer you a few options, as shown in the following figure:

  • Documentation in any or all of English, German, and French.

  • Associating the AVS script files with Notepad (for editing) and/or Media Player 6.4 (the default viewer). Choose it and change it later if you want to.

  • A destination folder to install the folders and files: by default the C:\Program Files\AviSynth 2.5.

    Choose your options and the auto install takes only a minute:

The installation process installs the following:

The frame server engine: the AviSynth.dll file is placed in the c:\Windows\System32 folder. The following figure shows the DLL and one of the pages of its properties:

Looking at the Company name on the version tab shows who owns it—The Public. You do.

The frame-server engine, the DLL, will automatically go to work when you call on it by opening an AVS file. You’ve seen how it takes the frames from a source video file, processes the filters and actions applied by a script, and feeds the modified frames to an application for viewing or further processing.

The other files: The next figure shows the folders for AviSynth, and the files in its Examples subfolder, a good place to start:

Remember that your job is to call on the frame-server engine by either renaming a video file to give it an .avs extension, or making an AVS script with commands in it.

If you rename a video file, just add .avs after the original extension so you’ll remember what to change it back to. A renamed file might read: video.avi.avs. It might look like a double extension, but Windows will use the last part of the file name to determine which program to open it with.

All six example scripts in the folder are included in the download package. Check the engine and script processing by double-clicking or opening the Authors.avs sample file. The Windows Media Player will open and play the script file as if it were a video.

The following figure shows a snapshot of what you’ll see: scrolling credits with rainbow-colored background and music. This sample is being played with the default version 6.4 Windows Media Player in Windows XP.

Look inside the script and you’ll find there’s no source video file involved. What you’re seeing in the player is completely the result of script commands. Tweak the script and put your own text in it:

Check each of the sample scripts in the AviSynth subfolder by running them one at a time. Check the contents of the scripts by opening them with Notepad, and watch what plays in Windows Media Player. None of them uses a video source file.

Your working scripts don’t need to go into the example folder. Store them in whatever folder(s) work best for you. Whenever you open a script, it will automatically call on the AviSynth DLL engine, which will feed the frames to your default player, or the video software you open the script in.

Filters

As with VirtualDub, there are filters you can use in your AviSynth scripts. See http://www.avisynth.org/.

 

Desktop Icons and Your Default Player


You have installed the three software packages. There are just a couple things to do before finishing this chapter. Put icons on your desktop, and re-associate the AVS scripts to open with your preferred video player.

In your file manager, go to the executable files for VirtualDub, the AuxSetup one in the VirtualDub folder (the utility to test your hard drive), and VDubMod. Right-click on each of the executables and choose Send To | Desktop (create shortcut). You’ll have icons on your desktop.

The AuxSetup hard drive test utility with VDubMod is the same one included with VirtualDub. There’s no need to have two icons for the same utility on your desktop, so skip that one.

Windows XP has two versions of the Windows Media Player in the c:\Program Files\Windows Media Player folder: the latest one named wmplayer.exe, and a version 6.4 player named mplayer2.exe. If opening an AVS script file results in the version 6.4 player opening, and you prefer WMP9 or 10 (or another player), right-click on an AVS script in your browser, select Open With | Choose the program and check the option to always open files of that type with it.

 

Summary


You’ve seen a few samples of things you can do with VirtualDub, VDubMod, and AviSynth. You’ve installed the software, and you’re ready to explore them further.

You may have noticed that some things were not mentioned in this introduction, such as the aviproxy subfolder of VirtualDub and its contents. These will be explained in a later chapter. Here we introduced you to the basics.

The rest of the book will help you use VirtualDub to implement your creative ideas with your video footage, as you explore the world of VirtualDub experientially.

The world of VirtualDub is forever spinning and you’re in it, so hold on and enjoy the ride. Things can only get better.

About the Authors

  • Georgios Diamantopoulos

    Georgios Diamantopoulos was born and raised in Greece, Corinth in February, 1984. His scientific incline towards computers was evident in his teenage years and he pursued his dreams by moving to Birmingham, UK to study Computer Systems Engineering in 2001. Early on in his course he expressed further interest in video editing and compression. Georgios graduated in July 2004 with an Honours degree from the University of Birmingham, where he is currently researching in the field of video compression towards a PhD degree. He has been involved with various extracurricular activities such as writing documentation for various video editing tasks and developing a video quality assessment utility after the name of Video Quality Studio.

    Browse publications by this author
  • Sohail Salehi

    Sohail Salehi is a veteran developer who recently decided to become a data scientist. He believes when you look at a programming challenge from a data scientist perspective, things started to change slightly and what used to be the ultimate solution, somehow morphs into a stepping stone for what really matters--data.

    He won't lay down some tests and codes as soon as a programming challenge is handed to him, rather he has started to think WHY do we need to gather data, WHAT potential value is hidden inside this data and HOW to convert this potential into value that will make business thrive.

    Although he has written a couple of other programming books before, The Sherlock Project is his first attempt to look at the programming challenge from a different perspective. This story is about discovering hidden values inside data and it is the project that he discusses in this book, Angular Services. In the past decade, he worked on some interesting projects with teams of bright developers. But challenges such as handling the traffic for a national newspaper website (NZ Herald) or creating a new game for Lotto (Lotto - 2nd Chance) are not attractive to him anymore. After he got his first certificate in Machine Learning from University of Washington, he decided to combine his development skills with new concepts that he is discovering in his new professional life and provide creative solutions for daily data-related challenges.

    Technical concepts are not his only passion. He is an avid traveler and an adventurous surfer. Currently he lives in Bali, where the big waves are roaring most of the year, and he benefits from the rich Balinese culture and stunning tropical nature, which brings out the best of himself.

    Browse publications by this author
Book Title
Unlock this full book FREE 10 day trial
Start Free Trial