Temporal Soften Motion Compensated
This is what I use on laserdiscs nowadays as it seems to be better at removing the analog noise of laserdiscs.
It’s quite simple actually and the dependencies are only:
Temporal Soften (this is an internal filter)
MVTOOLS2 (version 18.104.22.168 or similar)
The only things you really need to tinker with are tradius(temporal radius) and mthresh(motion threshold). Everything else I never change but I put them in as options in case you want to change the blocksize, for example. The only thing I ever adjust actually is mthresh.
mthresh=70 will denoise basically only stationary stuff.
mthresh=120 will denoise slightly moving stuff.
mthresh=180 will denoise moving stuff but not extremely high motion.
Anything over 180(depending on the source) can start to risk loss of detail that, imo, is unacceptable. However, 70-120 denoises A LOT but still looks good.
function TSMC(clip input, int “tradius”, int “mthresh”, int “lumathresh”, int “blocksize”, bool “MT”)
#temporal radius-number of frames analyzed before/after current frame.
#motion threshold-higher numbers denoise areas with higher motion.
#Anything above this number does not get denoised.
#luma threshold- Denoise pixels that match in surrounding frames.
#255 is the maximum and default. 0-255 are valid numbers.
#Also adjusts chroma threshold.
#larger numbers = faster processing times. Must be 4,8,16, or 32.
#turn multi-threading on or off. If you are using single threaded avisynth this should be true.
#If you are using multi-threaded avisynth this should be false.
decimate=selectevery(dnmc,tradius * 2 + 1,tradius)
I want to add that if anybody has any ideas to make this better feel free to chime in. I’m by no means an avisynth guru and am open to improvement!
A quick how to use avisynth and this denoiser:
Go download avisynth 2.6 and install it:
Download mvtools2. Navigate to the avisynth folder in Program Files and extract the mvtools2.dll file into the plugins folder inside the avisynth folder.
Open notepad and copy the code from the first post into it and save it as TSMC.avsi. Place this also into your avisynth plugins folder.
open notepad and write a script to load the video file and denoise it. Here’s an example:
Save this wherever you want it as starwars.avs or whatever you want to name it. Just make sure you have .avs as the extension.
- Open Virtualdub. Navigate to your starwars.avs file and open it in virtualdub. It should pop up in virtualdub already denoised via avisynth.