VideoHelp Forum
+ Reply to Thread
Results 1 to 17 of 17
Thread
  1. What Avisynth plugins should I use in order to remove this annoying flickering present in the source below?

    Also is is possible to remove the 'vibration' which is also present in some scenes?

    The video seems to be a few generations old telerecording of The Kinks 'Soap opera' concert live on the ITV Granada. It is the best source I know of
    Image
    [Attachment 64364 - Click to enlarge]
    Image Attached Files
    Last edited by rrats; 17th Apr 2022 at 03:54.
    Quote Quote  
  2. some Deblocking + SpotLess+TemporalDegrain should help with the 'vibration'.
    I would start with something like:
    Code:
    QTGMC(Preset="Fast", ediThreads=2)
    # filtering
    # chroma denoising
    Cnr2(mode="oxx")
    # deblocking
    Deblock_QED()
    # despotting using SpotLess
    SpotLess()
    # grain handling
    TemporalDegrain(GPU=true,HQ=1)
    Last edited by Selur; 17th Apr 2022 at 04:48.
    users currently on my ignore list: deadrats, Stears555
    Quote Quote  
  3. Setting the color levels right would also do no harm.
    Quote Quote  
  4. yes, color level, chroma bleeding, color issues, deblocking,... there isn't much that isn't wrong with the clip.
    (About the color levels: AutoWhite + SmoothLevels seems a like a good start.)
    Last edited by Selur; 17th Apr 2022 at 08:41.
    users currently on my ignore list: deadrats, Stears555
    Quote Quote  
  5. A bit playing around with Vapoursynth (used filters are all available in Aivsynth too)
    Code:
    # Imports
    import vapoursynth as vs
    import os
    import ctypes
    # Loading Support Files
    Dllref = ctypes.windll.LoadLibrary("i:/Hybrid/64bit/vsfilters/Support/libfftw3-3.dll")
    Dllref = ctypes.windll.LoadLibrary("i:/Hybrid/64bit/vsfilters/Support/libfftw3f-3.dll")
    import sys
    # getting Vapoursynth core
    core = vs.core
    # Import scripts folder
    scriptPath = 'i:/Hybrid/64bit/vsscripts'
    sys.path.insert(0, os.path.abspath(scriptPath))
    # Loading Plugins
    core.std.LoadPlugin(path="i:/Hybrid/64bit/vsfilters/DenoiseFilter/RemoveDirt/RemoveDirtVS.dll")
    core.std.LoadPlugin(path="i:/Hybrid/64bit/vsfilters/DenoiseFilter/Cnr2/libcnr2.dll")
    core.std.LoadPlugin(path="i:/Hybrid/64bit/vsfilters/SharpenFilter/AWarpSharp2/libawarpsharp2.dll")
    core.std.LoadPlugin(path="i:/Hybrid/64bit/vsfilters/Support/TCanny.dll")
    core.std.LoadPlugin(path="i:/Hybrid/64bit/vsfilters/Support/vcm.dll")
    core.std.LoadPlugin(path="i:/Hybrid/64bit/vsfilters/Support/libtemporalmedian.dll")
    core.std.LoadPlugin(path="i:/Hybrid/64bit/vsfilters/Support/DePan.dll")
    core.std.LoadPlugin(path="i:/Hybrid/64bit/vsfilters/DebandFilter/Flash3kDeband/flash3kyuu_deband.dll")
    core.std.LoadPlugin(path="i:/Hybrid/64bit/vsfilters/GrainFilter/RemoveGrain/RemoveGrainVS.dll")
    core.std.LoadPlugin(path="i:/Hybrid/64bit/vsfilters/GrainFilter/AddGrain/AddGrain.dll")
    core.std.LoadPlugin(path="i:/Hybrid/64bit/vsfilters/DenoiseFilter/NEO_FFT3DFilter/neo-fft3d.dll")
    core.std.LoadPlugin(path="i:/Hybrid/64bit/vsfilters/DenoiseFilter/DFTTest/DFTTest.dll")
    core.std.LoadPlugin(path="i:/Hybrid/64bit/vsfilters/Support/EEDI3m.dll")
    core.std.LoadPlugin(path="i:/Hybrid/64bit/vsfilters/ResizeFilter/nnedi3/vsznedi3.dll")
    core.std.LoadPlugin(path="i:/Hybrid/64bit/vsfilters/Support/libmvtools.dll")
    core.std.LoadPlugin(path="i:/Hybrid/64bit/vsfilters/Support/temporalsoften.dll")
    core.std.LoadPlugin(path="i:/Hybrid/64bit/vsfilters/Support/scenechange.dll")
    core.std.LoadPlugin(path="i:/Hybrid/64bit/vsfilters/Support/fmtconv.dll")
    core.std.LoadPlugin(path="i:/Hybrid/64bit/vsfilters/MiscFilter/MiscFilters/MiscFilters.dll")
    core.std.LoadPlugin(path="i:/Hybrid/64bit/vsfilters/SourceFilter/d2vSource/d2vsource.dll")
    # Import scripts
    import killerspots
    import muvsfunc
    import G41Fun
    import mvsfunc
    import SpotLess
    import lostfunc
    import autowhite
    import havsfunc
    # source: 'C:\Users\Selur\Desktop\VTS_01_1.MPG'
    # current color space: YUV420P8, bit depth: 8, resolution: 720x576, fps: 25, color matrix: 470bg, yuv luminance scale: limited, scanorder: top field first
    # Loading C:\Users\Selur\Desktop\VTS_01_1.MPG using D2VSource
    clip = core.d2v.Source(input="E:/Temp/mpg_f02df6982fa4b3a8d498a0ad5b138442_853323747.d2v", rff=False)
    # Setting color matrix to 470bg.
    clip = core.std.SetFrameProps(clip, _Matrix=5)
    clip = clip if not core.text.FrameProps(clip,'_Transfer') else core.std.SetFrameProps(clip, _Transfer=5)
    clip = clip if not core.text.FrameProps(clip,'_Primaries') else core.std.SetFrameProps(clip, _Primaries=5)
    # Setting color range to TV (limited) range.
    clip = core.std.SetFrameProp(clip=clip, prop="_ColorRange", intval=1)
    # making sure frame rate is set to 25
    clip = core.std.AssumeFPS(clip=clip, fpsnum=25, fpsden=1)
    # setting field order to what QTGMC should assume (top field first)
    clip = core.std.SetFrameProp(clip=clip, prop="_FieldBased", intval=2)
    # Deinterlacing using QTGMC
    clip = havsfunc.QTGMC(Input=clip, Preset="Fast", TFF=True) # new fps: 50
    # make sure content is preceived as frame based
    clip = core.std.SetFieldBased(clip, 0)
    # adjusting color space from YUV420P8 to RGB24 for vsAutoWhite
    clip = core.resize.Bicubic(clip=clip, format=vs.RGB24, matrix_in_s="470bg", range_s="limited")
    # Color Adjustment
    clip = autowhite.AutoWhite(clip=clip)
    # adjusting color space from RGB24 to YUV444P8 for vsSmoothLevels
    clip = core.resize.Bicubic(clip=clip, format=vs.YUV444P8, matrix_s="470bg", range_s="limited")
    # Color Adjustment using SmoothLevels
    clip = havsfunc.SmoothLevels(input=clip, output_low=16, output_high=235, Ecurve=0)
    # stabilizing using Stab
    clip = lostfunc.Stab(clp=clip,range=4,mirror=0,dxmax=16,dymax=16)
    # cropping the video to 624x556
    clip = core.std.CropRel(clip=clip, left=48, right=48, top=4, bottom=16)
    # Fixing chroma bleeding using FixChromaBleedingMod
    clip = havsfunc.FixChromaBleedingMod(input=clip)
    clip = SpotLess.SpotLess(clip=clip, radT=1)
    # removing grain using MLDegrain
    clip = G41Fun.MLDegrain(clip=clip, soft=[0,0,0])
    # denoising using mClean
    clip = G41Fun.mClean(clip=clip)
    # chroma denoising using VsCnr2
    clip = core.cnr2.Cnr2(clip=clip, mode="oxx")
    # adjusting color space from YUV444P8 to YUV420P8 for vsKillerSpots
    clip = core.resize.Bicubic(clip=clip, format=vs.YUV420P8, range_s="limited")
    clip = killerspots.KillerSpots(clip=clip)
    # adjusting output color from: YUV420P8 to YUV420P10 for x265Model
    clip = core.resize.Bicubic(clip=clip, format=vs.YUV420P10, range_s="limited")
    # set output frame rate to 50.000fps
    clip = core.std.AssumeFPS(clip=clip, fpsnum=50, fpsden=1)
    # Output
    clip.set_output()
    Cu Selur
    Image Attached Files
    users currently on my ignore list: deadrats, Stears555
    Quote Quote  
  6. Thank you Selur, will try it soon. The sample looks really good
    Quote Quote  
  7. Originally Posted by s-mp View Post
    Also is is possible to remove the 'vibration' which is also present in some scenes?
    This works for most of it:

    Code:
    Mpeg2Source("VTS_01_1.d2v", CPU2="ooooxx", Info=3) 
    ConvertToYUY2(interlaced=true)
    testclip = Crop(0,1,-0,1).PointResize(width,16)
    swappedfields = AddBorders(0,1,0,0).Crop(0,0,-0,-1).SwapFields().Subtitle("swapped")
    ConditionalFilter(testclip, swappedfields, last, "AverageLuma", "greaterthan", "25.0", show=false)
    QTGMC()
    Quote Quote  
  8. Thank you jagabo
    Quote Quote  
  9. Anyone got an idea to get rid of the thick white halos?
    users currently on my ignore list: deadrats, Stears555
    Quote Quote  
  10. dehalo_alpha() can reduce them. But it's pretty damaging to the picture. It's best to avoid them by turning down the sharpen filter in the VHS deck.
    Quote Quote  
  11. Which is impossible to do since this was sourced from a bootleg DVD
    Quote Quote  
  12. Field swap fix, qtgmc, dehalo_alpha, saturation reduced. Dehalo_alpha() makes everything look plastic, people look like mannequins. It can be mitigated somewhat by the use of a mask to limit the dehaloing to the worst halos.
    Image Attached Files
    Quote Quote  
  13. Argh, okay not worth it.
    What values for dehalo_alpha did you use?
    users currently on my ignore list: deadrats, Stears555
    Quote Quote  
  14. Dehalo_alpha() works best when halos are 2 to 3 pixels wide. The basic dehalo sequence I used was:

    Code:
    # after QTGMC the frame was cropped to 704x576
    BilinearResize(400, height)
    dehalo_alpha(rx=3.5, ry=1.0, BrightStr=1.1, DarkStr=1.0)
    nnedi3_rpow2(2, cshift="Spline36Resize", fwidth=704, fheight=576)
    FineDehalo() is similar but has some options that limit the filter to cause less damage. You might try that instead.
    Quote Quote  
  15. Try something like this

    MPEG2Source("VTS_01_1.d2v", cpu=3)

    ##### 1) Deblocking interlaced source ########
    par=getparity()
    SeparateFields().PointResize(width,height)
    Deblock_QED(24,28,uv=3)
    AssumeFrameBased()
    SeparateFields()
    Merge(SelectEven(),SelectOdd())
    par ? AssumeTFF() : AssumeBFF()
    Weave()

    ##### 2) desaturate, add some gain on luma ########
    coloryuv(cont_u=-75,cont_v=-75,autowhite=false,autogain=true)

    ##### 3) Correct the chroma offset induced by VHS format ########
    separatefields()
    A=Last
    B=A.Greyscale()
    Overlay(B,A,X=0,Y=-2,Mode="Chroma")
    weave()

    ##### 4) Remove Chroma lines/fluctuations ########

    ConvertToYV16(interlaced=true)
    orig=last
    ev=orig.assumetff().separatefields().selecteven()
    od=orig.assumetff().separatefields().selectodd()
    ev
    ue_chroma = UToY(ev).RemoveSpotsMC().ttempsmooth(maxr=1,lthres h=190, strength=1)
    ve_chroma = VToY(ev).RemoveSpotsMC().ttempsmooth(maxr=1,lthres h=190, strength=1)
    YToUV(ue_chroma, ve_chroma)
    MergeLuma(ev)
    ev_filtered=last
    od
    uo_chroma = UToY(od).RemoveSpotsMC().ttempsmooth(maxr=1,lthres h=190, strength=1)
    vo_chroma = VToY(od).RemoveSpotsMC().ttempsmooth(maxr=1,lthres h=190, strength=2)
    YToUV(uo_chroma, vo_chroma)
    MergeLuma(od)
    od_filtered=last
    interleave(ev_filtered,od_filtered)
    assumefieldbased().assumetff().weave()

    ##### 5) Remove chroma lines / fluctuations in RGB with CCD + light Sharpening with MsuSmartsharp ########

    ConverttoRGB32(matrix="rec601",interlaced=true)
    LoadVirtualDubPlugin("C:\Program Files (x86)\Virtualdub\plugins32\ccd_sse2.vdf", "CCD", 0)
    LoadVirtualDubPlugin("C:\Program Files (x86)\Virtualdub\plugins32\msu_sharpen.vdf", "MSUSmartSharpen", 1)

    e=separatefields().selecteven().CCD(15,0).MSUSmart Sharpen(0)
    o=separatefields().selectodd().CCD(15,0).MSUSmartS harpen(0)
    interleave(e,o).weave()
    converttoyv12(matrix="rec601",interlaced=true)

    ############ ANALYSE #######################
    #ColorYUV(analyze=true)
    #UtoY() # analyse U
    #VtoY() # analyse V
    Histogram("levels") #
    #Histogram(mode="luma") # luma mode (useful to spot blocking, grain, noise)
    #HistogramRGBParade()
    #HistogramRGBLevels
    #HistogramCMYLevels(range=true)
    #ConverttoYUY2(interlaced=true) # pour VIDEOSCOPE
    #VideoScope("both", true, "Y") # Y levels
    #VideoScope("side", true, "UV") # chroma levels
    #VideoScope("both",true, "U", "V", "UV")
    # Analyse YUV:
    #Y = GreyScale()
    #U = UtoY()
    #V = VtoY()
    #StackHorizontal(Y, StackVertical(U,V))
    I believe i miss a pal hanover bars removal though, can't find my script anymore
    Image Attached Thumbnails Click image for larger version

Name:	VTS_01_1000254.jpg
Views:	60
Size:	265.5 KB
ID:	64469  

    Click image for larger version

Name:	VTS_01_1-removespots_et_ttempsmooth000254.jpg
Views:	43
Size:	291.2 KB
ID:	64470  

    Last edited by themaster1; 22nd Apr 2022 at 08:21.
    *** DIGITIZING VHS / ANALOG VIDEOS SINCE 2001**** GEAR: JVC HR-S7700MS, TOSHIBA V733EF AND MORE
    Quote Quote  
  16. @themaster1: got an idea how to remode the thick dark halos?
    users currently on my ignore list: deadrats, Stears555
    Quote Quote  
  17. Originally Posted by Selur View Post
    @themaster1: got an idea how to remode the thick dark halos?
    I don't like dehalo filters i've tried many they're not that great excepted for cartoons imo
    *** DIGITIZING VHS / ANALOG VIDEOS SINCE 2001**** GEAR: JVC HR-S7700MS, TOSHIBA V733EF AND MORE
    Quote Quote  



Similar Threads

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