PapaJohn's Newsletter #16 - Movie Maker 2 and Photo Story 2 - August 28, 2004

About: This is a Primer on Using Virtual Dub and Nan Dub with Movie Maker.... and it includes the usual mini-tutorial.

In this newsletter, I'll do a couple basic exercises with Virtual Dub:
 checking a video file for errors before beginning
 adding a logo to the lower right corner of a video
What's NanDub? It's the same as VirtualDub, but a different software app that you need if you have files encoded with the XVID codec.... what VirtualDub does with AVI files, Nan Dub does with XVID files. I won't go any further than that with it.... OK, maybe one step.... a link to download NanDub - from the Doom website at
Before getting into it, here's a few notes about some things going on...

The new Setup > MM2.1 page is up to date with issues I've seen posted about how it's working in SP2. As you would expect, it seems to resolve some issues and others have new problems with it.  And I see a lot of people sitting on the fence waiting to see the fallout from the early adopters.... and the early users are reporting mostly postive experiences.
I've been having fun checking out the Creative Zen Portable Media Center, and started a blog about it on Lockergnome... another blog there after the one about my sub-minimalist testing of MM2.1 with my old Dell laptop. The blog about the Zen includes links to a number of videos I've put together to show the viewing experience on it.
One of the demo videos uses WMV-HD files from the dual disc High Definition disc sets... if you check only one of the sample videos on the blog, make it that one.
Creative Zen Portable Media Center
The Zen with a 20 GB hard drive can hold well over 100 hours of my Movie Maker productions.... it doesn't look like I can fill it up. As you copy video files to it, WMP10 re-renders the videos if needed to align them with the specs for the Zen and provide smoothl playing videos on it.
....on to the topic of the week

About: VirtualDub
From the opening paragraph of it's website, VirtualDub is a video capture/processing utility. 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.

The other day I made a 35 second clip of a seagull from some camcorder footage at Saugatuck... it's the new one on the Do Amazing Things > Part I > Getting Started page. Here's a link to the page:
Click on the picture of the seagull to view the video clip. It was made in Movie Maker and saved as a 640x480 video.
In the newsletter tutorial, I'll make a story from that video. The video is 640x480.... let's do the story at 800x600.

Mini-Tutorial: Virtual Dub
This tutorial is relatively straight forward. All I'm doing is making an introductory clip to be used as the lead-in to a movie...
Steps to using it - assuming you are just prepping short clips to be used in MM2:
1 - Open it - there will pretty much be just a blank workspace with a pull down menu and VCR controls at the bottom.
Virtual Dub - Main Working Window
Virtual Dub - Main Menu
These simplistic looking opening windows are probably the most intimidating.... what next?
2 - File > Open Video File - if you try to open a type 1 DV-AVI file, you'll get an error message ".... Virtual Dub currently cannot extract the audio. Only the video stream will be available." So, if you want the audio too, convert a type 1 file into a type 2 first.
Use Movie Maker 1, or...... to convert the type I DV-AVI file into type II. Once you have a type II DV-AVI file and you open it in Virtual Dub (File > Open video file....), you'll see something like this. The left window is the source file and the right one a preview of the output file.
Virtual Dub - Video File Opened
File Opened
3 - From the main menu, use Video > Scan video stream for errors - check the file
Scan Video File for Errors 
Scan File for Errors
I just scanned this one, with almost 8,000 frames... it took about 15 seconds to go through it and reported no bad frames and none good but undecodable... so my file is in good shape to work with.
4 - Video > Filters > click the Add button - this is where you get to pick all the neat things you want to do to the video clip.
Check the list of options. They include 'deinterlace', 'levels', 'resize' and rotate2 (any angle). Note the cropping option. Select any of them and a note at the bottom of the window will summarize what the filter will do. When I select 'logo', it says it'll overlay an image over the video.
 Select a Filter
Apply Filter
You can select a number of filters and apply them all at once.
For a logo, it'll want a BMP or a TGA file.... the one I picked was a JPG so I used IrfanView to convert it to a BMP. There are some tricky options like alpha blending, but I'll do an easy one, just pick an image, select the BR (bottom right) justification (position), move it left by 10 pixels and up by 10 pixels, and Show a preview (same button as the Hide preview one in the image below - it toggles between Show and Hide).
Select Logo and Position It
Select Logo
So I'm telling VirtualDub to add my logo to the postion on the video as shown. Say OK a couple times.
5 - File > Preview filtered... to play it and see the original in the left monitor and the output file in the right one. Here's what I'm seeing as it adds my logo to each frame.
 Logo Added - Preview 
6 - Video > Compression - you get to pick a codec. I usually use Cinepak at 100% quality.  My notes tell me to force a keyframe every 30 frames.... but that's probably overkill now that I know Movie Maker uses keyframes every 3 to 6 seconds, which would be between 90 and 180 frames.
Select Comprssion and Settings
Select Compression
In the future I'll probably go with the Microsoft Windows Media Video 9 option... as I'm getting to know more about it. Yes, you can use the Media 9 compressor to compress an AVI file!!!!
7 - Use Video > Select Range... if you want to just apply the effect to some of the frames instead of all of them.... I'll apply the logo to the full video, all 7,882 frames of this file.
Frames to Process
Select Range
8 - File > Save as AVI... to do the rendering.> warnings about quality level being high and using an outdated compressor - can be ignored if it's just a stepping stone to a clip being used in MM2.
But maybe it's suggesting I switch to the Media 9 codec for the compression.
It took about 4 minutes for the logo to get applied to the complete video... it showed the input at the left and the output at the right as it went along, and provided this status window.
Status of Rendering
In 4 minutes I got a 1.8 GB uncompressed file.... kind of big considering the source AVI file was 14 MB. But it looked and sounded great. Usually these files are just stepping stones to something else, so I use my tried and true options. As big a file as it is... I'm only going to discard it anyway.
Here's the new file opened in VirtualDub... it's now the input at the left, with the logo added.... I'm ready to do something else to it from the list of available filters.
New File Used as Input
Logo Applied


Virtual Dub is a great utility that complements the work you do with Movie Maker. It's brother NanDub is the same.


And for the programmers out there... here's an extract from the VirtualDub website:

Don't see a video filter you want? Write your own, with the filter SDK. VirtualDub has the capability to load third-party DLLs that include their own video filters.  The filters that are built into VirtualDub use the same interface that is exported to DLLs, so you can write filters similar to or better than the included ones.  You can sample some of these at the third-party filters page; these range from corrective filters, such as noise reducers, to synthesis filters, such as the subtitler.  The basic interface is simple to work with: VirtualDub gives you a 32-bit ARGB bitmap to modify.


Have a great week!!!