VideoHelp Forum
+ Reply to Thread
Results 1 to 16 of 16
Thread
  1. I'm capturing some old VHS tapes and have a JVC HR-S3500U and a VC500 capture device. I'm also using a Panansonic ES10 as a pass-thru device. I'm using S-Video cables and capturing at 720x480. I know the VCR isn't one of the top recommended, but so far I'm fine with the results.

    This is the script I've been using. I modify some of the settings for different captures.

    Code:
    #Denoiser script for interlaced video using MDegrain2
    
    
    function MDegrain2i2(clip source, int "blksize", int "overlap", int "dct")
    {
    Vshift=0 # 2 lines per bobbed-field per tape generation; original=2; copy=4 etc
    Hshift=0 # determine experimentally
    overlap=default(overlap,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
    #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))
    
    super = fields.MSuper(pel=2, sharp=1)
    backward_vec2 = super.MAnalyse(isb = true, delta = 2, blksize=blksize, overlap=overlap, dct=dct)
    forward_vec2 = super.MAnalyse(isb = false, delta = 2, blksize=blksize, overlap=overlap, dct=dct)
    backward_vec4 = super.MAnalyse(isb = true, delta = 4, blksize=blksize, overlap=overlap, dct=dct)
    forward_vec4 = super.MAnalyse(isb = false, delta = 4, blksize=blksize, overlap=overlap, dct=dct)
    
    #thSAD adjust amount of denoise default=400
    MDegrain2(fields,super, backward_vec2,forward_vec2,backward_vec4,forward_vec4,thSAD=700)
    
    #Optional sharpening steps
    #unsharpmask(50,3,0)
    #sharpen(0.1)
    
    Weave()
    }
    
    #--------------------------------------------------
    
    
    #Modify this line to point to your video file
    source=AVISource("Before.avi").AssumeTFF().ConvertToYV12(interlaced=true)
    
    #Only use chroma restoration for analog source material. Pick 1 option below.
    # Option 1, ccd
    LoadVirtualdubPlugin("E:\VHS\Programs\AviSynth\plugins\ccd\ccd_64bit.vdf", "ccd", 1)   #("path","name used in script",preroll always 1)
    chroma=source.ConvertToRGB32(interlaced=true).ccd(80,1).ConvertToYV12(interlaced=true)  #(1-100 default 30, Multi-thread off=0 on=1)
    
    #Option 2, Cnr2
    #chroma=source.Cnr2("oxx",8,16,191,100,255,32,255,false) #VHS
    #chroma=source.Cnr2() #VHS
    #chroma=source.Cnr2("xxx",4,5,255) #suggestion to remove rainbows.
    
    #(source,blksize,overlap,dct) Set overlap in line below to 0, 2, 4, 8. Higher number=better, but slower 
    #Denoise=MDegrain2i2(chroma,8,0,0)
    #Denoise=MDegrain2i2(chroma,8,4,0)  #Retains a little more detail, but slower
    Denoise=MDegrain2i2(chroma,4,2,0) #Better for retaining detail on flat surfaces, but slower still
    
    Denoise.QTGMC()
    
    Crop(14,0,-6,-8)
    AddBorders(10,4,10,4)
    
    Spline36Resize(640,480)
    
    return Last   #use for final output
    I'm deinterlacing and resizing because they are just being stored and played on my PC. They do not have to be DVD compliant and I'm happy with the results.

    I have a few captures with some noise and the above script doesn't seem to fix it. I don't know if it is a different kind of noise or what filters I need to use to make it better. I've attached an example. The "Before.avi" was captured with VDUB after using it's histogram to adjust levels. Of course levels can change scene to scene so I just get it adjusted as close as I can after watching different scenes. The "After.avi" is what I get with the above script.

    What can be done to make it better? What Avisynth/VDUB filters should I use? It doesn't have to be "perfect", I just want it to be better with what I have to work with.
    Image Attached Files
    Last edited by Micheal81; 6th Feb 2020 at 12:40.
    Quote Quote  
  2. Member
    Join Date
    Mar 2008
    Location
    United States
    Search Comp PM
    Thats' an incredible amount of noise and grain - is that how it is on the tape or something
    from the capture process?
    Quote Quote  
  3. Originally Posted by davexnet View Post
    Thats' an incredible amount of noise and grain - is that how it is on the tape or something
    from the capture process?
    That is how the tape is. It's that way even if I hook the VCR to a TV and play it. I recorded these tapes around 25 years ago when I was a kid.
    Quote Quote  
  4. Try
    Code:
    converttoYV12(interlaced=true)
    assumeTFF()
    separatefields()
    dfttest(sigma=500)
    weave()
    Last edited by Sharc; 6th Feb 2020 at 13:35.
    Quote Quote  
  5. Originally Posted by Sharc View Post
    Try
    Code:
    converttoYV12(interlaced=true)
    assumeTFF()
    separatefields()
    dfttest(sigma=500)
    weave()
    Should I add this to the above script or create a new script and use it on the "Before.avi"?
    Quote Quote  
  6. Originally Posted by Micheal81 View Post
    Originally Posted by Sharc View Post
    Try
    Code:
    converttoYV12(interlaced=true)
    assumeTFF()
    separatefields()
    dfttest(sigma=500)
    weave()
    Should I add this to the above script or create a new script and use it on the "Before.avi"?
    Just use this script on your source "Before.avi". Note that it is interlaced video 29.97fps, as per NTSC DVD standard.
    Change the value of sigma as you like.
    Last edited by Sharc; 6th Feb 2020 at 13:48.
    Quote Quote  
  7. Ok. That is better. I'll read more about dfttest and it's options. It may help with some other captures. Thanks for all the help so far.
    Quote Quote  
  8. Last edited by themaster1; 7th Feb 2020 at 03:19.
    *** DIGITIZING VHS / ANALOG VIDEOS SINCE 2001**** GEAR: JVC HR-S7700MS, TOSHIBA V733EF AND MORE
    Quote Quote  
  9. Originally Posted by themaster1 View Post
    Neat video was made for this kind of noise https://www.neatvideo.com/examples#tv1
    Thanks for the suggestion, but I can't afford to buy anything right now. Also, I rather use free stuff. I've spent all I'm going to spend on this project.
    Quote Quote  
  10. Originally Posted by Sharc View Post
    Originally Posted by Micheal81 View Post
    Originally Posted by Sharc View Post
    Try
    Code:
    converttoYV12(interlaced=true)
    assumeTFF()
    separatefields()
    dfttest(sigma=500)
    weave()
    Should I add this to the above script or create a new script and use it on the "Before.avi"?
    Just use this script on your source "Before.avi". Note that it is interlaced video 29.97fps, as per NTSC DVD standard.
    Change the value of sigma as you like.
    I was able to use dfttest within QTGMC and get pretty good results.
    Quote Quote  
  11. alright, try knlmeans at least:
    avisource
    assumetff()
    separatefields()
    Merge(Merge(last,KNLMeansCL(d=2,a=5,s=2,h=20),0.7) ,KNLMeansCL(d=1,a=6,s=4,h=10))
    weave()
    *** DIGITIZING VHS / ANALOG VIDEOS SINCE 2001**** GEAR: JVC HR-S7700MS, TOSHIBA V733EF AND MORE
    Quote Quote  
  12. The noise looks like what you would get with bad analog TV reception.

    With the newest versions of QTGMC you can also use KNLMeansCL as the QTGMC denoiser.
    Quote Quote  
  13. Member
    Join Date
    Mar 2008
    Location
    United States
    Search Comp PM
    Originally Posted by themaster1 View Post
    alright, try knlmeans at least:
    avisource
    assumetff()
    separatefields()
    Merge(Merge(last,KNLMeansCL(d=2,a=5,s=2,h=20),0.7) ,KNLMeansCL(d=1,a=6,s=4,h=10))
    weave()
    I attempted to try KNLMeansCL myself, but got code 126 when it attempted to load (loadplugin in Avisynth+ r2772.)
    Avsmeter said opencl.dll was missing. Found a copy of this dll in the latest Xmedia Recode (version 1.2.11.0 dated 11/2013),
    copied it into \Windows\Syswow64 but then I got this error.
    Could this be hardware related? Using motherboard video only.
    Thanks for any info

    I tried using temporaldegrain2 earlier; it's not as "clean" as your neat video version,
    but it retains more detail than the dfttest version posted earlier
    Code:
    temporaldegrain(degrain=3,ov=4,sigma=40,Blksize=16)
    Image Attached Images  
    Image Attached Files
    Last edited by davexnet; 7th Feb 2020 at 13:51.
    Quote Quote  
  14. Member
    Join Date
    Jan 2019
    Location
    Europe
    Search Comp PM
    Originally Posted by davexnet View Post
    Originally Posted by themaster1 View Post
    alright, try knlmeans at least:
    avisource
    assumetff()
    separatefields()
    Merge(Merge(last,KNLMeansCL(d=2,a=5,s=2,h=20),0.7) ,KNLMeansCL(d=1,a=6,s=4,h=10))
    weave()
    I attempted to try KNLMeansCL myself, but got code 126 when it attempted to load (loadplugin in Avisynth+ r2772.)
    Avsmeter said opencl.dll was missing. Found a copy of this dll in the latest Xmedia Recode (version 1.2.11.0 dated 11/2013),
    copied it into \Windows\Syswow64 but then I got this error.
    Could this be hardware related? Using motherboard video only.
    Thanks for any info

    I tried using temporaldegrain2 earlier; it's not as "clean" as your neat video version,
    but it retains more detail than the dfttest version posted earlier
    Code:
    temporaldegrain(degrain=3,ov=4,sigma=40,Blksize=16)
    You will need a gpu with opencl compability and drivers
    Quote Quote  
  15. Member
    Join Date
    Mar 2008
    Location
    United States
    Search Comp PM
    Originally Posted by Nilzzon View Post

    You will need a gpu with opencl compability and drivers
    Thanks for confirming this.
    Quote Quote  
  16. Video Restorer lordsmurf's Avatar
    Join Date
    Jun 2003
    Location
    dFAQ.us/lordsmurf
    Search Comp PM
    All VirtualDub, mostly NeatVideo.

    Easy error, easy clip.
    Image Attached Files
    Want my help? Ask here! (not via PM!)
    FAQs: Best Blank DiscsBest TBCsBest VCRs for captureRestore VHS
    Quote Quote  



Similar Threads

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