Sign In

Enhancing LaserDisc Captures with AviSynth

Replies
6
Author
Time

If one is using a decent consumer player, could it be possible that you could use filters that might get you close to X0 quality? Not spot on, but close enough to save someone $2,000!

I captured a portion of my ANH Faces LaserDisc and ran the composite signal through a Line TBC / Comb Filter to convert the signal to S-Video before the signal ran into my Hauppauge USB-Live 2. After the IVTC process, I ran the video through AviSynth and did my work from there.

Here’s my current script that seems to do very smart and modest noise removal and sharpening. As you can see, nothing fancy, just one plugin:

AVISource(“LaserDisc.avi”)
ConverttoYV12()
MCTemporalDenoise(settings=“low”)

Results (includes basic levels adjustments):

http://screenshotcomparison.com/comparison/125702

It removes basic player noise and sharpens what’s left over. To my eye, this doesn’t look all that bad, but it could definitely still use some work. I’m interested to see if anyone knows of any filters that might further make this capture even better.

Here’s my raw IVTC’d clip for your disposal to test for yourselves:

https://we.tl/HvsspCOEWL

This post has been edited.

“That said, there is nothing wrong with mocking prequel lovers and belittling their bad taste.” - Alderaan, 2017

MGGA (Make GOUT Great Again):
http://originaltrilogy.com/topic/Return-of-the-GOUT-Preservation-and-Restoration

Author
Time

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:

Avisynth 2.6
Temporal Soften (this is an internal filter)
MVTOOLS2 (version 2.6.0.5 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”)
{
tradius=default(tradius,5)
#temporal radius-number of frames analyzed before/after current frame.

mthresh=default(mthresh,70)
#motion threshold-higher numbers denoise areas with higher motion.
#Anything above this number does not get denoised.

lumathresh=default(lumathresh,255)
#luma threshold- Denoise pixels that match in surrounding frames.
#255 is the maximum and default. 0-255 are valid numbers.
#Also adjusts chroma threshold.

blocksize=default(blocksize,4)
#larger numbers = faster processing times. Must be 4,8,16, or 32.

MT=default(MT,true)
#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.

prefilt=input.blur(1.58)
super=MSuper(input, pel=2,mt=MT)
superfilt=MSuper(prefilt,pel=2,mt=MT)

multivectors=Manalyse(superfilt,multi=true,delta=tradius,mt=MT)
multivectors2=Mrecalculate(superfilt,multivectors,thsad=mthresh,tr=tradius,mt=MT,blksize=blocksize,overlap=2)
mc=Mcompensate(input,super,multivectors2,thsad=mthresh,mt=MT,tr=tradius,center=true)
dnmc=mc.temporalsoften(tradius,lumathresh,lumathresh,15,2)
decimate=selectevery(dnmc,tradius * 2 + 1,tradius)
return(decimate)

}

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:

  1. Go download avisynth 2.6 and install it:
    https://sourceforge.net/projects/avisynth2/

  2. Download mvtools2. Navigate to the avisynth folder in Program Files and extract the mvtools2.dll file into the plugins folder inside the avisynth folder.
    http://ldesoras.free.fr/src/avs/mvtools-2.6.0.5.zip

  3. 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.

  4. open notepad and write a script to load the video file and denoise it. Here’s an example:

avisource(“c:\temp\starwars.avi”)
TSMC(5,120,255,4,true)

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.

  1. Open Virtualdub. Navigate to your starwars.avs file and open it in virtualdub. It should pop up in virtualdub already denoised via avisynth.

Luke threw twice…maybe.

Author
Time

Tried your script, but seem to keep getting an error message:

MSuper does not have a named argument “mt”
(TSMC.avsi, line 23)

Will this only work on 2.6? I currently have 2.5.8 installed.

This post has been edited.

“That said, there is nothing wrong with mocking prequel lovers and belittling their bad taste.” - Alderaan, 2017

MGGA (Make GOUT Great Again):
http://originaltrilogy.com/topic/Return-of-the-GOUT-Preservation-and-Restoration

Author
Time

It probably does need at least what I posted. I seem to remember that only 2.6 works with that version of MVTOOLS2. Also, you need at least that version of MVTOOLS2 or higher. The earlier versions use a different structure for the scripting that won’t work with the way I wrote the function.

The joys of avisynth. Am I right? 😁

Luke threw twice…maybe.

Author
Time

It was pretty painless for me. Mileage might vary I suppose. I had more troubles with going from win7 to win10 since avspmod stopped working for me. Somebody has patched it since then. Definitely backup your plugins folder to as many USB sticks as you can find. Worst case scenario, you can roll back to 2.5.8 if all else fails.

I have a lot of external filters loaded and there were maybe 2 that didn’t work right out of the cage with 2.6. It’s usually just a matter of finding the latest version on the wiki and overwriting it in the plugins folder.

Luke threw twice…maybe.

To the top