VideoHelp Forum

Try DVDFab and download streaming video, copy, convert or make Blu-rays,DVDs! Download free trial !
+ Reply to Thread
Results 1 to 15 of 15
Thread
  1. I'm capturing VHS tapes of TV shows I recorded around 25 years ago. I 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'm mostly using Avisynth and VDub. I'm mostly happy with the results I've been getting.

    Some of the captures have this double image or halo. What is it and is there anyway to fix it with what I have? The tapes were recorded from OTA TV mostly.

    Thanks for the help.
    Image Attached Files
    Quote Quote  
  2. Multipath reception? This is close:
    Code:
    function ShiftRight(clip v, int pixels)
    {
        Crop(v,0,0,-pixels,-0)
        AddBorders(pixels,0,0,0)
    }
    
    #call with:
    src = last
    Overlay(last, ShiftRight(last, 8), mode="subtract", opacity=0.15).ColorYUV(gain_y=40)
    MergeChroma(last, src)
    Play with shift, opacity and gain.
    Quote Quote  
  3. Originally Posted by jagabo View Post
    Multipath reception? This is close:
    Code:
    function ShiftRight(clip v, int pixels)
    {
        Crop(v,0,0,-pixels,-0)
        AddBorders(pixels,0,0,0)
    }
    
    #call with:
    src = last
    Overlay(last, ShiftRight(last, 8), mode="subtract", opacity=0.15).ColorYUV(gain_y=40)
    MergeChroma(last, src)
    Play with shift, opacity and gain.
    That helps. I'll try to adjust it more later.
    Quote Quote  
  4. It's not a great fix. It works pretty well in some places, not so well in others.
    Quote Quote  
  5. Could also be magnetic image transfer since the tape had been wrapped around itself for ages, magnetic image signal on one part of the tape could transfer to another part of the tape wrapped above/below it.
    Quote Quote  
  6. Another problem is the strong oversharpening halos from the VHS deck -- and the subtraction maks them worse. Dehalo_alpha() can reduce them but it damages the picture.

    Code:
    LWLibavVideoSource("Cap.avi") 
    AssumeTFF()
    ConvertToYV12(interlaced=true)
    QTGMC(preset="fast")
    src = last
    
    Dehalo_Alpha(rx=7.0, ry=1.0, darkstr=0.8, brightstr=0.8)
    Overlay(last, ShiftRight(last, 8), mode="subtract", opacity=0.15).ColorYUV(gain_y=40)
    MergeChroma(last, src)
    Quote Quote  
  7. Member Cornucopia's Avatar
    Join Date
    Oct 2001
    Location
    Deep in the Heart of Texas
    Search PM
    Originally Posted by babygdav View Post
    Could also be magnetic image transfer since the tape had been wrapped around itself for ages, magnetic image signal on one part of the tape could transfer to another part of the tape wrapped above/below it.
    You are thinking of pre- and post- echo due to bleedthrough of the magnetism in the layers. But while that's true of audio tape, this doesn't happen the same way with helical-scanned analog video tape (and doesn't happen at ALL with digital tape). A true bleedthrough of another earlier or later frame would have its sync, vertical interval, everything be shifted. And in doing so, it wouldn't maintain sync - it can only sync to one signal and anything else that comes through is garbage. It's not like the frames would overlay exactly the amount of the spool wind (which changes throughout).

    Good try though.
    Very likely multipath, as was mentioned.

    Scott
    Quote Quote  
  8. I'm finding tapes that have 5 or even more of these faint images. They are mostly off to the right side of objects. I've attached an example.
    Image Attached Files
    Quote Quote  
  9. Multigeneration VHS copy? FineDehalo2 and FineDehalo gets rid of a lot of it:

    original+qgtmc | finedehalo+qtgmc
    Image
    [Attachment 52587 - Click to enlarge]
    Quote Quote  
  10. I'm pretty sure the artifact in the original capture is chroma offset, something that is quite typical of VHS, especially VHS copies. You'll note that the halo is prominent around his red shirt and the model's flesh-colored legs, but absent from the black table legs.

    Here is some code I had lying around from one of my old VHS denoising scripts. The several lines that do the chroma shift are commented out, because I don't usually use them. This is the key line:

    fields=MergeChroma(fields,crop(fields,Hshift,Vshif t,0,0).addborders(0,0,Hshift,Vshift))

    Other people in this forum have posted code for manipulating the chroma separately from the luma and may have better solutions to suggest.

    Here's the old VHS denoising script (your video needs denoising even more than dehaloing).

    Code:
    #Denoiser script for interlaced video using MDegrain2
    
    SetMemoryMax(1024)
    
    Loadplugin("E:\Documents\My Videos\AVISynth\AVISynth Plugins\plugins\MVTools\mvtools2.dll")
    LoadPlugin("E:\Documents\My Videos\AVISynth\AVISynth Plugins\plugins\Cnr2.dll")
    LoadPlugin("E:\Documents\My Videos\AVISynth\AVISynth Plugins\plugins\Film Restoration\Script_and_Plugins\RemoveGrainSSE2.dll")
    
    #The following are only needed if using LimitedSharpenFaster
    #loadPlugin("E:\Documents\My Videos\AVISynth\AVISynth Plugins\plugins\QTGMC\mt_masktools-26.dll")
    #loadPlugin("E:\Documents\My Videos\AVISynth\AVISynth Plugins\plugins\QTGMC\mt_masktools-25.dll")
    #Import("E:\Documents\My Videos\AVISynth\AVISynth Plugins\plugins\Film Restoration\VideoFred's 2014 Script 06_2012\sourcecode\MT_Masktools\masktools\LimitedSharpenFaster.avsi")
    
    SetFilterMTMode("MDegrain2",     MT_MULTI_INSTANCE) 
    SetFilterMTMode("MAnalyse",      MT_MULTI_INSTANCE) 
    SetFilterMTMode("MRecalculate",  MT_MULTI_INSTANCE) 
    SetFilterMTMode("MSuper",        MT_MULTI_INSTANCE) 
    SetFilterMtMode("AVISource",     MT_SERIALIZED)
    
    source=AVISource("E:\fs.avi").killaudio().AssumeBFF().ConvertToYV12()
    
    #Only use chroma restoration for analog source material
    chroma=source.Cnr2("oxx",8,16,191,100,255,32,255,false) #VHS
    #chroma=source.Cnr2("oxx",8,14,191,75,255,20,255,false) #Laserdisc 
    #chroma=source
    
    output = MDegrain2i2(chroma,8,4,400,0)  #Needs higher denoising parameter than script w/o MRecalculate
    
    #output=MDegrain2i2(chroma,16,4,400,0)  #Needs higher denoising parameter than script w/o MRecalculate
    #output=MDegrain2i2(chroma,8,4,400,0)  #Needs higher denoising parameter than script w/o MRecalculate
    #output=IResize(output,720,480)
    
    #stackvertical(source,output)
    #stackhorizontal(source,output)
    
    #return output.Levels(16, 1, 235, 0, 255, coring=false)
    output
    
    /*
    return Interleave(
    \    source
    \  , output
    \ )
    */
    
    # Enable MT!
    Prefetch(6)
    #-------------------------------
    
    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)
    
      #UnsharpMask( clip , int "strength" , int "radius" , int "threshold" ) 
      #strength: strength. The default is 64.
      #radius: the scope of the blurring process. The default is 3.
      #threshold: threshold. Absolute value of the processing component is greater than the threshold blur. The default is 8.
    
      #Unsharpmask sharpening
      even=selecteven(denoised)
      odd= selectodd (denoised)
      denoised = interleave( unsharpmask(even,30,3,4), unsharpmask(odd,30,3,4) )
      #The following seems to be a better sharpener for VHS
      #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) )
    
    
      #LimitedSharpen sharpening. This function may be unstable under SetMTMode. 
      #even=selecteven(denoised)
      #odd= selectodd (denoised)
      #denoised = interleave( LimitedSharpenFaster(even,strength=550), LimitedSharpenFaster(odd,strength=550) ) #Default strength=150
      #denoised = interleave( LimitedSharpenFaster(even,smode=1,strength=160,overshoot=50,radius=2, ss_X=1.5, SS_Y=1.5,dest_x=720,dest_y=240), LimitedSharpenFaster(odd,smode=1,strength=160,overshoot=50,radius=2, ss_X=1.5, SS_Y=1.5,dest_x=720,dest_y=240) )
    
      #Use these two lines if there is more noise in one field than the other
      #denoised_s = fields.MDegrain2(super, bvec1,fvec1,bvec2,fvec2,thSAD=denoising_strength*3)
      #Weave (interleave (denoised.selecteven (), denoised_s.selectodd ()))
    
      Weave(denoised)
    }
    
    function IResize(clip Clip, int NewWidth, int NewHeight) {
      Clip
      SeparateFields() 
      Shift=(GetParity() ? -0.25 : 0.25) * (Height()/Float(NewHeight/2)-1.0)
      E  = SelectEven().Spline36resize(NewWidth, NewHeight/2, 0,    Shift)
      O  = SelectOdd( ).Spline36resize(NewWidth, NewHeight/2, 0,   -Shift)
      Ec = SelectEven().Spline36Resize(NewWidth, NewHeight/2, 0,  2*Shift)
      Oc = SelectOdd( ).Spline36Resize(NewWidth, NewHeight/2, 0, -2*shift)
      Interleave(E, O)
      IsYV12() ? MergeChroma(Interleave(Ec, Oc)) : Last
      Weave()
    }
     
    
    function Remove_TearsI(clip source) 
    {
    
    ml           = 100 # mask scale
    scene_change = 200 # scene change
    
    fields=source.SeparateFields()
    even_fields=selecteven(fields)
    odd_fields =selectodd(fields)
    
    even_result_fields = RemoveTears(even_fields,ml,scene_change)
    odd_result_fields  = RemoveTears(odd_fields, ml,scene_change)
    
    #=================
    #Put even and odd fields back together into interlaced video
    
    interleave(even_result_fields,odd_result_fields)
    weave()
    
    } # End Function RemoveTearsI
    
    function RemoveTears(clip source, int ml, int scene_change) 
    {
    show=0
    tsmooth=0
    p1percent=2
    dilate=20
    maxpts=0
    p2=12
    mthres=16
    p1=24
    pwidth=100
    pheight=12
    mwidth=7
    mheight=5
    merode=33
    interlaced=false
    seg=1
    sign=0
    ranked=true
    
    super = MSuper(source,hpad=16, vpad=16, pel=2, sharp=1)
    
    vb = MAnalyse(super,isb = true,  blksize=8,overlap=4,search=3,dct=0) # backward vectors 
    vf = MAnalyse(super,isb = false, blksize=8,overlap=4,search=3,dct=0) # forward vectors 
    
    cb = MFlow(source,super,vb,thSCD1=scene_change) # next compensated backward 
    cf = MFlow(source,super,vf,thSCD1=scene_change) # previous compensated forward
    
    sadf = MMask(super,vf, ml=ml,kind=1,gamma=1, thSCD1 = scene_change)
    msadf= sadf.Binarize()           # binary inverted forward SAD mask
    
    sadb = MMask(super,vb, ml=ml, gamma=1, kind=1, thSCD1 = scene_change) # backward SAD mask
    msadb= sadb.Binarize() # binary inverted backward SAD mask
    
    msad = Logic(msadf,msadb,"OR") # combined inverted SAD mask
    msad = msad.Expand() # expanded inverted SAD mask
    msadi = Interleave(msad, msad, msad) # interleaved 3-frame inverted SAD mask
    
    Interleave(cf,source,cb) # interleave forward compensated, source, and backward compensated
    
    DeSpot(show=show,extmask=msadi,tsmooth=tsmooth,p1percent=p1percent,dilate=dilate,maxpts=maxpts,p2=p2,\
           mthres=mthres,p1=p1,pwidth=pwidth,pheight=pheight,mwidth=mwidth,mheight=mheight,merode=merode,\
           interlaced=interlaced,seg=seg,sign=sign,ranked=ranked).SelectEvery(3,1)
    
    }
    Quote Quote  
  11. Originally Posted by johnmeyer View Post
    I'm pretty sure the artifact in the original capture is chroma offset, something that is quite typical of VHS, especially VHS copies. You'll note that the halo is prominent around his red shirt and the model's flesh-colored legs, but absent from the black table legs.

    Here is some code I had lying around from one of my old VHS denoising scripts. The several lines that do the chroma shift are commented out, because I don't usually use them. This is the key line:

    fields=MergeChroma(fields,crop(fields,Hshift,Vshif t,0,0).addborders(0,0,Hshift,Vshift))

    Other people in this forum have posted code for manipulating the chroma separately from the luma and may have better solutions to suggest.

    Here's the old VHS denoising script (your video needs denoising even more than dehaloing).

    Code:
    #Denoiser script for interlaced video using MDegrain2
    
    SetMemoryMax(1024)
    
    Loadplugin("E:\Documents\My Videos\AVISynth\AVISynth Plugins\plugins\MVTools\mvtools2.dll")
    LoadPlugin("E:\Documents\My Videos\AVISynth\AVISynth Plugins\plugins\Cnr2.dll")
    LoadPlugin("E:\Documents\My Videos\AVISynth\AVISynth Plugins\plugins\Film Restoration\Script_and_Plugins\RemoveGrainSSE2.dll")
    
    #The following are only needed if using LimitedSharpenFaster
    #loadPlugin("E:\Documents\My Videos\AVISynth\AVISynth Plugins\plugins\QTGMC\mt_masktools-26.dll")
    #loadPlugin("E:\Documents\My Videos\AVISynth\AVISynth Plugins\plugins\QTGMC\mt_masktools-25.dll")
    #Import("E:\Documents\My Videos\AVISynth\AVISynth Plugins\plugins\Film Restoration\VideoFred's 2014 Script 06_2012\sourcecode\MT_Masktools\masktools\LimitedSharpenFaster.avsi")
    
    SetFilterMTMode("MDegrain2",     MT_MULTI_INSTANCE) 
    SetFilterMTMode("MAnalyse",      MT_MULTI_INSTANCE) 
    SetFilterMTMode("MRecalculate",  MT_MULTI_INSTANCE) 
    SetFilterMTMode("MSuper",        MT_MULTI_INSTANCE) 
    SetFilterMtMode("AVISource",     MT_SERIALIZED)
    
    source=AVISource("E:\fs.avi").killaudio().AssumeBFF().ConvertToYV12()
    
    #Only use chroma restoration for analog source material
    chroma=source.Cnr2("oxx",8,16,191,100,255,32,255,false) #VHS
    #chroma=source.Cnr2("oxx",8,14,191,75,255,20,255,false) #Laserdisc 
    #chroma=source
    
    output = MDegrain2i2(chroma,8,4,400,0)  #Needs higher denoising parameter than script w/o MRecalculate
    
    #output=MDegrain2i2(chroma,16,4,400,0)  #Needs higher denoising parameter than script w/o MRecalculate
    #output=MDegrain2i2(chroma,8,4,400,0)  #Needs higher denoising parameter than script w/o MRecalculate
    #output=IResize(output,720,480)
    
    #stackvertical(source,output)
    #stackhorizontal(source,output)
    
    #return output.Levels(16, 1, 235, 0, 255, coring=false)
    output
    
    /*
    return Interleave(
    \    source
    \  , output
    \ )
    */
    
    # Enable MT!
    Prefetch(6)
    #-------------------------------
    
    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)
    
      #UnsharpMask( clip , int "strength" , int "radius" , int "threshold" ) 
      #strength: strength. The default is 64.
      #radius: the scope of the blurring process. The default is 3.
      #threshold: threshold. Absolute value of the processing component is greater than the threshold blur. The default is 8.
    
      #Unsharpmask sharpening
      even=selecteven(denoised)
      odd= selectodd (denoised)
      denoised = interleave( unsharpmask(even,30,3,4), unsharpmask(odd,30,3,4) )
      #The following seems to be a better sharpener for VHS
      #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) )
    
    
      #LimitedSharpen sharpening. This function may be unstable under SetMTMode. 
      #even=selecteven(denoised)
      #odd= selectodd (denoised)
      #denoised = interleave( LimitedSharpenFaster(even,strength=550), LimitedSharpenFaster(odd,strength=550) ) #Default strength=150
      #denoised = interleave( LimitedSharpenFaster(even,smode=1,strength=160,overshoot=50,radius=2, ss_X=1.5, SS_Y=1.5,dest_x=720,dest_y=240), LimitedSharpenFaster(odd,smode=1,strength=160,overshoot=50,radius=2, ss_X=1.5, SS_Y=1.5,dest_x=720,dest_y=240) )
    
      #Use these two lines if there is more noise in one field than the other
      #denoised_s = fields.MDegrain2(super, bvec1,fvec1,bvec2,fvec2,thSAD=denoising_strength*3)
      #Weave (interleave (denoised.selecteven (), denoised_s.selectodd ()))
    
      Weave(denoised)
    }
    
    function IResize(clip Clip, int NewWidth, int NewHeight) {
      Clip
      SeparateFields() 
      Shift=(GetParity() ? -0.25 : 0.25) * (Height()/Float(NewHeight/2)-1.0)
      E  = SelectEven().Spline36resize(NewWidth, NewHeight/2, 0,    Shift)
      O  = SelectOdd( ).Spline36resize(NewWidth, NewHeight/2, 0,   -Shift)
      Ec = SelectEven().Spline36Resize(NewWidth, NewHeight/2, 0,  2*Shift)
      Oc = SelectOdd( ).Spline36Resize(NewWidth, NewHeight/2, 0, -2*shift)
      Interleave(E, O)
      IsYV12() ? MergeChroma(Interleave(Ec, Oc)) : Last
      Weave()
    }
     
    
    function Remove_TearsI(clip source) 
    {
    
    ml           = 100 # mask scale
    scene_change = 200 # scene change
    
    fields=source.SeparateFields()
    even_fields=selecteven(fields)
    odd_fields =selectodd(fields)
    
    even_result_fields = RemoveTears(even_fields,ml,scene_change)
    odd_result_fields  = RemoveTears(odd_fields, ml,scene_change)
    
    #=================
    #Put even and odd fields back together into interlaced video
    
    interleave(even_result_fields,odd_result_fields)
    weave()
    
    } # End Function RemoveTearsI
    
    function RemoveTears(clip source, int ml, int scene_change) 
    {
    show=0
    tsmooth=0
    p1percent=2
    dilate=20
    maxpts=0
    p2=12
    mthres=16
    p1=24
    pwidth=100
    pheight=12
    mwidth=7
    mheight=5
    merode=33
    interlaced=false
    seg=1
    sign=0
    ranked=true
    
    super = MSuper(source,hpad=16, vpad=16, pel=2, sharp=1)
    
    vb = MAnalyse(super,isb = true,  blksize=8,overlap=4,search=3,dct=0) # backward vectors 
    vf = MAnalyse(super,isb = false, blksize=8,overlap=4,search=3,dct=0) # forward vectors 
    
    cb = MFlow(source,super,vb,thSCD1=scene_change) # next compensated backward 
    cf = MFlow(source,super,vf,thSCD1=scene_change) # previous compensated forward
    
    sadf = MMask(super,vf, ml=ml,kind=1,gamma=1, thSCD1 = scene_change)
    msadf= sadf.Binarize()           # binary inverted forward SAD mask
    
    sadb = MMask(super,vb, ml=ml, gamma=1, kind=1, thSCD1 = scene_change) # backward SAD mask
    msadb= sadb.Binarize() # binary inverted backward SAD mask
    
    msad = Logic(msadf,msadb,"OR") # combined inverted SAD mask
    msad = msad.Expand() # expanded inverted SAD mask
    msadi = Interleave(msad, msad, msad) # interleaved 3-frame inverted SAD mask
    
    Interleave(cf,source,cb) # interleave forward compensated, source, and backward compensated
    
    DeSpot(show=show,extmask=msadi,tsmooth=tsmooth,p1percent=p1percent,dilate=dilate,maxpts=maxpts,p2=p2,\
           mthres=mthres,p1=p1,pwidth=pwidth,pheight=pheight,mwidth=mwidth,mheight=mheight,merode=merode,\
           interlaced=interlaced,seg=seg,sign=sign,ranked=ranked).SelectEvery(3,1)
    
    }
    Thanks everyone for the help.

    Yes, I know it needs denoised. I know how to deal with that and get pretty good results. The only real thing I was not really sure about was this issue. I'll mess with the video later tonight using the suggestions.
    Quote Quote  
  12. I don't think the problem in the first clip is chroma shift. I tried the following script using various numbers for Vshift & Hshift and it created a chroma shift.

    Source=AVISource("Cap.avi").AssumeTFF()

    Vshift=0
    Hshift=0
    fields=source.SeparateFields()

    #up and to the left
    MergeChroma(fields,crop(fields,Hshift,Vshift,0,0). addborders(0,0,Hshift,Vshift))

    #down and to the right
    #MergeChroma(fields,Crop(AddBorders(fields,Hshift, Vshift,0,0),0,0,-Hshift,-Vshift))

    Weave()
    Quote Quote  
  13. Originally Posted by jagabo View Post
    Multigeneration VHS copy? FineDehalo2 and FineDehalo gets rid of a lot of it:

    original+qgtmc | finedehalo+qtgmc
    Image
    [Attachment 52587 - Click to enlarge]
    What script did you use?
    Quote Quote  
  14. Originally Posted by Micheal81 View Post
    What script did you use?
    Code:
     
    LWLibavVideoSource("Capture.avi") 
    AssumeTFF()
    ConvertToYV12(interlaced=true)
    
    SeparateFields()
    BilinearResize(width/2,height)
    FineDehalo2(hconv = "-1 -1 5 5 40 5 5 -1 -1", vconv = "-1 -1 1 1 40 1 1 -1 -1")
    FineDehalo(rx=2.5, ry=1.0, DarkStr=2.0, BrightStr=2.0, ThMi=0)
    #ColorYUV(cont_y=140, gain_y=50, off_y=-10, gamma_y=100, cont_u=100, cont_v=100)
    Spline36Resize(width*2,height)
    Weave()
    QTGMC()
    In My experience FineDehalo works best with radii around 2.0. But the halos in the original video are around 5. That's why I downscaled horizontally by half. If you find that blurs too much downscale less and increase rx accordingly. You can also use sharper upscaling algorithms and additional sharpening.
    Quote Quote  
  15. Any guidance on how to use FineDehalo? I read http://avisynth.nl/index.php/FineDehalo but am not clear on what the settings actually do.
    Quote Quote  



Similar Threads