logo Sign In

Temporal smoothing without nasty side effects

Author
Time
I've discovered a way of filtering video with a temporal smoother so the image is cleaner but with less motion blurring side effects than normal.
Basically you temporal filter the video once forwards, and once backwards, then merge the two avis together.

To do this I use two AviSynth scripts and VirtualDub:


script1.avs

AviSource("capture.avi")
Reverse()


script2.avs

AviSource("processed1.avi")
V2=AviSource("processed2.avi")
V2=Reverse(v2)
Merge(v2)



The steps you take are; open "capture.avi" in VirtualDub, apply only a temporal filter (in this case Dynamic Noise Reduction on the default (16) setting) and save the avi as huffyuv compressed "processed1.avi", then open "script1.avs" in that VirtualDub and save the avi as "processed2.avi".
Run a 2nd VirtualDub and open script2.avs, from there you have a cleaner source to work with which has been temporal smoothened but much reduced nasty side effects (notably less motion blur). Ideally you want "processed1.avi" and "processed2.avi" to be on different harddrives to avoid your harddrive being over-worked.


Tested it on a piece of captured VHS and the result is a lot better than just using one temporal smoother on forwards video. Only drawback is the sheer amount of harddrive space you need to do this with and the extra time it takes to process the source capture twice, I tried doing frame serving with two VirtualDubs so the forwards+reverse temporal smoothed videos are fed directly into an AviSynth script to avoid the intermediate avis but it didn't work, it applied temporal smoothing on forwards video only.
http://www.haku.co.uk/pics/LukeCruise.gif http://www.haku.co.uk/pics/dontcare.gif
***Citizen's NTSC DVD/PAL DVD/XviD Info and Feedback Thread***
Author
Time
Alternatively you could use a filter with motion tracking, that reduces or disables the temporal part of the noise reduction filtering when movement is detected. (This is what PixieDust does, apparently).

Upside is that hard drive space usage is kept low.

Downside is the processing time - I'm talking 12-14 hours per pass!

Guidelines for post content and general behaviour: read announcement here

Max. allowable image sizes in signatures: reminder here

Author
Time
I tried out this way of cleaning up captured video on The Making of Slipstream VHS and the results are very good, I figured all I had to do was create the temporal smoothed reverse avi, then feed that (reversed so it's played forward) with the captured avi temporal smoothed into the avisynth merge script, this way only 3 copies of the video were made (source capture avi, reverse smoothed avi, final m2v output).

It's a technique I'm intending on using on any future VHS capturing because whilst there is a small amount of noticable temporal smoothing it looks a lot more like natural blur than temporal smoothing because it was smoothed backwards and forwards.
http://www.haku.co.uk/pics/LukeCruise.gif http://www.haku.co.uk/pics/dontcare.gif
***Citizen's NTSC DVD/PAL DVD/XviD Info and Feedback Thread***
Author
Time
I think it's an interesting theory and it's encouraging to hear you have obtained good results.

Some time ago I attempted to use VirtualDub's temporal filter to clean up some VHS caps, but I was getting an awful residual image after every scene change - similar to what I noticed in the Cowclops V2 DVD screenshots, but worse.

Is the filter you used the same as the AVISynth TemporalSmoother function, which is apparently a direct port from VDub? If so, then you could probably refine your process to a single AVISynth script, saving on the amount of hard drive space required.

Here's a relevant thread on Doom9, which explains the difference betweeen "bidirectional" filtering used by TemporalSoften, for example, and a true forwards/backwards average function like you have written.

It'd be interesting to see how your method compares against other popular filters.

Guidelines for post content and general behaviour: read announcement here

Max. allowable image sizes in signatures: reminder here