Smart Bob Filter for VirtualDub

This filter acts the same as the Smart Deinterlacer filter, except that it produces a doubled frame rate output file. For example, if the input is 30 frames per second interlaced, the ouput will be 60 fps progressive. Each output frame is created from a single input field by either interpolating data or using data from the previous frame (=field), depending upon whether the area is detected as moving or not. This filter thus allows the maximum possible spatial and temporal information to be extracted from an interlaced input clip. If the frame rate is left at double the input rate, and if the hardware can play at or near that rate, then very smooth movement (double the temporal resolution) results. If the frame rate is set back to the original input frame rate in the AVI header, a very smooth half speed slow-motion effect results. This latter mode is highly useful for analysing clips of sports or other actions that need to be studied.

The Smart Bob filter acts on a clip after it has had its fields split into frames. There are two ways to achieve this. First, if you have an MJPEG clip encoded with 2 fields, you can use VirtualDub's extended open options. When opening your input file, check the "Popup extended open options" checkbox. Then, when the extended open dialog appears check "Split interlaced frame into two fields". You can use the swapped version if your capture card has reversed field dominance (you can tell because when you single-step, things move backward every other frame). Second, for clips that are not MJPEG encoded with two fields, Ben Rudiak-Gould's excellent utility, Avisynth, must be used as a preprocessor to split the fields into frames. It is very easy to use.

To use Avisynth, first download the Avisynth DLL from:

www.math.berkeley.edu/~benrg/avisynth.html

Then, copy it into your \windows\system directory. Finally, create a file called "clip.avs" that contains:

clip=AVISource("f:\capture.00.avi")
clip.SeparateFields

Note that the AVISource() call contains the path to the input clip. Now, when you open "clip.avs" in VirtualDub, you'll get the input clip with its fields changed into half-height frames. If your capture card has reversed field dominance (you can tell because when you single-step, things move backward every other frame), then use:

clip.ComplementParity.SeparateFields

Finally, if you have a pathological codec and your video appears upside-down, contact me or Ben to get an external FlipVertical filter that is not included in the current release of Avisynth (0.3 as of this writing), or use VirtualDub's internal "flip vertical" filter.

After setting up the splitting of fields to frames, you now simply add the Smart Bob filter in the usual way. For those familiar with the Smart Deinterlacer filter, you should know that Smart Bob always uses field-only differencing, and compares the luminance of pixels to determine motion. Motion map denoising is optional. A future version may add the same options that Smart Deinterlacer has.

The following options are available:

Show motion areas only: When selected, only the moving areas of the image are displayed in white; static areas are black. This option can be used to assess the suitability of the choice of threshold.

Even-numbered frames (0-based) contain top fields: After the fields were split, the bottom field was placed into a separate frame. In effect, this makes it one-half line higher than it should be relative to the top field. To correct this, after the frames are resized to full height, the frame containing the bottom field gets shifted down by one full line (the height was doubled so a half-line shift becomes a full-line shift). This checkbox tells the filter which frames contain the top and bottom fields after the split. This may vary depending upon the field dominance of the input clip.

Threshold: This value determines the sensitivity of the motion detection process. A threshold that is too low will cause too much of the image to be treated as moving, reducing the perceived resolution. A too low threshold will also tend to emphasize noise. A threshold in the range of 10 to 25 will be good for most clips. You can view the effect of threshold on motion detection by selecting the "Show motion areas only" checkbox.

Motion map denoising: When this checkbox is checked, extra filtering is added in the motion detection pipeline (not in the main video pipeline, so the ouput video is not compromised) that does a good job of suppressing false motion noise. The downside is that the filter runs slower. Use the "Show motion areas only" option to tweak the threshold fairly low without introducing false motion noise.

Slow-motion effect: If you set the frame rate back to the input clip's rate using VirtualDub prior to saving the output file, you will obtain a very smooth half-speed slow-motion effect.

[Назад]