VideoHelp Forum
+ Reply to Thread
Results 1 to 10 of 10
Thread
  1. one of the anime that I love is NANA (2006), I have R2J DVD (NTSC,30000/10001,868x480), those DVD suffer a lot of banding, dot noise, I used vapoursynth to fix interlace,and balance between banding and dithering

    any suggestion


    Code:
     import vapoursynth as vs
    import sys
    import importlib
    import functools
    core = vs.get_core()
    sys.path.append(r"C:\vs\VapourSynth64Portable\Scripts")
    ASTDR = importlib.machinery.SourceFileLoader("ASTDR", r"C:\vs\VapourSynth64Portable\Scripts\ASTDR.py").load_module()
    havsfunc = importlib.machinery.SourceFileLoader("havsfunc", r"C:\vs\VapourSynth64Portable\Scripts\havsfunc.py").load_module()
    G41Fun = importlib.machinery.SourceFileLoader("havsfunc", r"C:\vs\VapourSynth64Portable\Scripts\G41Fun.py").load_module()
    NRDB = importlib.machinery.SourceFileLoader("havsfunc", r"C:\vs\VapourSynth64Portable\Scripts\NRDB.py").load_module()
    import mvsfunc as mvf
    clip = core.ffms2.Source(r"F:\0\15short/13-002.mkv",fpsnum=30000, fpsden=1001)
    clip = havsfunc.QTGMC(clip, Preset='Very Slow', SourceMatch=3, TR2=1,Rep2=1, Lossless=2, TFF=True,FPSDivisor=2,NoiseProcess=1, NoiseRestore=0.0, Denoiser="dfttest", DenoiseMC=True, NoiseTR=2, Sigma=4.0  )
    clip = core.placebo.Resample(clip,width=864,height=480, filter = "ewa_lanczos", sx = 0.0, sy = 0.0, antiring = 0.0, lut_entries = 64, cutoff = 0.001, sigmoidize = 1, linearize = 1, sigmoid_center = 0.75, sigmoid_slope = 6.5, trc = 1)
    clip = G41Fun.SuperToon(clip)
    clip = core.dfttest.DFTTest(clip ,  ftype=0,  sigma=8.0,  sigma2=8.0,  pmin=0.0,  pmax=500.0,  sbsize=16,  smode=1,  sosize=12,  tbsize=3,  tmode=0,  tosize=0,  swin=0,  twin=7,  sbeta=2.5,  tbeta=2.5,  zmean=True,  f0beta=1.0,  nlocation=None,  slocation=None,  ssx=None,  ssy=None,  sst=None,  ssystem=0,  planes=[0, 1, 2],  opt=0)
    clip = NRDB.NRDB(clip, deband="", db_Y=64, db_Cb=0, db_Cr=0, grainY=0, grainC=0, dynamic_grain=False, keep_tv_range=False, nr="", planes=[0], sigma=4.0, sigma2=4.0)
    super =  core.mv.Super(clip,pel=2, rfilter =4 )
    bv1 = core.mv.Analyse(super, isb = True, delta = 1, overlap=4)
    fv1 = core.mv.Analyse(super, isb = False, delta = 1, overlap=4)
    bv2 = core.mv.Analyse(super, isb = True, delta = 2, overlap=4)
    fv2 = core.mv.Analyse(super, isb = False, delta = 2, overlap=4)
    bv3 = core.mv.Analyse(super, isb = True, delta = 3, overlap=4)
    fv3 = core.mv.Analyse(super, isb = False, delta = 3, overlap=4)
    clip =  core.mv.Degrain3(clip,super,bv1,fv1,bv2,fv2,bv3,fv3,thsad=400)
    clip = havsfunc.HQDeringmod(clip, nrmode=2, darkthr=3.0)
    clip = havsfunc.FastLineDarkenMOD(clip, strength=48, protection=5, luma_cap=191, threshold=4, thinning=0)
    clip.set_output()
    Quote Quote  
  2. Dinosaur Supervisor KarMa's Avatar
    Join Date
    Jul 2015
    Location
    US
    Search Comp PM
    Post a short sample directly to this site.
    Quote Quote  
  3. here is source and sample encode
    Image Attached Files
    Quote Quote  
  4. Originally Posted by ravarage View Post
    any suggestion
    You should IVTC and not deinterlace.

    TFM()
    TDecimate(Mode=1)
    Quote Quote  
  5. Originally Posted by manono View Post
    Originally Posted by ravarage View Post
    any suggestion
    You should IVTC and not deinterlace.

    TFM()
    TDecimate(Mode=1)
    I used that but the frame jump back and forward too much, what advantages of this over the QTMC that I used ?
    Quote Quote  
  6. Member
    Join Date
    Mar 2008
    Location
    United States
    Search Comp PM
    Tdecimate provides the underlying 24 fps, rather than the 30 with duplicate frames.
    Use it instead of the qtgmc.
    Quote Quote  
  7. Originally Posted by ravarage View Post
    I used that but the frame jump back and forward too much...
    You had the field order wrong. Use AssumeTFF (or AssumeBFF) before the TFM call to correct it.
    what advantages of this over the QTMC that I used ?
    It will restore the framerate to its original and correct 23.976fps.
    Quote Quote  
  8. Member
    Join Date
    Mar 2008
    Location
    United States
    Search Comp PM
    Originally Posted by manono View Post
    Originally Posted by ravarage View Post
    I used that but the frame jump back and forward too much...
    You had the field order wrong. Use AssumeTFF (or AssumeBFF) before the TFM call to correct it.
    what advantages of this over the QTMC that I used ?
    It will restore the framerate to its original and correct 23.976fps.
    Tried MCTemporalDenoise (default settings) perhaps this will help.
    Although at the 14-15 seconds mark, the OP's script seemed to smooth the posterization
    a little better
    Image Attached Files
    Quote Quote  
  9. If you just want to reduce the posterization you can use GradFun3() or GradFun2DBMod(). Then you have to encode with enough bitrate to retain the added noise. Otherwise you might as well not bother.
    Quote Quote  
  10. much better any other suggestions ?
    Code:
    import vapoursynth as vs
    import sys
    import importlib
    import functools
    core = vs.get_core()
    sys.path.append(r"C:\vs\VapourSynth64Portable\Scripts")
    havsfunc = importlib.machinery.SourceFileLoader("havsfunc", r"C:\vs\VapourSynth64Portable\Scripts\havsfunc.py").load_module()
    mvs = importlib.machinery.SourceFileLoader("havsfunc", r"C:\vs\VapourSynth64Portable\Scripts\mvsfunc.py").load_module()
    G41Fun = importlib.machinery.SourceFileLoader("havsfunc", r"C:\vs\VapourSynth64Portable\Scripts\G41Fun.py").load_module()
    NRDB = importlib.machinery.SourceFileLoader("havsfunc", r"C:\vs\VapourSynth64Portable\Scripts\NRDB.py").load_module()
    clip = core.ffms2.Source(r"F:\testarea/04-006.mkv",fpsnum=30000, fpsden=1001)
    clip = core.tcomb.TComb(clip, mode=2)
    clip = mvs.AssumeTFF(clip ) 
    matched_clip = core.vivtc.VFM(clip,1,cthresh=10)
    clip= core.vivtc.VDecimate(matched_clip)
    clip = core.placebo.Resample(clip,width=864,height=480, filter = "ewa_lanczos", sx = 0.0, sy = 0.0, antiring = 0.0, lut_entries = 64, cutoff = 0.001, sigmoidize = 1, linearize = 1, sigmoid_center = 0.75, sigmoid_slope = 6.5, trc = 1)
    clip = havsfunc.MCTemporalDenoise(clip)
    clip = core.f3kdb.Deband(clip)
    super =  core.mv.Super(clip,pel=2, rfilter =4 )
    bv1 = core.mv.Analyse(super, isb = True, delta = 1, overlap=4)
    fv1 = core.mv.Analyse(super, isb = False, delta = 1, overlap=4)
    bv2 = core.mv.Analyse(super, isb = True, delta = 2, overlap=4)
    fv2 = core.mv.Analyse(super, isb = False, delta = 2, overlap=4)
    bv3 = core.mv.Analyse(super, isb = True, delta = 3, overlap=4)
    fv3 = core.mv.Analyse(super, isb = False, delta = 3, overlap=4)
    clip =  core.mv.Degrain3(clip,super,bv1,fv1,bv2,fv2,bv3,fv3,thsad=400)
    clip = havsfunc.HQDeringmod(clip, nrmode=2, darkthr=3.0)
    clip = havsfunc.FastLineDarkenMOD(clip, strength=48, protection=5, luma_cap=191, threshold=4, thinning=0)
    clip = G41Fun.SuperToon(clip)
    clip.set_output()
    Image Attached Files
    Quote Quote  



Similar Threads

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