Using Video Game Footage - Part 3



Video Cleanup

This is the interesting part of the article and the reason this article exists. To summarize what you are about to read: first you upsample the video to 16 times its original size, apply filters to clean it, then downsample it to only 4 times its original size, use this to make the video with, and once done, downsample it yet again back to its original resolution. But, as many people know, it is the details where everything matters. Compared to the previous section, this will be a much smaller read, since we have already covered a lot of diverse ways to make the “original” files. This step will simply concentrate on cleaning those files, and honestly does not care where they came from.

This is section will also be the most subjective, where personal taste and aesthetics will come into play very often. For many of the steps I will provide a series of choices and options, explaining the benefits of each, but in the end you will have to choose which method is used. In video quality there is no hard and fast guaranteed method, and each video must be evaluated individually.

The primary reason we are upping the resolution severely then dropping it down in stages, is so that most errors in clean up will be dissolved away. Most clean up filters tend to have side effects, and will tend to overdo some of the footage. Every time we reduce the image, we sharpen it up, and hide a lot of the mistakes made. The same concept goes into anti-aliasing with graphics, and that is basically what we are doing. Anti-aliasing works best when done is multiples of four, since it is easier to average 4 pixels into one than 1 and a half pixels.


I stumbled across VirtualDub a while ago when a friend of mine tried pointing me to a cheap (free) video editor. VirtualDub is not a non-linear editor in the same vein as Adobe Premiere or Media Studio. It is a linear editor, and works best when used as pre- or post- editing. Everything in VirtualDub is clip-centric. You apply filters and effects to a single clip, you append another clip onto the current clip. It supports a scripting engine which although the author laments it, is rather easy to use. I find that VirtualDub compliments a non-linear editing package well, providing pre-production on clips before they are used, and post-processing on the video once done. VirtualDub supports OpenDML which makes working with huge multi-gigabyte files easier.

VirtualDub is open source, and covered under the GPL license. It is also rather popular with the videophiles and programmers on the Internet, and there is a large community of filters for VirtualDub. Lucky for us most of these filters are used to clean or enhance footage. The ones I am suggesting to use is the Smart Smoother 1.1, the Resize (or Smart Resize), and the Blur filter, though I highly suggest downloading many of the filters and experimenting with the results. If you are not familier with how to handle interlaced video images and the “original” clips are interlaced, you might want to consider applying the Smart DeInterlacer filter to the beginning of the filters list so you won’t have to deal with interlacing issues later.

The basic steps in cleaning the video are to start VirtualDub and open the first clip. Then go to Video -> Compression and choose your preferred compression target. I suggest HuffYUV, though any lossless CODEC will do. You can, as a minor size saving issue, choose No Audio under the audio menu. You should only do this if you do not plan on using any of the original audio, or if it is unavailable. Then you apply the filters by going to Video -> Filters and begin adding them in order. Filters are appied in a top down format, so you want to have them in this order: DeInterlace (optional), Resize to the 16x resolution, all of the clean up filters, resize to 4x the resolution. Since all the filters are applied in order, you don’t have to worry about making temporary files to apply multiple filters.

Some filters do not have a preview option. There is a couple ways to get around this. The easiest is to place a resize filter right under it, and set the resize to its current size, and preview with it. Another is to go all the way to the base window, and advance to a frame. A preview of that frame should appear on the right half.

When done with all the filters, choose “Save as AVI” from the file menu, and tell it where you want to save the “baseline” file you have just defined. If you are going to be doing a lot of files, you might want to consider adding the operation to the job list and defining all of your AVI files. Then when you are all done defining the filters for the files, and adding to them to the job list, run the list, and have the program work on it overnight. Though depending on the complexity of the filters and the power of your computer, it might take more than a day.

Part 3 continued :  Framerate and Scaling