Digital Digest
  • About the Author
  • Email
  • Disclaimer
  • Essential Links
  • Essential Tools
  • Ethics, Piracy & Philosophy
    Convert DVDs with Flask Mpeg
  • Extracting the DVD
  • Using FlasK Mpeg
  • Resizing in Flask
  • Convert DVDs with Mpeg2avi
  • Extracting the DVD
  • Using Mpeg2avi
  • Resizing in Mpeg2avi
  • Advanced DVD Conversion
    Convert DVDs with DVD2AVI
    Nandub SBC Encoding
  • Using Nandub
  • Using DivX 4.0
  • Audio / Video Editing
    Advanced VirtualDub
    Digital Video Capture
  • Video Capture: Part 1
  • Special FX Tutorials
  • Morphing Buffy Style
  • Star Wars LightSaber Effects
  • The Exorcist Effect
  • Other Video Formats
    VCD & SVCD Guides
  • DVD to VCD
  • AVI to VCD
  • Multimedia Guides
  • DivX with Subtitles
  • Mutilanguage DivX
  • Multimedia DivX Pt 1
  • Multimedia DivX Pt 2
  • Appendix / Tips
  • Aspect Ratio's
  • Resizing DVD's
  • DivX Quality Guide
  • Bicubic vs Bilinear Resizing
  • Deinterlace Method Test
  • Video Comparisons
  • WM8 Quality
  • Basic DVD Structure
  • NTSC / PAL & Interlace
  • AVI 4GB Limit
  • Key Frames & Delta
  • Monitor Setup Guide
  • FAQ's
  • Questions Answered
  • Downloadable PDF Guides
  • Glossary
  • Word Definitions
  • My Guides Translated
  • Go Here
  • More Filter Tricks:

    Cleaning Up Video With VirtualDub Filters

    The amount of filters available for VirtualDub is growing fast. If you want to see the latest selection get 'em Here. To install new filters is really easy, just download, unzip, and put them inside the the VirtualDub folder called 'Plugins'. Then the next time you run VirtualDub they will appear. And just to recap, to use the filters we go to: File > Filters. If you haven't read my last article on Filters go Here.

    Lets face it most video capture has at least some noise or sharpness problems unless we are using very expensive equipment or have a very good quality source to record from. This is why VirtualDub has a selection of useful filters designed to correct bad colour, brightness, saturation, noise, smoothness and a whole bunch of other things. So here I will give you a few tips on some of the filters that I use and how they can be applied effectively.



    Ideally we want to do as little to the original video as is needed to make it look good. Its very easy to go overboard and stick five or more powerful filters in the hope that the final result will look great. In actual fact the least changes necessary will usually results in the best results. Using filters seriously slows down compressing time so I suppose this will help to limit your use of them a little too.

    Don't expect any of these subtle noise reduction filters to work miracles because they wont. Noise reduction without loss of detail is almost impossible because the original information is not there. There are another selection of what I like to call 'Hard Core' filters that will do some amazing things but these work by making large changes to the original image. But it is possible to use these in conjunction with the more subtle ones to achieve a good balance.


    Using the Dynamic Noise Reduction Filter

    Most noise reduction filters work on the idea that the same noise disruption will not appear in two or more frames in exactly the same place. Their solution is to compare the first frame to the second frame in the sequence and get rid of minor changes. This is basically what the Dynamic Noise Reduction filter does. It doesn't need much explanation, really, because it only has one slider bar. The higher you set it the more it will reduce subtle noise errors found in your video. The only problem with this is the higher you set it the more it will tend to merge two frames together. This produces an annoying ghosting effect like this:

    The one on the left is the original. The one on the right has ghosting because of the high level of noise reduction!


    Using the Temporal Cleaner Filter

    The Temporal Cleaner is a bit better than the Dynamic in some ways although its based on the same idea. The reason it is slightly better is mainly because it is designed to only copy across parts of the image that don't move at all. This helps greatly to reduce the ghosting effect. The down side is controls are more confusing and its easy to get weird effects from setting them.

    A threshold is how different one part of the picture is to the one next to it. If you are used to using the 'magic wand' option in Adobe Photoshop or Paint Shop Pro then you should have a good idea of what this means for a picture. Imagine a light colour and a dark colour ten times darker than it. If we set a threshold of 10 then both colours would be considered as exactly the same. If the threshold was set to 9 or below then the colours would be considered as not the same. The average threshold of any high colour image is about 35 pixels which is Adobe's default setting for Photoshop.

    (A) This defines how different whole one frame is to the one next to it. It describes the whole frame and not just parts of it. If it decides one frame is totally different from the next it restarts the comparison between it and the next frame. This is designed as a safety function to prevent parts of one scene appearing in the next. In other words if its too high you will get some ghosting effects, if its too low it will lessen the amount of noise it can delete.

    (D) Process in YUV colorspace allows you to set both the brightness thresholds (luminance) and colour threshold (chrominance) more exactly. Basically you should check this box for best quality and uncheck it if speed is more important.

    The settings are now split into two parts. Brightness thresholds are listed on the left hand side of the GUI and Colour thresholds are described on the right hand side.

    (B) Luminance Threshold. This can be any number from 0-255. Luminance basically means brightness. Just imagine the picture was only black and white. In that case this threshold ignores all colour decides just how different the shadows are between one frame and the next.

    (F) Brightness pixel lock feature. This keeps pixels that are almost the same brightness between two or more frames locked exactly the same position for as long as it can. This setting should usually be very low because you will start to see a spray of dots where things move from one frame to the next.

    (C) Colour threshold setting. This refers to how deferent colours are from each other between two or more frames. The human eye is less sensitive to colour settings than it is to brightness so these can be made higher thresholds than the same brightness settings on the left. This seems to be the main reason the default settings are higher.

    (G) Colour pixel lock feature. This keeps pixels that are almost the same colour between two or more frames locked exactly the same position for as long as it can. This setting should usually be very low because you will start to see a spray of dots where things move from one frame to the next.

    (E) Allow to lock luminance. This is a kind of add on feature that may not help much with noise reduction. It compares the chrominance threshold to the luminance threshold on any locked pixels and tries to make a guess on what should be kept or not.

    Well that's about it! The show motion area is not a noise reduction option. It is only there to show you what area of the picture is being changed by the noise reduction. Unchanged parts will appear as blue. Moving parts will be black. Gray shows brightness locked pixels. Usually it produces one big mess but it may help you to see what is going on with the setting you are using.

    Phew! After all that explaining you'd expect some big results from this thing! But, again, I'm sorry to say that no noise reduction can truly reduce noise because noise has become part of the picture. You can no more tell a computer to remove the noise dots then you can tell it to remove an eye from a person.



    Using the Smart Smoother Filter

    Take a look at the picture on the left. I captured it when the aerial was not tuned in correctly to simulate a lot of noise. Then I used the Smart Smoother filter (Diameter 11; Threshold 200) to clean it up. Its not perfect, but I'm sure you will agree that the noise is a lot less.

    The filter work's with two settings the diameter and threshold. The Diameter is how many pixels it effects at a time. The more you use the more blurry the image will appear. And the Threshold is a check to see how different one colour is from the next. A lower threshold is quite good for cartoons because it tends to make solid blocks of colour. As always experimentation is he best method.


    Using the 2D Cleaner Filter

    This is one of my favorite filters because it can be very subtle and yet powerful at the same time. Its basically very similar to the previous Smart Smoother in operation but after a while of using I think you will prefer it for most stuff.

    All these filters are basically selective blurring filters. They allow you to control how much of the picture is blurred and how much of it is kept sharp. For most images a radius of 2 enough, in fact a radius of 1 may be better if the noise is not too bad. The higher the radius the longer it will take to reduce noise and the more blurry the overall picture will be. The threshold doesn't exactly say how blurry the picture will be but defines how sharp fine details will be. In laymen's terms this means that the higher the threshold the smoother the look at the expense of fine detail, but the lower the threshold the more 'plastic' the picture will appear. The first thought is to use a threshold setting that is lowest so as to keep the sharpest edges, but this results in a plastic cartoon-like effect. I suggest you start at in the hundreds. I usually start at 150 and work my way down a little until it looks good. But again, this is all dependent on the picture you may need to go even higher or much lower.

    The picture below is a good example of how it works. Getting rid of macroblocks is almost impossible. So I have encoded a video clip with very low bitrate to get some macroblocks and then I used the 2D Cleaner (Radius 2; Threshold 90) to try and delete them. As you can see, the 2D cleaner is able to blur out the small block-like areas but still keep a fair amount of detail.




    Saturation is the strength of a the colours in a video. If you have too much colour (as is very often the case with video capture cards) then you may need to turn the saturation down. A completely non-saturated image is gray and a totally saturated image is almost solid blocks of colour.

    This first image is deceptive because it still looks quite nice (I'm talking about the colour not the girl...well, her too :). Anyhoo, people are naturally drawn to highly coloured images and it gives over a dreamy effect. Nevertheless, there is far too much colour in this image and it is not at all true to the original video it was taken from. To fix it you must use the Hue / Saturation / Intensity filter. Just turn the saturation down a little and it will look okay.

    This next image has far too little colour in it and is starting to look almost black and white. This is a more obvious problem and the saturation needs to be turned up a little this time - be careful not to overdo it though.

    This final image has a good balanced saturation and matches the original video well. Provided you have a good video and TV, its always a good idea to view the captured image alongside the original so you can be more objective about the true colours.



    Hue is basically the overall colour tendency. You rarely need to adjust the hue of a video but just to keep it complete I'll explain a bit about it. Sometimes a image will be a little more red than it should be or a little more green etc. If you notice that this is the case then I suggest you tweak the hue a little using the Hue / Saturation / Intensity filter again. Usually you will only need to adjust it by a very very small amount. Its really just a matter of looking and seeing what is right. Forget about the intensity option with the Hue / Saturation / Intensity filter because the levels filter is more exact in this area.



    Take a look at the picture below, no, don't adjust your computer screens its meant to look like that :). A photo can be described as being made up of three parts shadows, midtones and highlights. I have simplified the picture below to show them better.

    Forget colour for a second, the level control only effect the brightness and grey tones of an image. Lets say a black and white photo is only 255 tones. Tone 0 is pure black and 255 is pure white. Now look at the two bars below:

    These bars represent the brightness of the picture from left being darkest to the right as the lightest. The bottom 'output levels' bar represents the overall colour value, that is, how dark 0 starts at and how light 255 will finish. Remember that 255 represents the brightest colour and 0 the darkest. So if 0 actually starts as a gray then the overall picture will look much lighter!

    If we move the black arrow of the bottom left bar to the right, it will make all the dark parts brighter. This gives almost exactly the same effect you would get from turning the brightness up (but without increasing the intensity). Conversely, the white arrow on the bottom right will move the bright values down. The main difference between this and adjusting the brightness is that the contrast (the ratio between how much dark and how much light exists) is not effected - it just 'washes' the image darker or lighter.

    Next the 'input levels' bar above still represents all the tone values in the image from 0-255 as the one below, but this time it lets us change the ratios between them. For example, move the top left arrow to the right and you will increase the shadows in the picture. If you move the far-right arrow left you will increase the highlights. The center arrow represents the ratio between the two. If we move it to the left it will give us much less shadows, making the picture appear more flat. If we move it to the right it will give much more shadows, making the picture appear hard and defined. The default value is 1.0.

    As I'm sure you already realise, this filter is more powerful than just changing the brightness and contrast of a picture and gives you a lot of control to fine tune your image and get the best effect.


    Using the Unsharp Mask Filter

    To sharpen or blur an video using a sharpen or blur filter is easy enough to do, just set the amounts. But if you really want control over how your image is sharpened then you cannot beat the unsharp mask filter. It has a strange name but it lets you control what areas are sharpened better.

    First lets explain what Edge Masking means. When you sharpen a video it sees the edges of the picture as black. Because sharpening increases the difference's between adjacent colours it will automatically make a white mark around the edges that could get annoying (see the picture below). Edge masking simply lets you take out the sharpening effects on each edge. By moving the Top, Bottom, Left and Right slider bars you can delete all sharpening effects to any of these areas.

    Now edge masking is explained all we need to worry about is the top three slider bars, the Diameter, Strength and Threshold. But first, take a look at the original captured image. It looks a little too blurry and we want it to look sharper.

    To see just what is going on I think its best to start with quite a high sharpening strength. So keep everything on its lowest setting and turn it up until you see large changes. I've used the full strength of 250 below (Diameter 3; Strength 250; Threshold 0).

    Now we can see what the Diameter does. It basically shows what parts of the picture will become sharpest. A setting of 3 is the smallest amount and 11 the largest. Usually you will not need to go much higher than 3 unless you want to get a certain effect like to enhance highlights etc. But the picture below is Diameter 7; Strength 250; Threshold 0.

    Finally we can see what the Threshold does. The Threshold controls what percentage of the picture is effected by the sharpening. If you have a large threshold only the finest details of picture will be affected and the rest of the picture unaltered. If you have a very small threshold then most of the image will be sharpened. The picture below has Diameter 7; Strength 250; Threshold 4.

    Okay, 250 Strength is far too strong, so lets lower it a bit until the picture looks normal again. Then all we need to do is increase the strength a little bit at a time until the picture looks nice.

    Here is the original picture below...

    And here is the final sharpened version (Diameter 5; Strength 31; Threshold 2).

    This picture could actually look a lot sharper but I felt that the diagonal lines (due to the aerial signal) were too noticeable so I used a slightly more blurred effect.


    Final Notes

    Well, I have explained some of the more complicated but most useful filters for video enhancing. There are a whole bunch of others too but doing a guide on them all would be crazy and take ages. I recommend you take some time to try out each filter. Read the instructions about them on the creators websites or instructions. The links to each website will be found on the VirtualDub homepage. For those with interlace problems don't forget that there are a bunch of smart deinterlacer filters. And for those who struggle with flickery video there is at least one anti-flicker filter.

    I think it is important now to give one final warning! A small picture may look great with just about any filter you use on it, but always check the final movie (or a small clip of it before you apply the filter to the whole movie). Do this by playing it full screen with your monitor brightness both normal and turned up much higher than you normally would have it.

    Have Fun!

    Duplication of links or content is strictly prohibited. (C) NICKY PAGE 2000