Compositing Mode to Eliminate VHS noise

johnmeyer wrote on 10/1/2003, 5:23 PM
I have captured a VHS tape twice and saved into two separate files. I put these above each other on two tracks, and align them exactly. Thus, I have two separate versions of the exact same tape.

Why?

Each time an analog tape is played, the random noise ("snow") is in different places. What I am trying to do blend two versions from two independent captures in order to get video that has less noise. What I want to do is come up with a composite that is the exact average of both videos, and which ends up at the same intensity level.

Any idea of how I can do this?

Comments

JonnyMac wrote on 10/1/2003, 5:31 PM
What if you sharpened one track (bottom) and slightly blurred the other (top), then brought the opacity of the top track down?
chrisgrand wrote on 10/1/2003, 5:33 PM
Add a composite envelope on each track. Then when a bad portion comes up, take the composite level of that track from 100% to 0% while making your second track go from 0% to 100%. Do that everytime you want to cut from one to the other. This leaves both full tracks intact, but using the good from each.

That's one way to do it.

CJ
farss wrote on 10/1/2003, 5:36 PM
I think if you composite the two tracks and select an appropriate composite mode will do what you want.

I'm pretty certain however that you will have aother issues to deal with.

I seriosuly doubt you can get two exact copies off the tape. Unless you are able to lock the VHS player to an external source each time you read the tape there will be a slight variation in speed so after a while you'll slip a frame. Averaging the two frames will give you the smae result as a motion blur.

You also have to deal with line jitter, if you can get hold of a SVHS machine with a TBC will help but probably it still will not be good enough to ensure that you get a pixel by pixel alignment over each line in the field.

If you want to get rid of the noise the median filter does a good job but at some loss of resolution. Given the low res of VHS to start with this may not be a big issue in any case. It's very slow to render but would seem an easier path than what you are trying to do.

At the end of the day VHS is what it is and I've yet to hear of any magic way to recover something that was lost when it was recorded.
johnmeyer wrote on 10/1/2003, 5:50 PM
What if you sharpened one track (bottom) and slightly blurred the other (top), then brought the opacity of the top track down?

Interesting idea. I played with this a little, but couldn't get anything good to happen.

Do that everytime you want to cut from one to the other.
I am eliminate the general noise on the tape. This is more or less constant throughout the tape, so whatever I do has to be a constant function for the whole tape.

I seriosuly doubt you can get two exact copies off the tape.

Interesting points. I know my old VHS deck (before Hi-Fi) had no servo, and I could actually adjust the speed by changing the setup adjustments (back in those days, I actually had the service schematics). I thought newer decks did a better job of locking. However, you may be right. So far I've only experimented with 30 seconds of tape.

FWIW, I have gotten a reasonable amount of reduction by simply setting the opacity of the top track to 50%, and not doing anything to the compositing mode. The effect is subtle, but noticeable, and there are no artifacts, unlike the various temporal filters I've tried using VirtualDub.

I'll report back as I progress. My goal is to find the "ultimate" way of scrubbing VHS prior to encoding to DVD.
JJKizak wrote on 10/1/2003, 7:22 PM
Since two perfectly phased audio signals combined in a combiner circuit will cut the noise by 3db and then 3 signals will cut it another 1.5db etc. you may be able to set up two or four video perfectly phased signalsto get some reduction with some form of variable control that varies each track by very small increments to get them phased up. The problem is that this works for video noise on an RF basis before it is processed and after it is processed it is then part of the signal and then you have a problem. Now you have to use special algorithims to logically eliminate the noise and then you have all of the Virtualdub-ETC video filters which so far are not impressive. The trick would be to somehow isolate just the noise from the video then use that to bust it 180 out of phase. The problem is agian that perfect phasing must be maintained. You might do some good with a "Cray" computer if you could afford it.

JJK
TheHappyFriar wrote on 10/1/2003, 7:22 PM
What kind of VHS noise are you refering to? Is it the "junk" on the bottom of the screen? sparkles? Lines? I capture from VHS tapes too (one was recorded 12years ago), and haven't had any noise except the stuff on the bottom of the screen (at least none that shouldn't be on there).

Did you try cleaning the heads of your VHS VCR with alcahol and Q-Tips? That is normaly the cause of crappy VHS video with me (unless the tape is crappy. :) )

johnmeyer wrote on 10/1/2003, 8:19 PM
What kind of VHS noise are you refering to?

VHS has all sorts of different noise, inherent in the process. These include red bleed, due to where the chroma signal gets cut off (in the analog realm); chroma banding (which can be pretty effectively be removed with the VirtualDub DeNoise filter; and just plain old analog video noise ("snow"), some of which is a function of the original S/N put on the tape, some due to aging, and some due to the way in which the signal is read from the head.

It is the "snow" that I am interested in removing via the multiple capture procedure. I have read many posts on other forums about this, and many people have reported extremely successful results. They have included posts of their results. Indeed, since my original post a few hours ago, I have done a simple blend of two captures and achieved a significant reduction in noise, and with none of the usual artifacts that one gets from temporal smoothing filters. As I reported in my second post, I simply set the opacity of the top track to 50%, and I think that gives me a result that is the simple average of the two tracks.

Unless anyone else comes up with other suggestions, I'm going to proceed using this approach. So far, getting the two captures to sync has not been a problem.
TheHappyFriar wrote on 10/1/2003, 9:12 PM
A much more complex way would be make an alpha channel from the top video's snow, apply it to the top layer, and show the bottom layer through it. Or chroma key the snow. Is it all black/white? It won't matter if you also chroma key other solid black/white things because the ones on the bottom will show through.
johnmeyer wrote on 10/1/2003, 10:29 PM
Interesting to read:

While not my immediate problem, it was nonetheless a good read. I do a lot of restoration work (audio, photos, video) and something like this may come in handy one day. I'm constantly finding new tricks. For instance, I just found a way to dramatically reduce the rainbows that occur at edit points on old videotapes made on machines without flying erase heads. I can get rid of about 80% of the rainbow with negligible effect on the rest of the video.

No back to my quest for less noise ...
Jay Gladwell wrote on 10/2/2003, 6:49 AM
This is a total stab in the dark...

I would imagine the only way to get two perfectly identical VHS tracks (as mentioned above) would be to use the same clip placed in two separate, synced tracks on the timeline.

Yes, no, maybe?
mcgeedo wrote on 10/2/2003, 7:59 AM
I have had good luck reducing VHS noise by passing it through a "temporal" filter. A filter of this kind averages the signal a bit from frame to frame. This averages out some of the noise, as you described in your method (which is also a kind of temporal filter). The only problem is that I have to use VirtualDub instead of Vegas to do the filtering, as I don't know of a temporal filter for Vegas.
johnmeyer wrote on 10/2/2003, 11:51 AM
I would imagine the only way to get two perfectly identical VHS tracks (as mentioned above) would be to use the same clip placed in two separate, synced tracks on the timeline.

That is true, and that is what I'm doing. That works fine. The one issue I am still trying to resolve is how to best combine the two tracks to get an average of the two, almost-identical clips. I want the resulting video to be the same brightness, contrast, etc. If two pixels are identical in both chroma and luma, the resulting pixel should be identical. However, where they are different (presumably because of a random noise pixel), I would like the average.

There have been extensive postings in other forums (VirtualDub and AVIsynth in particular), including pictures, and the results are really amazing. Also, using the only technique I've been able to devise so far (I set the opacity of the top track to 50%), the results are VERY good.

I was just hoping to get some insight or ideas as to whether this technique was truly giving me an average and, if not, whether there was some other technique that would.

I have had good luck reducing VHS noise by passing it through a "temporal" filter.

I'm doing this as well. I start with two chroma filters (DeNoise and Chroma) that do a spectacular job on the chroma noise. I really can't see any artifacts. These even reduce (almost eliminate in some cases) the rainbows due to non-flying erase head edits on old tapes. I then follow using the VirtualDub temporal smoother or the Casaburi temporal cleaner filter. These two filters produce spectacular results with well-lit video, but create very annoying artifacts with low-light noise video. Spot Remover actually has the best temporal cleaner of all (I turn off the spot removing facility since I don't need it), but it also is capable of producing the most artifacts on certain scenes. If I were doing this for hire, I'd selectively apply this filter to some scenes, and do no filtering on the rest.
craftech wrote on 10/2/2003, 9:12 PM
I downloaded Virtual Dub and installed a few of the plugins you mentioned.
It won't open my captured AVI files which I captured with Vegas Vid Cap 4.0d
The footage I captured has people singing under a spot with a pitch black background. It is intended for VHS distribution. Is Virtual Dub the correct program for this?
My first plan was to master on a DV master, then feed it to my duplicating rack through my Proc Amp. That works, but Virtual Dub sounded interesting.

John
jboy wrote on 10/2/2003, 10:15 PM
FYI all, though I'm srtictly a PC guy. I dimly recall that the mac had some kind of image averaging application that allowed the combining of two sub par images to yield a single good one. Dont recall if it was practical only for images, or dv also. I even more dimly, (and it's really getting dark now), recall, that one of the Adobe apps, Photoshop ?, Aftereffects ? Illustrator ?, may have had the same ability. Anybody know ?
jboy wrote on 10/2/2003, 10:20 PM
FYI all, though I'm srtictly a PC guy. I dimly recall that the mac had some kind of image averaging application that allowed the combining of two sub par images to yield a single good one. Dont recall if it was practical only for images, or dv also. I even more dimly, (and it's really getting dark now), recall, that one of the Adobe apps, Photoshop ?, Aftereffects ? Illustrator ?, may have had the same ability. Anybody know, because there seems to be recurring questions on this forum about how to restore old vhs tapes, but very few good answers-particularly concerning drop-outs ? I've posed this question a number of times myself on various forums, but have yet to locate any program that will do the job.
johnmeyer wrote on 10/2/2003, 11:22 PM
I downloaded Virtual Dub and installed a few of the plugins you mentioned.

Make sure you put the plugins in a subdirectory (under the directory where you installed VirtualDub). Call this subdirectory "plugins".

I do not know why your AVI files won't open. They should. Check out the "unofficial" VirtualDub forum here:

VirtualDub Forum
craftech wrote on 10/3/2003, 6:03 AM
I do not know why your AVI files won't open. They should. Check out the "unofficial" VirtualDub forum here:

http://virtualdub.everwicked.com
-----------------------------------------------
Thanks John,
I did check and apparently it's been posted lots of times. Most recently here:
http://virtualdub.everwicked.com/index.php?act=ST&f=5&t=4530&s=28f279d7a55c4622541dce276db23f37

The error message says:

"Couldn't locate decompressor for format 'dvsd' (unknown)
VirtualDub requires a Video For Windows (VFW) compatible codec
to decompress video. DirectShow codecs, such as those used by
Windows Media Player, are not suitable."

The answer on the forum was:

"This has been covered Many times in this Forum...The error Means Exactly what it says, You can Not open Video files that have been compressed useing Direct Show Codecs ,Plus V-Dub will Not accept DV AVI files that are Type 1 DV AVI files...If you want to Use Virtual Dub with DV AVI files they have to be compressed with a Type 2 VFW DV Codec Like "Panasonic VFW DV Codec" or the "Sony VFW DV Codec" or the "MainConcept VFW DV Codec"......Cheers "

I guess that means it won't open the SF captured files, but I certainly wouldn't ask on THAT forum. Maybe I'll search it further there without posting.

John

PS: Did a search and did not find a satisfactory answer. It seems that avi files captured with Vegas should open in Virtual Dub. Any ideas?
JJKizak wrote on 10/3/2003, 8:07 AM
John: There are two versions of Virtualdub, older and the newer that will accept mpg files. It is also kind of "picky" on what avi files it will open. I usually select the MainConcept DV codec stand alone or (decompressor or compressor) the Canapus DV codec (decompress only). Also download the filter operation instruction sheet. There are also many filters available for free download. The Main Concept DV codec has to be purchased separately.

JJK
John_Cline wrote on 10/3/2003, 8:24 AM
Regarding your Vegas DV .avi files not opening in Virtual Dub:

You need to install a VFW-compatible DV codec in Windows. The one from Main Concept is very good. The DV codec included in Vegas is only available within Vegas itself, it is not available to any third party applications, like Virtual Dub or After Effects.

John
BillyBoy wrote on 10/3/2003, 8:36 AM
There's another way. True you can't open SOME Vegas rendered files in VirturalDub. It has no problems with uncompressed AVI created in Vegas. Just to be sure it works on your system and if you have plenty of hard drive space test render a few seconds worth than see.
mcgeedo wrote on 10/3/2003, 8:39 AM
John,

Your captured files are in a "dvsd" compression format, which VirtualDub doesn't understand with it's basic codecs. You can search for what is known as the "panasonic" codec, like I did. Installing this codec will allow VirtualDub to read your captured files. Alternatively, you can render your files out using a codec that VirtualDub does have access to. I use uncompressed DV sometimes, to reduce the encoding/decoding generational degradation somewhat. The problem with that is the files are HUGE.

Good luck,
-Don
johnmeyer wrote on 10/3/2003, 1:23 PM
John,

I completely forgot about the need for the dvsd codec. It's been three years since I purchased the Mainconcept DV codec, which is how I solved the problem in Win98. I now use XP, and I had to install the Mainconcept DV codec to render back to DV, but perhaps it is still needed to read the files as well.

Just remember that you can use many (although not all) of the VirtualDub filters from within Vegas by using Satish's PluginPac. This eliminates the need to learn VirtualDub, purchase the Mainconcept codec, etc.
craftech wrote on 10/3/2003, 3:53 PM
Thanks guys,
I really appreciate the input. Lots of things to try.
John,
Your Satish plugin suggestion sounds like a good idea:

"Just remember that you can use many (although not all) of the VirtualDub filters from within Vegas by using Satish's PluginPac. This eliminates the need to learn VirtualDub, purchase the Mainconcept codec, etc. "

I think I'll try that.

John