digitalFAQ.com Forum

digitalFAQ.com Forum (http://www.digitalfaq.com/forum/)
-   Restore, Filter, Improve Quality (http://www.digitalfaq.com/forum/video-restore/)
-   -   VHS restore filters using Avisynth and VirtualDub - advice? (http://www.digitalfaq.com/forum/video-restore/5807-vhs-restore-filters.html)

Zoink187 03-23-2014 08:57 AM

VHS restore filters using Avisynth and VirtualDub - advice?
 
Hello,

I am seeking advice on avisynth scripts and virtualdub filters that are typically applied to vhs captures. I used lagarith lossless yuy2 for my capture. After I apply these filters, I'm going straight into avstodvd. It's a home movie. Thanks.

themaster1 03-23-2014 01:43 PM

A typical script for my own vhs recordings would be this:

Code:

AVISource("E:\MyVideo.avi").trim(8083,14591)
assumetff()
resampleaudio(48000) # audio resampling because my caps are 32khz
converttoyv12(interlaced=true)
ylevels(0,1.000,255,16,255) # adjust Luma levels only (adjust according to your needs)
tweak(sat=1.2,cont=1.0,bright=0,coring=false) # adjust saturation, contrast, etc...
########################
pointresize(last.width, last.height*2).ConverttoRGB32(matrix="rec601",interlaced=true).pointresize(last.width, last.height)
separatefields()
## Remove some chroma noise with CCD in RGB (gives best results)
## pointresizing for lossless RGb <> YCrCb convertion
LoadVirtualDubPlugin("C:\Program Files (x86)\virtualdubmod1.5\plugins\Camcorder_Color_Denoise_sse2.vdf", "CCD", 1)
CCD(15,1) # from 0 to 100 # Default =30 / 15-30 = best results
# Sharpening (small-medium) with msu smart sharpen
LoadVirtualDubPlugin("C:\Program Files (x86)\VirtualDub\plugins\msu_sharpen.vdf", "MSUSmartSharpen", 1)
MSUSmartSharpen(1) # from  0 (small overall)  to  5 (mad)
weave()
pointresize(last.width, last.height*2).converttoyv12(matrix="Rec601",interlaced=true).pointresize(last.width, last.height)
###################
# Denoising with Mdegrain1  for not too strong noise and interlaced source
fields=AssumeTFF().SeparateFields() # or AssumeBFF
super = MSuper(fields)
backward_vec2 = MAnalyse(super, isb = true, delta = 2, overlap=2)
forward_vec2 = MAnalyse(super, isb = false, delta = 2, overlap=2)
MDegrain1(fields, super, backward_vec2,forward_vec2,thSAD=400)
Weave()


Zoink187 03-23-2014 06:47 PM

Do I have to open virtualdub to apply these settings?

themaster1 03-24-2014 04:19 AM

nope you don't, you need the filters though

Zoink187 03-24-2014 08:10 AM

Ok. I'm going to google those filters and "load" them. Is it possible to open avstodvd and then open file>, and then load the script? In other words, will avstodvd do the avisynth script conversions within the program itself?

lordsmurf 03-24-2014 09:02 AM

I prefer to use a very hands off + custom approach. I'm not overly fond of Avisynth denoising, and hate Avisynth weave() because it can cause interlace damage with some filters. I prefer VirtualDub as much as possible, but will use Avisynth wherever VirtualDub is weak.

I'll share it when I get up (about to go to bed here).

themaster1 03-24-2014 10:44 AM

Quote:

Originally Posted by Zoink187 (Post 31065)
Ok. I'm going to google those filters and "load" them. Is it possible to open avstodvd and then open file>, and then load the script? In other words, will avstodvd do the avisynth script conversions within the program itself?

for ccd:
http://www.mediafire.com/download/0o5d8obxvtjfu6z/Camcorder_Color_Denoise_sse2.vdf

Zoink187 03-24-2014 12:33 PM

Thanks! I had read somewhere that there is a "lord smurf virtualdub". Is that still relevant and applicable today? And if so, where can I get a shiny new download of that? :)

Quote:

Originally Posted by lordsmurf (Post 31069)
I prefer to use a very hands off + custom approach. I'm not overly fond of Avisynth denoising, and hate Avisynth weave() because it can cause interlace damage with some filters. I prefer VirtualDub as much as possible, but will use Avisynth wherever VirtualDub is weak.

I'll share it when I get up (about to go to bed here).

Ok! I'm looking forward to that post

Quote:

Originally Posted by themaster1 (Post 31061)
A typical script for my own vhs recordings would be this:

Code:

AVISource("E:\MyVideo.avi").trim(8083,14591)
assumetff()
resampleaudio(48000) # audio resampling because my caps are 32khz
converttoyv12(interlaced=true)
ylevels(0,1.000,255,16,255) # adjust Luma levels only (adjust according to your needs)
tweak(sat=1.2,cont=1.0,bright=0,coring=false) # adjust saturation, contrast, etc...
########################
pointresize(last.width, last.height*2).ConverttoRGB32(matrix="rec601",interlaced=true).pointresize(last.width, last.height)
separatefields()
## Remove some chroma noise with CCD in RGB (gives best results)
## pointresizing for lossless RGb <> YCrCb convertion
LoadVirtualDubPlugin("C:\Program Files (x86)\virtualdubmod1.5\plugins\Camcorder_Color_Denoise_sse2.vdf", "CCD", 1)
CCD(15,1) # from 0 to 100 # Default =30 / 15-30 = best results
# Sharpening (small-medium) with msu smart sharpen
LoadVirtualDubPlugin("C:\Program Files (x86)\VirtualDub\plugins\msu_sharpen.vdf", "MSUSmartSharpen", 1)
MSUSmartSharpen(1) # from  0 (small overall)  to  5 (mad)
weave()
pointresize(last.width, last.height*2).converttoyv12(matrix="Rec601",interlaced=true).pointresize(last.width, last.height)
###################
# Denoising with Mdegrain1  for not too strong noise and interlaced source
fields=AssumeTFF().SeparateFields() # or AssumeBFF
super = MSuper(fields)
backward_vec2 = MAnalyse(super, isb = true, delta = 2, overlap=2)
forward_vec2 = MAnalyse(super, isb = false, delta = 2, overlap=2)
MDegrain1(fields, super, backward_vec2,forward_vec2,thSAD=400)
Weave()


I applied this code and when I open my video file, My virtualdub screen is gray and I can't see anything. I installed xvid and divx because I got the error about the VFW compression needed to make my yuv2 .avi into YV12. Any suggestions? Should I uninstall everything and install divx? I have win7 32.

themaster1 04-05-2014 05:34 PM

HUH ? if you have huffyuv installed it should be decoded normally if it's another codec i don't know
Try directshowsource instead of avisource, perhaps you'll have better luck

premiumcapture 04-09-2014 10:59 AM

Quote:

Originally Posted by lordsmurf (Post 31069)
I prefer to use a very hands off + custom approach. I'm not overly fond of Avisynth denoising, and hate Avisynth weave() because it can cause interlace damage with some filters. I prefer VirtualDub as much as possible, but will use Avisynth wherever VirtualDub is weak.

I'll share it when I get up (about to go to bed here).

I agree with this. 'Measure twice, cut once.' The more you do during capture, the more you limit your ability to restore later on. It can be a good fix if a batch of tapes are all from the same source, but results can vary wildly between tapes and productions with any capture filter. Interlacing, deinterlacing, and avisynth need to be done very carefully. As stated, videos can be damaged depending on the filters used as some take in interlaced content and others progressive.

This type of script will undoubtedly save much time, and may work for many tapes, but I prefer the slow route and capture first, filter second.

sanlyn 04-21-2014 05:24 PM

Quote:

Originally Posted by Zoink187 (Post 31059)
Hello,

I am seeking advice on avisynth scripts and virtualdub filters that are typically applied to vhs captures. I used lagarith lossless yuy2 for my capture. After I apply these filters, I'm going straight into avstodvd. It's a home movie. Thanks.

I don't think there are any "typical" Avisynth/VirtualDub filters for VHS fixup and restoral, because there is no "typical" VHS source. True, there are common problems found frequently with VHS, and often very specific filters are needed. But the same filters, settings and procedures can't be used for with every VHS project. In fact, often you can't even use the same filters and settings for different scenes from the same VHS tape.

I was unable to download your sample avi, which has been removed. Meanwhile, I see you're trying to get started in Avisynth with Avisynth MT. I'd stick with Avisynth 2.5.8 until you get a better understanding of how to work with Avisynth and its filters. While Avisynth is often essential for some basic VHS fixes, I agree that much can be accomplished with VirtualDub, and VirtualDub is easier to learn. I've seen some of your sample videos is other forums; they are quite problematic. However, you can't just throw copied scripts at video and not know what some of those filters are doing. In many cases, the filters you see in complex Avisynth scripts and VirtualDub setups aren't even needed. You will have to go through a little reading and ask some questions before you can spruce up VHS, and it's something you would have to do with even the "easiest" and most simple software processors.

As lordsmurf and others have noted, it's very easy to over-process VHS. Learning to do it correctly is a slow process at first, but you only have to learn it once. Meanwhile, I'm sorry I missed your sample.

lordsmurf 07-23-2014 07:28 AM

Quote:

Originally Posted by sanlyn (Post 31545)
I don't think there are any "typical" Avisynth/VirtualDub filters for VHS fixup and restoral, because there is no "typical" VHS source. True, there are common problems found frequently with VHS

The biggest issues with VHS are:
- chroma noise -- see also: http://www.digitalfaq.com/forum/vide...oma-flaws.html
- color cast/contrast issues; various filters need be used
- grain -- Temporal Smoother in VirtualDub, or maybe TTempSmooth in Avisynth
- audio hiss -- and you need an audio editor like Sound Forge and/or Audacity

See also http://www.digitalfaq.com/forum/vide...html#post32962

themaster1 07-23-2014 01:02 PM

And you have forgotten the infamous chroma shift. It can be a serious issue (easily fixable generally) depending on the tape.

lordsmurf 07-24-2014 09:38 PM

I knew I was forgetting something. :smack:

Yes, both chroma noise + chroma shift (color bleed) are typical VHS errors. Fixing the shift makes it sharper, as well as making it look overall better.


All times are GMT -5. The time now is 03:10 PM

Site design, images and content © 2002-2019 The Digital FAQ, www.digitalFAQ.com
Forum Software by vBulletin · Copyright © 2019 Jelsoft Enterprises Ltd.