My "ultimate" VHS tape restoration recipe

johnmeyer wrote on 10/4/2003, 12:38 AM
This is a description of what I have learned about how to get the best possible quality video from VHS tapes. If such a thing doesn't interest you, by all means skip this lengthy post!

Here goes.

1. Use the best VCR you can find.

2. Make sure you turn on the Edit switch (sometimes called "tape dub"). This defeats the "edge sharpening" circuit which makes some people think the picture looks sharper, but actually loses detail. Also, use the S-Video output.

3. Some people recommend using a Time Base Corrector between the VCR and your capture device. My understanding of what a TBC does is that it regenerates the sync signal which is extremely important if you are going to record the signal on another analog tape. I am less certain, however, of its importance if you immediately digitize the signal.

4. Capture your video. I use the pass-throuh on my camcorder. I find this works far better than my ATI Radeon 8500 DV capture card.

Now comes the fun.

5. For truly amazing results, repeat step 4. That's right, capture the video a second time. You then take this video and line it up on the Vegas timeline directly above (or below) your original capture. Line the two up so they are frame accurate. To do this alignment, set the opacity of the top video track to exactly 50%, and then move the event on one track left or right one frame at a time until you have perfect alignment. Use only the audio from one of the two tracks. Check along the entire timeline to make sure that the video hasn't gotten out of sync. If it has, split the video that isn't synced to the audio and re-sync the two video tracks (you should have to do this more than once or twice, even for a long capture).

You may find that your second capture is off by half a frame. This is due to the fact that the capture card just sees fields coming in and then combines them into frames. You therefore have a 50/50 chance of this happening. If it does, use this AVISynth script to fix either of the two captures:

AviSource("e:\my video\VHS.avi")
SeparateFields
Trim(1,0)
Weave

Once you have fixed the capture, put it on the Vegas timeline and proceed as described above.

[The following was added to the original post: Before rendering, set opacity back to 100%, set each track level to 50%, and set composite mode for both tracks to "Add." This will create an average of both tracks. If you need to average three tracks, set each track level to 33%.]

Render the results of the merging of these two captures back to another file.

6. You now have either a single capture, or if you are a qaulity freak and have nothing better to do with your life, and followed the procedure in step number 5, you now have an already vastly improved version of your tape. However, regardless of whether you did step 5 or not, you can improve things even further. Use the following three filters in VirtualDub, in this order, to "scrub" the video:

Video DeNoise 1.2 (6.4.8)
Chroma Noise Reduction (1.1)
NRS (TS 6-10-100)

Use the defaults for the first two. For NRS, enable only the Temporal Smoother, and set the Luminance Thresholds to 6 and 10. Leave everything else unchecked and in their default positions.

This filtering is very subtle, but will get rid of most flicker, most chroma fringing (including halos from bad edits on old non-flying erase head machines), and introduce almost no visible artifacting. If you want to be more aggressive, you can up the thresholds to 8 and 12, or even a little higher. However, while you may at first like the results (because these settings reduce the noise more), you will start to notice artifacts. Once you notice them, you will hate them, and wish you hadn't set the thresholds so high.

After VirtualDub has finished creating the cleaned video, bring this new video into Vegas and edit, edit, edit.

BTW, none of these VirtualDub plugins can be loaded from within Vegas using PluginPac because they are temporal in nature, and PluginPac doesn't handle temporal plugins (ones that operate on more than one frame at a time).

Hope this helps someone! I've been working on this off and on for months, and I just spent a complete day today testing all the various plugins and searching every video forum I could find. The only things that might improve on these results would be:

1. Do more than two captures. Some people have done as many as five (the noise reduction improves in a logarithmic fashion, so you get progressively less improvement with each subsequent capture). I have not explored this because it seemed too time consuming.

2. Use AVISynth noise reduction filters. There are apparently many more noise reduction filters available for AVISynth, but it is difficult to interactively test these, so I stayed away from them. (Actually, I did test them, and Peachsmoother and Dust are the two you might want to try).

3. Try the temporal cleaner in SpotRemover. Turn off the spot removing function (designed to remove transitory dust specks from film) and just us the cleaner. It is miraculous on some scenes, but introduces bad artifacts on others. I wanted somthing that worked really well on pretty much any VHS video.

Comments

PAW wrote on 10/4/2003, 6:49 AM

John thanks for the post.

Did you try the flaxen VHS plugin, I have not used it in anger but do have some personal old VHS stuff I keep on meaning to get around to.

PAW
bjtap wrote on 10/4/2003, 7:19 AM
JohnMeyer,
Very interesting and useful post. I will apply this to 8mm and Hi8mm tape. Question: is it necessary to capture a second time? Why can't we just place the original capture on the time line twice?
Thanks,
Barry
jsteehl wrote on 10/4/2003, 8:12 AM
Barry,

Since I read this post I've been trying to think of reason to recapture as apposed to using a another reference of the first copy and I can't think of one thing. Unless capturing another time would create a copy with other random type anomilies (such as flicker or noise) and then the process "averages" them out.

Is that guess right... did I win the prize? Either way awesome post, can't wait to try it.

-Jason
JohnnyRoy wrote on 10/4/2003, 8:25 AM
> Why can't we just place the original capture on the time line twice?

The noise is a product of the capture. It won’t be the same twice. So I think by capturing twice you have an opportunity to add information from one track, which was noise on the other.

JohnMeyer, Thanks for the info on the Video DeNoise 1.2 plugin. I use VirtualDub a lot to clean up VHS captures and I had never even heard of this filter. It seems to do a nice job. I normally just use Steven Don and Avery Lee’s Dynamic Noise Reduction 2.1, which I think does a great job too. Thanks for sharing that with us. We all know how tedious it is searching for the right combination of VirtualDub filters. ;-)

~jr
craftech wrote on 10/4/2003, 8:28 AM
John,
I am sure I speak for a lot of us when I say thank you for all the hard work and your enthusiasm at sharing it with your fellow videographers.
John
Randy Brown wrote on 10/4/2003, 10:41 AM
A very enlightening post John, thank you very much! I did a search for "Video DeNoise 1.2 plugin" on Google but couldn't come up with anything in English. Can someone tell us where to find more info please?
Randy
Jay Gladwell wrote on 10/4/2003, 2:45 PM
Q: Why can't we just place the original capture on the time line twice?

A: The noise is a product of the capture. It won’t be the same twice. So I think by capturing twice you have an opportunity to add information from one track, which was noise on the other.

JohnMeyer and JohnRoy, allow me to suggest the following. I’m not trying to be argumentative, but I’m not certain that what has been said would hold true. When overlaying image with noise, one simply gets a watered-down image where the image was clean. Consider the following…

In the way of an experiment, I went into Photoshop and created a simple graphic which consisted of a red square (representing the image) and an adjacent green square (representing the noise).

Then I flipped and copied the image so the green square was now on the left and the red one on the right.

Next, I overlaid the first with the second.

Lastly, the opacity of the top layer was reduced to 50%. The result was a muddy, ugly, greenish-brown color. Each one, more or less, canceled out the other.

Granted, you will not get a full 100% opposite clip with each recording, but the fact remains—if one clean pixel/image is overlaid with a dirty (noise) pixel/image in that same spot, it does nothing but diminish the integrity of the first.

Please, anyone, feel free to explain why this would not be the case.

Thanks for this discussion!

J--
BillyBoy wrote on 10/4/2003, 6:38 PM
I haven't tried the experiement, so just an educated guess; It won't work, at least not as some might think it might. Stop and think why not. By having two tracks with the top having the opacity dropped to 50% the underlying track will bleed through. Sure, you knew that already.

The problem is the opacity of all the pixels on the top track have simply had their OPACITCY reduced by half. So its very much like looking through a dirty window. The "dirt" is still there. If you wipe the window with a dust cloth, you'd have a somewhat cleaner glass, but only washing the window will get it really clean.

So doing a second capture will likely result in clearing up the noise in some places true, your effort is mostly wasted because you'll only introduce more noise in new places because you've done nothing to actaully solve to problem itself. So in effect you aren't removing the problem, you're really duplicating it only it will show up in different spots.

To really work don't compound the problem, solve it. Where the second capture is "clean" leave it on the top track. Where the bottom track is "dirty" replace those frames AT FULL 100% opacity with the new capture if those frames are now clean. A royal pain for sure because you'll need to step through a frame at a time and use whatever version has less noise.
farss wrote on 10/4/2003, 7:11 PM
johnmeyer has the right idea.
The theory of noise is that it's random. If you can get multiple samples of the same signal, each one with random noise then an algebraic average of multiple samples will cause the noise to cancel out. Other techniques involve looking for non random components is a signal. This is the very simpplified version of how signals can be received from the other end of our solar system.

BillyBiy is correct in that with only two samples you will only reduce the noise to 50% of its original value. That's still a worthwhile improvement however the rest of his arguement fails because as far as I know you don't get a mixture of clean and dirty frames. What does worry me however is that as each sample contains noise at different positions within each frame as you attempt to average it out the intensity of each noise spikes will be reduced but the number of affected pixels increases because each sample has noise in a different location in the frame.

The ideal but very complex solution is to have say five samples, derive an average value for each sample and discard any sample that deviates by more than a set percentage from the sample. I'm certain this is standard technique in statistics and there's probably even a name for it.

Down side to what I'm suggesting is the huge amount of calcs involved. There's another consideration as well, for these techniques to work well not only do the fields have to line up but also the pixels. From my limited knowledge of how the video comes off a VHS tape I'd doubt your chance of much success with this.
BillyBoy wrote on 10/4/2003, 8:11 PM
What was suggested is that by putting one track on top of the other and reducing the opacity the bottom layer is shrouded. Partially sure, but to what end? No... that's like thinking you'll be protected from getting wet by an umbrellia that's surface area has 50% holes! Further what I suggested was using just the "good" parts in both tracks. Of course as Farss pointed out thinking you'll get rid of all the noise in just two passes is probably wishful thinking since it is random, you may need 3, 5, 20, who knows how many attempts to get 100% clean frames all the way through. Futher but introducting more tracks what's stopping the second track from having just as much noise in different places? What then has been accomplished? The "improvement" is rarely going to be worth the effort.
johnmeyer wrote on 10/4/2003, 8:58 PM
Thanks for all the replies. Let me answer some of the questions that came up.

Did you try the flaxen VHS plugin?
Yes. It has a combination of several filters (chroma, temporal denoise, spatial denoise, and more). I found it very difficult to set up, extremely slow, and ultimately was never able to get as good results with it as other filters.

Question: is it necessary to capture a second time?
No. This is an optional step. It takes a tremendous amount of time and patience. However, it also produces noise reduction that, unlike the various digital noise reduction techniques, has no motion artifacts. Using the noise reduction filters on a single capture is what I do most often. However, if you are looking for the ultimate, then averaging multiple passes will produce far better results.

BillyBoy and others have questioned whether the averaging of multiple passes is based on flawed assumptions. BillBoy stated:

"if one clean pixel/image is overlaid with a dirty (noise) pixel/image in that same spot, it does nothing but diminish the integrity of the first."

also

"what's stopping the second track from having just as much noise in different places? What then has been accomplished? "

Actually both statements are exactly correct, and that is why this method works. Each capture contains its own unique set of noise. If the noise is in the actual signal on the tape, then it will be present in both captures, and nothing will improve (and nothing will get worse either). However, if the noise is caused by one of the dozens of different transient occurences that happen when a head spins rapidly over a slowly moving tape just a few microns away, then that noise will be different on each capture. Much of this noise, especially on older tapes, is seen as low-level snow. These dark and light spots occur at different places on each tape. If there are two pixels at the same location on each capture that are identical, then if the two are averaged, the result will be identical to the each of the pixels on the two captures. If there is a noise pixel on one capture but not the other, then the average of the two will be a pixel that is halfway between the color and brightness of the noise pixel and the color and brightness of the good pixel.

This is almost the definition of noise reduction.

Remember, there is no claim made that this will cancel or eliminate noise completely. The more captures you do, the better the results become.

This whole process has been discussed extensively on the AVISynth forum and elsewhere. These discussions have included a fair amount of math, some of which farss has alluded to in his posts above. Basically, the averaging gets better with more captures, but only as the square of the number of captures (you have to do four times the number of captures to cut the noise in half).

I am quite certain that this technique works because I can look at the results and see the difference. The only thing I am still not comfortable with is whether setting the opacity to 50% really creates an average or not.

Here's a thread on the subject of averaging multiple captures:

Multiple TV Captures
farss wrote on 10/4/2003, 9:18 PM
John,
from what I know setting each track to 50% will create an average. The two tracks are then summed by default. If you had three tracks you'd need to set each of them to 33%.

I just ran a test on this. You need to set the composite mode to"Add" and it will work.

Easy way to check whats happening. Put 100% white on two tracks. Set opacity to 50% and look at the result on the histgram, should be 100% (255) white. It doesn't quite work unless you set the composite mode to Add. I suspect because the bottom track is 50% and the composite mode is alpha so the underlining black is coming through.
BillyBoy wrote on 10/4/2003, 10:25 PM
You're both pulling back on what you originally said. Nobody originally mention composting the two tracks. Sure, THAT does make a difference. I was of course responding to what you both ORIGINALLY wrote. Without composting the top track always will block track below.

So... lets not get into complex math, too late in the evening. While you can't number pixels if you could lets say pixels 405, 759 and 811 were "noise" regardless of type, then all the top layer would do WITHOUT composting is drop the opacity of pixels 405, 759 and 811. Since you pulled down the opacity level instead of them being the intensity as captured they would be only 50% or half of their original strength. That may blend some of the noise. However since you can't selectively alter the pixels that need to be "fixed" by loweing the opacity level you've dropped the level on all the pixels. So YES composting was needed. I was waiting for that little 'light bulb' to light up and nobody said it till now. ;-)
johnmeyer wrote on 10/4/2003, 11:36 PM
... setting each track to 50% will create an average. The two tracks are then summed by default. If you had three tracks you'd need to set each of them to 33% ... You need to set the composite mode to"Add" and it will work.

Farss, thank you, thank you, thank you. I have been trying to figure out how to ensure that I was getting an average, and I tried using the Add mode in compositing but I stupidly forgot to set each track to 50%. As my kids would say, duh!

In my original post, I said to set the top track to 50% opacity to line up the two tracks, but failed to mention that you needed to keep it there. I think having the top track at 50% opacity and the bottom track at 100% with compositing set to the default alpha channel (no compositing) gives the same result as your method, but I feel much more comfortable with your method. In addition, your method is extensible to "n" captures, which is what I've been trying to figure out how to do for the past few days.

BTW, I went back and corrected my initial post to include your information.
RichMacDonald wrote on 10/6/2003, 11:12 AM
>The ideal but very complex solution is to have say five samples, derive an average value for each sample and discard any sample that deviates by more than a set percentage from the sample. I'm certain this is standard technique in statistics and there's probably even a name for it.

OT: Since I'm a statistician, I feel qualified to speak off the top of my head and without a single known fact to back me up :-) And I'm trying to avoid starting my workweek while waiting for the 2nd cup of coffee to kick in, so I'll pontificate a bit if you don't mind...

Actually, I suspect the even ideal-er solution is to have your five samples and take the *median* value for each point. IOW, sort all 5 points and use the 3rd one.

It all depends on the randomness of the noise. If it were perfectly "normal" randomness, then the best approach is to average all 5 and take the mean. However, the randomness is not normal, since there is a fixed min and max value (black and white). Second, we see noise differently: White noise on black is more noticeable than black noise on white. Third, I bet the capture system causes different amounts of noise in different parts of the color spectrum. Fourth, unless all the components in the capture chain are "normally random" (which I doubt), you need an infinite number of components in series for normal random distributions to be approached. We don't. Fifth, I would guess that the capture system works correctly (i.e., a point is correct) some fraction of the time. (Fifth point is technical and a bit of a SWAG on my part.)

So all these possibilities could cause the noise to be non-normally random. So we need statistical techniques that are "robust" with respect to violations of the normal randomness assumption. IOW, they give good results even though their assumptions are violated.

As you have suggested, one technique is to throw away the samples that are some specified percentage different from the mean. This is one form of "outlier removal". (You were correct; it has a name:-)

However, outlier removal is fraught with statistical difficulties, primarily, no guarantees of anything, and it is usually inferior to another technique.

That other technique is called "nonparametric statistics". Its usually a lot more computationally intensive than traditional statistics (although not in this case), its always "almost" as good as traditional statistics when the traditional assumptions are true, and its much better than traditional statistics when the traditional assumptions are untrue. In our situation, this technique boils down to "Use the median point".

Sadly, of course, there is no way to implement either of our suggestions in Vegas. SoFo would have to figure out how to combine more than two tracks, and that would radically break the GUI mold. One possibility would be to allow users to add the additional tracks as *takes*, then write a filter that operated on the takes.

Incidentally, I only deal with noise from low-light conditions filmed with DV, and I don't do any VHS work, so my only memory of snow is from looking at an old TV not tuned to any station. Is the snow 1 pixel at a time or is it "clumped"? Sure it *looks* clumped, but is that an artifact of the amount of noise, or is it truly clumped? IOW, if I capture 1 pixel with snow, is the next pixel(s) in the path likely to be snow too? If so, that would suggest that there are other undiscovered analysis techniques that could be used to reduce it....i.e., looking for patterns in the "on/off" nature of the snow, then compensating for it. I've never thought about this, because low-light noise appears to me to be single-pixel-based. But thats just using my untrustworthy eyeball :-) And in case anyone was thinking of using John Meyer's technique for this kind of noise, don't bother, because the noise is inherent in the tape source, not the tape capture, so you'll just be averaging the same noise over and over again, i.e., no effect whatsoever.
BillyBoy wrote on 10/6/2003, 12:38 PM
To boil down all that's been said it is because of the sheer randomness of "noise" that there can't be anything as the title suggests, ie (a recipe) that can be generally followed to remvoe it. The concept of a "recipe" by its very nature suggests that if you FOLLOW it and use the ingredients listed like when baking a cake (or in this case follow the steps to get rid of most all the noise) each user will more or less get the same results if he just follows the recipe. Sorry no.

The "recipe" for such things as noise remove depends very much on the source file. So without throwing too much cold water on it the "recipe" working for the writer for the source file HE HAS using the EQUIPMENT HE HAS is one thing. Attempting to transport it to your situtation without heavy modification is something totally different. Your results; given you don't have the same source file to clean up, and not the same equipment that generated it in the first place, your results will differ, perhaps strikingly so making the exercise just that, mostly an exercise. Wish it wasn't true, but sadly that pretty much the way it is.
johnmeyer wrote on 10/6/2003, 1:14 PM
Two further notes:

One, I am finding that the DeNoise plugin doesn't help that much, and also it de-interlaces, which creates nasty artifacts if you plan to view on a TV. I've dropped this plugin from my filter chain. The other chroma filter does most of the same work anyway.

Next, as far as BillyBoy's comments, he is certainly right that you cannot blindly follow ANY advice given here in these forums (including his) and expect it to work exactly right for your particular situation without some modification.

Since my last statement is pretty self-evident, I cannot possibly see the benefit to this forum of BillyBoy taking shots at my sincere attempt to give others the insights gleaned from several days of work. What was the point of his last post other than to irritate me? Are MY posts that irritating or stupid? Do I post in all caps? Have I told people to plug in their computers while standing in three feet of water, or something else equally dangerous?

I guess my sin was using the word "recipe." I will agree that it was not the perfect word choice. But how can I avoid making the same mistake again? Perhaps I need to hire a proofreader. Better yet, from now on, I will first consult a lawyer, and at the end of every post add "this advice may not work in all cases, may not work at all, could cause heartburn, indigestion and, in extreme cases, blindness. Do not follow these directions while driving a vehicle, and do not follow these instructions if on certain medications."

Finally, at the risk of going completely over the top in my response (if I haven't already) I should also point out that BillyBoy's criticisms of my technique are based on purely speculative, armchair quarterbacking.

By contrast, I have actually done the work and seen the results, and the technique works.

There is a well-known story about the difference between theory and practice. Back in the 1940's my dad's engineering class at M.I.T. proved, through aerodynamic equations, that the bumble bee couldn't fly. However, the bumble bee, not knowing about their results, just kept on flying.

vonhosen wrote on 10/6/2003, 1:33 PM
Well I for one won't worry too much about the language used but will read "recipe" as "suggestions"

I may try it & if it works use it. If it doesn't I won't bother anymore. Nothing ventured nothing gained. I use this logic on most of the tutorials or "suggestions" posted here. I value people going to the effort & time to post their findings here & share them with others.

I am not for a minute suggesting that people shouldn't question processes in order to validate results, but I tend to try it & if it works use it (not worry about why it works). Well that's me , I don't expect everyone else to be the same.
BillyBoy wrote on 10/6/2003, 3:38 PM
Ahh... please don't shoot the messenger for deliving bad news. I'm only pointing out the flaws in the concept, not taking a swipe at the person that posted it. This is another one of those cases and I'm simply raising the caution flag that you may not get the same kind of results.

Since doing such a project involves a good deal of time and work, forum members should know what they're getting into. If some want to spend days or weeks fooling around trying to get rid of a particular problem, by all means be my guest. Just don't say I didn't warn you the results may not be worth the effort.

I'm not taking shots at anyone. Why someone would get "irritated" for someone else pointing out they forget to mention a key step (composite the tracks) necessary if you want to blend pixels from one track with another instead of just clumsy attempts to hide them partially by dropping opacity or that as someone else pointed out because of the randomness of the noise other steps either repeated or new may be needed.

Part of the benefit of this forum is for everyone to take a look at what others say and add their two cents. My comments weren't purely speculative, armchair quarterbacking, rather having done similar things myself and just pointing out some of the pitfalls I discovered.

Everyone taking time to read this forum on a regular basis probably has as one of their goals to make the best quality videos possible. To that end some tips and suggestions work every time, others like this one only work sometimes and is more dependant on things introduced outside of what you do in Vegas. That's all I'm saying.


RexA wrote on 10/7/2003, 1:37 AM
>>In my original post, I said to set the top track to 50% opacity to line up the two tracks, but failed to mention that you needed to keep it there. I think having the top track at 50% opacity and the bottom track at 100% with compositing set to the default alpha channel (no compositing) gives the same result as your method, but I feel much more comfortable with your method. In addition, your method is extensible to "n" captures, which is what I've been trying to figure out how to do for the past few days.<<

I had always understood that you meant to keep the 50% on top track. That's doing a semi averaging of the two signals. It had occurred to me that what you really wanted to do is add 2 signals at 50%. I think you give up a bit of dynamic range though, unless you have the space (inside the program) to add them at 100% with no overflow and then reduce the result by 50%. I think that is right mathematically anyway. You can't get back something you have given away so some detail may be lost. The overall improvement from a source with noticable random noise is probably worth it, though.

Spectrum analysers commonly average repetitive signals over time to greatly reduce the "grass" in the signal. This is similar to what you are doing.
RexA wrote on 10/7/2003, 2:01 AM
>>By contrast, I have actually done the work and seen the results, and the technique works.<<

I have thought from the beginning that your technique makes sense and was never surprised that it works. I think that the 50% on just one track might not be the best implementation, and wanted to try some experiments, as in other parts of the thread with talk of adding 2 tracks at 50%. I never found any time to try it.

RichMacDonald talked about some other approaches, and that might be good, but it can't be implemented inside Vegas (as far as I can see). Not sure about all his comments on the nature of this noise though. I think from a tape, Big random noise isn't likely, for instance.

The real bottom line is that the best improvement can't pull signals that aren't on the tape. On VHS there was limited signal recorded. Your method compensates for failures of the equipment to pull all the existing signal from the tape perfectly each time. That is valid on an analog system especially if the media has degenerated over time.

John, your methods are valid and thanks for sharing them. I do think it probably could be improved a bit more, but there is no doubt that in principle it makes sense.
drichard wrote on 10/7/2003, 3:51 PM
I am not familiar with the NRS (TS 6-10-100) plugin. What / where is it?

Thanks in advance,

Dean