VideoHelp Forum
+ Reply to Thread
Results 1 to 10 of 10
Thread
  1. https://www.youtube.com/watch?v=VdkN91zBTKk

    Is there a script I can reference or download that will achieve the same results as the video?
    Quote Quote  
  2. In the video information he said which filters he used. What do you want to know? His exact settings for each filter?
    Quote Quote  
  3. Yes but I'll play around with the variables myself and see if I can achieve the same results.
    Quote Quote  
  4. Google is your friend. Your creepy, stalker friend.
    https://www.google.com/search?q=The+power+of+Avisynth
    Quote Quote  
  5. Thanks for the Google tip. Those are for 8mm films but I'll search for VHS.
    Quote Quote  
  6. Video Restorer lordsmurf's Avatar
    Join Date
    Jun 2003
    Location
    dFAQ.us/lordsmurf
    Search Comp PM
    All the person has done is standard chroma shift, chroma noise suppression, and slight denoise. The chroma work is only so-so. Nothing overly special there.

    I could do better with the same tape.

    That's not Fred's channel.

    I'd be more interested in what you want to know, not in helping recreate a sample that is only decent (not excellent) to begin with.
    Want my help? Ask here! (not via PM!)
    FAQs: Best Blank DiscsBest TBCsBest VCRs for captureRestore VHS
    Quote Quote  
  7. Thanks lordsmurf. I'm reading some of your scripts through Google. I will post if I have any questions.
    http://www.digitalfaq.com/forum/news/5895-coming-lordsmurfs-avisynth.html

    Edit: Looks like getting a VCR with DNR produce better results than Avisynth.
    http://www.digitalfaq.com/forum/video-restore/565-vhs-chroma-flaws.html
    Last edited by digicube; 23rd Apr 2017 at 15:08.
    Quote Quote  
  8. I am not a fan of the NR circuits built into VCRs. My advice is to turn them off and forget they exist. The reason? They use a 1990s analog approach to filtering noise. While there is absolutely nothing wrong with analog circuits (my EE degree was from a time when all we had was analog signal processing), they are no match for the sophistication of modern digital signal processing. For instance, to get rid of the typical gain noise (the little dancing dots), the VCR NR simply adds smoothing via a simple low-pass circuit.

    You absolutely MUST turn off this noise reduction, or you will lose a huge amount of detail in your VHS captures. In fact, the situation is even worse than you might think because many VCRs have the noise reduction enabled by default and you then have to look in the VCR setup menu, or on the hidden panel on some VCRs for a switch or setting that is often labeled something like "Edit." This edit switch, when turned on, actually turns off the noise reduction (confusing, eh?). You will see more dancing dots once you turn off all NR and turn on the edit switch, but you will also find that you can see a lot more detail (look at the fabric on a sweater, as one example). Using motion compensated noise reduction in AVISynth, you will be able to preserve almost all of this newly-discovered detail, while still dramatically reducing the noise. However, if you don't do as I advise, that detail will never be captured when you digitize your tapes, and it is lost forever.

    One aside: once you start using AVISynth scripts to restore your VHS captures, resist all temptation to "turn up" the noise reduction settings too far. Every neophyte (including me!!) makes the mistake, when they initially see some of the noise disappear, of turning up the settings until ALL the noise goes away. What you will find, after you get over your initial giddiness of having killed all the noise, is that you have introduced all sorts of weird artifacts that may actually be more distracting than the noise. Also, you may find that have started to kill off detail. This is also why, as you will find, not all noise reduction technology is the same. Some of the older stuff is pretty crude and kills off as much detail as noise, and introduces weird artifacts.

    The famous saying captures the noise reduction ethos: less is more.

    Back to the story ... To make the picture "look better," the VCR designers also often added additional ringing around light/dark transitions (similar to a digital sharpening algorithm), but they did it with a peaking capacitor, an amazingly crude approach to the problem.

    Finally, VHS chroma noise actually has many causes, including alignment issues in the VCR itself (it is more prevalent in LP than in SP recordings). You may find that a different VCR will help for some, but not all tapes.

    So, bottom line: you will get MUCH better results doing all this with digital algorithms than with NR built into the VCR.

    You also need to look into better denoising algorithms than those used in the scripts found in those links given above. Motion compensated denoising, like that which is used in MDegrain (part of MVTools2) is much better.

    Here is something to start with. If you search over at doom9.org, you will find they have a LOT of really good VHS restoration scripts. You will also find lots of discussions about denoising. There are some algorithms that might be even better than MDegrain2.

    Code:
    #Denoiser script for interlaced video using MDegrain2
    
    SetMemoryMax(768)
    
    Loadplugin("C:\Program Files\AviSynth 2.5\plugins\MVTools\mvtools2.dll")
    LoadPlugin("c:\Program Files\AviSynth 2.5\plugins\CNR\Cnr2.dll")
    
    source=AVISource("E:\fs.avi").killaudio().AssumeBFF().ConvertToYV12()
    
    chroma=source.Cnr2("oxx",8,16,191,100,255,32,255,false) #VHS
    
    #Other block size and overlap can produce better results, depending on source.
    #8,4,400,0 means block size of 8; overlap of 4, denoising strength of 400, and dct=0)
    output=MDegrain2i2(chroma,8,4,400,0)  
    return output
    
    #Optional Debugging output - pick one of the following three approaches to seeing "before/after"
    
    #stackvertical(source,output)
    
    #stackhorizontal(source,output)
    
    #Remove /* */ comment delimeters from the following debugging display to see the original frame followed immediately
    #by the restored frame.
    /*
    return Interleave(
    \    source
    \  , output
    \ )
    */
    
    
    #-------------------------------
    
    function MDegrain2i2(clip source, int "blocksize", int "over", int "denoising_strength", int "dct")
    {
      Vshift=0 # 2 lines per bobbed-field per tape generation (PAL); original=2; copy=4 etc
      Hshift=0 # determine experimentally 
      overlap=default(over,0) # overlap value (0 to 4 for blksize=8)
      dct=default(dct,0) # use dct=1 for clip with light flicker
    
      fields=source.SeparateFields() # separate by fields
    
      #This line gets rid of vertical chroma halo - use for VHS 2nd generation
      #fields=MergeChroma(fields,crop(fields,Hshift,Vshift,0,0).addborders(0,0,Hshift,Vshift))
    
      #This line will shift chroma down and to the right instead of up and to the left
      #fields=MergeChroma(fields,Crop(AddBorders(fields,Hshift,Vshift,0,0),0,0,-Hshift,-Vshift))
    
      prefiltered = RemoveGrain(fields,2)
      superfilt =   MSuper(prefiltered, hpad=32, vpad=32,pel=2)
      super=        MSuper(fields,      hpad=32, vpad=32,pel=2)
    
      halfblksize= (blocksize>4)   ? blocksize/2 : 4
      halfoverlap= (over>2)        ? over/2      : 2
    
      bvec1 =  MAnalyse(superfilt, isb = true,  delta = 2, blksize=blocksize, overlap=over,dct=dct)
      bvec1 =  MRecalculate(super, bvec1, blksize=halfblksize, overlap=halfoverlap,thSAD=100) 
    
      fvec1 =  MAnalyse(super, isb = false, delta = 2, blksize=blocksize, overlap=over,dct=dct)
      fvec1 =  MRecalculate(super, fvec1, blksize=halfblksize, overlap=halfoverlap,thSAD=100)
    
      bvec2 =  MAnalyse(super, isb = true,  delta = 4, blksize=blocksize, overlap=over,dct=dct)
      bvec2 =  MRecalculate(super, bvec2, blksize=halfblksize, overlap=halfoverlap,thSAD=100)
    
      fvec2 =  MAnalyse(super, isb = false, delta = 4, blksize=blocksize, overlap=over,dct=dct)
      fvec2 =  MRecalculate(super, fvec2, blksize=halfblksize, overlap=halfoverlap,thSAD=100)
    
      denoised = fields.MDegrain2(super, bvec1,fvec1,bvec2,fvec2,thSAD=denoising_strength)
    
    
    /*
      #Optional sharpening (I don't normally use this)
      #Add/remove comments to pick which algorithm (unsharp or unsharpHQ) you want to use
      even=selecteven(denoised)
      odd= selectodd (denoised)
      denoised = interleave( unsharpmask(even,30,3,4), unsharpmask(odd,30,3,4) )
    
      #The following is an alternate sharpener 
      #denoised = interleave( UnsharpHQ(even,THRESHOLD=20, SHARPSTR=4.0, SMOOTH=0.5, SHOW=false), UnsharpHQ(odd,THRESHOLD=20, SHARPSTR=4.0, SMOOTH=0.5, SHOW=false) )
    */
    
      Weave(denoised)
    }
    Quote Quote  
  9. Thanks johnmeyer for reminding me of doom9.org, that was an informative write-up. I concur with your sentiment, digital > analog. I will turn off DNR and try out your script and lordsmurf's.
    Last edited by digicube; 23rd Apr 2017 at 16:53.
    Quote Quote  
  10. BTW, the script I posted is one I've used, with variations, for quite a number of years. However, based on developments in AVISynth, documented at doom9.org, I am starting to experiment with even more modern technology. If you are geeky, and want to see some of what is available, skim this thread:

    An experiment trying to convince people to move on with obsolete denoisers

    Some of the results look pretty darned good.
    Quote Quote  



Similar Threads

Visit our sponsor! Try DVDFab and backup Blu-rays!