VideoHelp Forum
+ Reply to Thread
Results 1 to 19 of 19
Thread
  1. Member
    Join Date
    Feb 2022
    Location
    Amsterdam
    Search Comp PM
    In the attachment an example of pictures taken insite the The Lincoln Tomb with a miniDV tape camcorder in 2002.
    Is this noise or ???
    And more important, is somekind of restoration possible by using filters.
    And if so, which program and filter(s) must be used.
    Is it possible to give an exaplanation how to or a link to this subject in this forum?

    Thanks a lot, I do this for my son.
    In Holland it is no evening while I write this, so I am going to shutdown the PC and hopefully can read tomorrow some respons.
    Image Attached Files
    Quote Quote  
  2. 1. it's noise
    2. that's normal, you really should leave it alone
    Quote Quote  
  3. you really should leave it alone
    (I will probably regret writing this at some point in the future,..)
    And if you don't want to,...

    I had a quick go at it:


    What I did is:
    • Start Hybrid
    • Load Source
    • Set 'Base->Procesing->Video' to 'x265'
    • Checked 'Crop/Resize->Base->Picture Crop'
    • Set 'Crop/Resize->Base->Picture Crop->Crop->Left' to '2'
    • Set 'Crop/Resize->Base->Picture Crop->Crop->Top' to '4'
    • Checked 'Crop/Resize->Base->Pixel Aspect ratio (PAR)->Convert output to PAR'.
    • Set 'Crop/Resize->Base->Pixel Aspect ratio (PAR)->Convert output to PAR' to 'Square Pixel (1:1)'.
    • Checked 'Filtering->(De-)Interlaced/Telecine->QTGMC Vapoursynth->Bob' for deinterlacing. (now that I think about it I could have also enabled 'OpenCL')
    • Checked 'Filtering->Vapoursynth->DeNoise->MC Temporal Denoise' for denoising..
    • Set 'Filtering->Vapoursynth->DeNoise->MC Temporal Denoise->Settings' to 'very high'. (didn't check whether a lower would have been enough or manual tweaking would help)
    • Checked 'Filtering->Vapoursynth->Frame->Stabilize->Stab' to reduce the camera bobbing a bit.
    • Went to 'Filtering->Vapoursynth->Misc->Filter Order/Queue' and moved 'Stab' above 'Crop', so that the statilizing will be applied before the cropping.
    • Clicked 'Base->Output file name' and entered an output file name to set the output file name.
    • Clicked 'Base->Add to Queue', to create a job and subjobs for the configured settings.
    • Clicked 'Jobs->Queue->Start'

    Vapoursynth script used:
    Code:
    # Imports
    import os
    import sys
    import ctypes
    # Loading Support Files
    Dllref = ctypes.windll.LoadLibrary("I:/Hybrid/64bit/vsfilters/Support/libfftw3f-3.dll")
    import vapoursynth as vs
    # 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/TTempSmooth/TTempSmooth.dll")
    core.std.LoadPlugin(path="I:/Hybrid/64bit/vsfilters/Support/DCTFilter.dll")
    core.std.LoadPlugin(path="I:/Hybrid/64bit/vsfilters/DeblockFilter/Deblock/Deblock.dll")
    core.std.LoadPlugin(path="I:/Hybrid/64bit/vsfilters/Support/DePan.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/FFMS2/ffms2.dll")
    # Import scripts
    import lostfunc
    import havsfunc
    # source: 'C:\Users\Selur\Desktop\USA-3'20020512 20.56.05.avi'
    # current color space: YUV420P8, bit depth: 8, resolution: 720x576, fps: 25, color matrix: 470bg, yuv luminance scale: limited, scanorder: bottom field first
    # Loading source using FFMS2
    clip = core.ffms2.Source(source="C:/Users/Selur/Desktop/USA-3'20020512 20.56.05.avi",cachefile="E:/Temp/avi_10be11ed8b2bd61bdeb13ad6036fa9c5_853323747.ffindex",format=vs.YUV420P8,alpha=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 (bottom field first)
    clip = core.std.SetFrameProp(clip=clip, prop="_FieldBased", intval=1)
    # Deinterlacing using QTGMC
    clip = havsfunc.QTGMC(Input=clip, Preset="Fast", TFF=False) # new fps: 50
    # make sure content is preceived as frame based
    clip = core.std.SetFieldBased(clip, 0)
    # stabilizing using Stab
    clip = lostfunc.Stab(clp=clip,range=0,mirror=0)
    # cropping the video to 718x572
    clip = core.std.CropRel(clip=clip, left=2, right=0, top=4, bottom=0)
    clip = core.std.AddBorders(clip=clip, left=0, right=2, top=0, bottom=0) # add borders to archive mod 4 (vsMCT) - 720x572
    # denoising using MCTemporalDenoise
    clip = havsfunc.MCTemporalDenoise(i=clip, settings="very high", ncpu=1)
    clip = core.std.CropRel(clip=clip, left=0, right=2, top=0, bottom=0) # removing borders (vsMCT) -  718x572
    clip = core.fmtc.resample(clip=clip, kernel="spline16", w=720, h=404, interlaced=False, interlacedd=False)
    # adjusting output color from: YUV420P16 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()
    QTGMC(Bob) + Stab + Crop + MCTemporalDenoise + Resize (for square pixel)
    Didn't touch the colors since I have no clue whether they should be changed.
    Also this is just a quick hack at it. (I'm pretty sure TemporalDegrain, TemporalDegrain2 or similar could be used for cleaning up the noise,...)

    Cu Selur

    Ps.: I ignored the audio.
    Image Attached Files
    Last edited by Selur; 24th Feb 2022 at 22:36.
    users currently on my ignore list: deadrats, Stears555
    Quote Quote  
  4. Captures & Restoration lollo's Avatar
    Join Date
    Jul 2018
    Location
    Italy
    Search Comp PM
    AviSynth filtering, just TemporalDegrain2 applied on lossless deinterlaced frames and interlacing back:

    Code:
    video_org=FFmpegSource2("USA-3'20020512 20.56.05.avi")
    
    deinterlaced=video_org.AssumeTFF().QTGMC(lossless=1)
    
    deinterlaced_yv16=deinterlaced.convertToYV16()
    
    denoised_yv16=deinterlaced_yv16.TemporalDegrain2(degrainTR=3)
    
    denoised=denoised_yv16.convertToYUY2()
    
    interlaced=denoised.AssumeTFF().SeparateFields().SelectEvery(4,0,3).Weave()
    
    stackhorizontal(\
    subtitle(video_org.convertToYUY2(interlaced=true),"video_org",size=28,align=2),\
    subtitle(interlaced,"TemporalDegrain2(degrainTR=3)",size=28,align=2)\
    )
    video comparison: td2.avi

    image comparison (use zoom and fullscreen): https://imgsli.com/OTcyOTI

    Edit: Selur arrived first

    Edit: not sure is TFF, try BFF also
    Quote Quote  
  5. I still use this script for interlaced SD video. Seemed to work quite well with your clip.

    Interlaced Noise Reduction Based on MDegrain2

    Code:
    #Denoiser script for interlaced video using MDegrain2
    
    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")
    
    #Modify this line to point to your video file
    source=AVISource("E:\fs.avi").killaudio().AssumeBFF()
    
    #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 
    
    output=MDegrain2i2(chroma,4,2,400,0)  
    
    return output
    
    #Alternative output lines for debugging
    #stackvertical(source,output)
    #stackhorizontal(source,output)
    
    /*
    return Interleave(
    \    source
    \  , output
    \ )
    */
    
    # Enable MT!
    Prefetch(5)
    
    #-------------------------------
    
    function MDegrain2i2(clip source, int "blksize", int "overlap", 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(overlap,0) # overlap value (0 to 4 for blksize=8)
    denoising_strength=default(denoising_strength, 400)
    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)
    
    denoised = MDegrain2(fields,super, backward_vec2,forward_vec2,backward_vec4,forward_vec4,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,20,3,4), unsharpmask(odd,20,3,4) )
    
    #Alternate denoising
      #denoised = interleave( unsharpmask(odd,20,3,4), unsharpmask(even,20,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) )
    
    Weave(denoised)
    }
    Quote Quote  
  6. Member
    Join Date
    Aug 2004
    Location
    PA USA
    Search Comp PM
    Stablized with Mercalli, cropped, letterbox, qtgmc - bob deinterlaced, set DAD for PAL 16:9, ttempsmooth, light degrain, a minumum of filtering.

    https://files.videohelp.com/u/84671/USA-3_2002.mkv
    It's not important the problem be solved, only that the blame for the mistake is assigned correctly
    Quote Quote  
  7. Nice demos. The huge differences in file size however, ranging from highly compressed 200k to uncompressed 44M, makes a comparison of the denoising methods almost impossible.
    Quote Quote  
  8. Member
    Join Date
    Feb 2022
    Location
    Amsterdam
    Search Comp PM
    The sample td2.avi is indeed better then the original file.
    But how to use avisynth, no experience at all.
    I read, you have to use command lines in a avs file?
    I suppose that TemporalDegrain2 is such a script.
    But how to execute?

    I also have tried to execute hybrid with the given instructions.
    But 2 instructions I could not find these.
    Ignoring these and still doing the job, it ended in a error message.

    I think, the avisynth method is easier to do for me (i hope) ?
    Quote Quote  
  9. I think, the avisynth method is easier to do for me (i hope) ?
    I doubt it, but I wish you much luck.
    users currently on my ignore list: deadrats, Stears555
    Quote Quote  
  10. Captures & Restoration lollo's Avatar
    Join Date
    Jul 2018
    Location
    Italy
    Search Comp PM
    I think, the avisynth method is easier to do for me (i hope) ?
    Hybris is easier to use than AviSynth, thanks to Selur. You can use it in its "AviSynth" form, look to the generated script, and learn from there.

    Learning AviSynth requires time and effort, but the most difficult part is to understand the nature of the video and recognize its problems and, consequently, find the appropriate filtering.

    But how to execute?
    TemporalDegrain2 is a temporal denoiser designed to reduce "dancing" grain, predominant in your sample. It is written as a function (.avsi) to be inserted in an AviSynth script (.avs) and to be rendered, for example, with VirtualDub or feeding ffmpeg compressing to h264.

    A stabilization and light sharpening, as proposed by others, are also appropriate in your case.

    The huge differences in file size however, ranging from highly compressed 200k to uncompressed 44M
    I chose HuffYUV lossless compression because the short duration of the sample. You are right, is difficult to compare with highly compressed videos. However, a x264 compression with crf=17 and "slow" preset is very similar to the original, we all may want to use something like this when there is a need to compress a video for demo purposes.
    Last edited by lollo; 25th Feb 2022 at 07:52.
    Quote Quote  
  11. Code:
    # Imports
    import os
    import sys
    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 vapoursynth as vs
    # 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/DebandFilter/Flash3kDeband/flash3kyuu_deband.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/libtemporalmedian.dll")
    core.std.LoadPlugin(path="I:/Hybrid/64bit/vsfilters/Support/vcm.dll")
    core.std.LoadPlugin(path="I:/Hybrid/64bit/vsfilters/Support/libmvtools_sf_em64t.dll")
    core.std.LoadPlugin(path="I:/Hybrid/64bit/vsfilters/DenoiseFilter/HQDN3D/libhqdn3d.dll")
    core.std.LoadPlugin(path="I:/Hybrid/64bit/vsfilters/DenoiseFilter/TTempSmooth/TTempSmooth.dll")
    core.std.LoadPlugin(path="I:/Hybrid/64bit/vsfilters/Support/DCTFilter.dll")
    core.std.LoadPlugin(path="I:/Hybrid/64bit/vsfilters/DeblockFilter/Deblock/Deblock.dll")
    core.std.LoadPlugin(path="I:/Hybrid/64bit/vsfilters/Support/DePan.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/NNEDI3CL.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/FFMS2/ffms2.dll")
    # Import scripts
    import mvsfunc
    import muvsfunc
    import G41Fun
    import lostfunc
    import havsfunc
    # source: 'C:\Users\Selur\Desktop\USA-3'20020512 20.56.05.avi'
    # current color space: YUV420P8, bit depth: 8, resolution: 720x576, fps: 25, color matrix: 470bg, yuv luminance scale: limited, scanorder: bottom field first
    # Loading source using FFMS2
    clip = core.ffms2.Source(source="C:/Users/Selur/Desktop/USA-3'20020512 20.56.05.avi",cachefile="E:/Temp/avi_10be11ed8b2bd61bdeb13ad6036fa9c5_853323747.ffindex",format=vs.YUV420P8,alpha=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 (bottom field first)
    clip = core.std.SetFrameProp(clip=clip, prop="_FieldBased", intval=1)
    # Deinterlacing using QTGMC
    clip = havsfunc.QTGMC(Input=clip, Preset="Slower", InputType=0, TFF=False, TR2=3, SourceMatch=0, Lossless=0, opencl=True) # new fps: 50
    # make sure content is preceived as frame based
    clip = core.std.SetFieldBased(clip, 0)
    # stabilizing using Stab
    clip = lostfunc.Stab(clp=clip,range=2,mirror=0)
    # cropping the video to 718x572
    clip = core.std.CropRel(clip=clip, left=2, right=0, top=4, bottom=0)
    clip = core.std.AddBorders(clip=clip, left=0, right=2, top=0, bottom=0) # add borders to archive mod 4 (vsMCT) - 720x572
    # denoising using MCTemporalDenoise
    clip = havsfunc.MCTemporalDenoise(i=clip, settings="very high", thSAD=900, thSAD2=900, thSCD1=900, thSCD2=250, truemotion=True, MVglobal=True, pel=4, pelsearch=2, search=2, searchparam=2, MVsharp=0, DCT=0, ncpu=6)
    clip = core.std.CropRel(clip=clip, left=0, right=2, top=0, bottom=0) # removing borders (vsMCT) -  718x572
    # denoising using HQDN3D
    clip = core.hqdn3d.Hqdn3d(clip=clip, lum_spac=0.00, chrom_spac=10.00, chrom_tmp=15.00, restart_lap=16)
    # denoising using mClean
    clip = G41Fun.mClean(clip=clip, thSAD=900, rn=0)
    from vshinet import HINet
    # adjusting color space from YUV420P8 to RGBS for vsHINet
    clip = core.resize.Bicubic(clip=clip, format=vs.RGBS, matrix_in_s="470bg", range_s="limited")
    # denoising/debluring/deraining using HINet
    clip = HINet(clip=clip, mode=3, device_index=0, fp16=True)
    clip = core.fmtc.resample(clip=clip, kernel="spline16", w=718, h=402, interlaced=False, interlacedd=False)
    # adjusting output color from: RGBS to YUV422P10 for FFvHuffModel
    clip = core.resize.Bicubic(clip=clip, format=vs.YUV422P10, matrix_s="470bg", range_s="limited")
    # set output frame rate to 50.000fps
    clip = core.std.AssumeFPS(clip=clip, fpsnum=50, fpsden=1)
    # Output
    clip.set_output()
    still not happy, I forgot how to stabalize the background,.... added HQDN3D for chroma filtering and testing mClean + HINet for statilizing the background,..
    Image Attached Files
    users currently on my ignore list: deadrats, Stears555
    Quote Quote  
  12. Originally Posted by Selur View Post
    still not happy, I forgot how to stabalize the background,.... added HQDN3D for chroma filtering and testing mClean + HINet for statilizing the background,..
    The noise reduction is really, really good. I am impressed. However, the stabilization is not great. There are much better tools for this, including Depan, Deshaker, and of course the commercial package Mercalli.
    Quote Quote  
  13. I recommend running "CCD (Camcorder Colour Denoiser) instead

    Image
    [Attachment 63556 - Click to enlarge]
    Quote Quote  
  14. I tried:
    Code:
    # Imports
    import os
    import sys
    import ctypes
    # Loading Support Files
    Dllref = ctypes.windll.LoadLibrary("I:/Hybrid/64bit/vsfilters/Support/libfftw3f-3.dll")
    import vapoursynth as vs
    # 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/CCD/ccd.dll")
    core.std.LoadPlugin(path="I:/Hybrid/64bit/vsfilters/DenoiseFilter/HQDN3D/libhqdn3d.dll")
    core.std.LoadPlugin(path="I:/Hybrid/64bit/vsfilters/DenoiseFilter/TTempSmooth/TTempSmooth.dll")
    core.std.LoadPlugin(path="I:/Hybrid/64bit/vsfilters/Support/DCTFilter.dll")
    core.std.LoadPlugin(path="I:/Hybrid/64bit/vsfilters/DeblockFilter/Deblock/Deblock.dll")
    core.std.LoadPlugin(path="I:/Hybrid/64bit/vsfilters/Support/DePan.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/FFMS2/ffms2.dll")
    # defining beforeStab-function - START
    def beforeStab(clip):
      import fromDoom9
      clip = fromDoom9.StabilizeIT(clip)
      return clip
    # defining beforeStab-function - END
    
    # Import scripts
    import lostfunc
    import havsfunc
    # source: 'E:\clips\USA-3'20020512 20.56.05.avi'
    # current color space: YUV420P8, bit depth: 8, resolution: 720x576, fps: 25, color matrix: 470bg, yuv luminance scale: limited, scanorder: bottom field first
    # Loading source using FFMS2
    clip = core.ffms2.Source(source="E:/clips/USA-3'20020512 20.56.05.avi",cachefile="E:/Temp/avi_92b6df8d9da14c5bcacdf757d90ece63_853323747.ffindex",format=vs.YUV420P8,alpha=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 (bottom field first)
    clip = core.std.SetFrameProp(clip=clip, prop="_FieldBased", intval=1)
    # Deinterlacing using QTGMC
    clip = havsfunc.QTGMC(Input=clip, Preset="Fast", TFF=False) # new fps: 25
    # make sure content is preceived as frame based
    clip = core.std.SetFieldBased(clip, 0)
    clip = clip[::2]
    clip = beforeStab(clip)
    # stabilizing using Stab
    clip = lostfunc.Stab(clp=clip,range=4,mirror=0,dxmax=8,dymax=8)
    # cropping the video to 718x572
    clip = core.std.CropRel(clip=clip, left=2, right=0, top=4, bottom=0)
    clip = core.std.AddBorders(clip=clip, left=0, right=2, top=0, bottom=0) # add borders to archive mod 4 (vsMCT) - 720x572
    # denoising using MCTemporalDenoise
    clip = havsfunc.MCTemporalDenoise(i=clip, settings="very high", thSAD=900, thSAD2=900, thSCD1=900, thSCD2=250, truemotion=True, MVglobal=True, pel=4, pelsearch=2, search=2, searchparam=2, MVsharp=2, DCT=0, ncpu=1)
    clip = core.std.CropRel(clip=clip, left=0, right=2, top=0, bottom=0) # removing borders (vsMCT) -  718x572
    # denoising using HQDN3D
    clip = core.hqdn3d.Hqdn3d(clip=clip, lum_spac=0.00, chrom_spac=10.00, chrom_tmp=15.00)
    # adjusting color space from YUV420P8 to RGBS for vsVCCD
    clip = core.resize.Bicubic(clip=clip, format=vs.RGBS, matrix_in_s="470bg", range_s="limited")
    # chroma denoising using CCD
    clip = core.ccd.CCD(clip=clip, threshold=12.00)
    clip = core.fmtc.resample(clip=clip, kernel="spline16", w=718, h=402, interlaced=False, interlacedd=False)
    # adjusting output color from: RGBS to YUV420P10 for FFvHuffModel
    clip = core.resize.Bicubic(clip=clip, format=vs.YUV420P10, matrix_s="470bg", range_s="limited")
    # set output frame rate to 25.000fps
    clip = core.std.AssumeFPS(clip=clip, fpsnum=25, fpsden=1)
    # Output
    clip.set_output()
    and adjusted the CCD threshold,..

    An recommendation for the threshold value of CCD?
    Image Attached Files
    users currently on my ignore list: deadrats, Stears555
    Quote Quote  
  15. Member
    Join Date
    Apr 2018
    Location
    Croatia
    Search Comp PM
    I get much better results with chromanr filter.
    Quote Quote  
  16. Chromanr from ffmpeg? What settings?
    users currently on my ignore list: deadrats, Stears555
    Quote Quote  
  17. Video Restorer lordsmurf's Avatar
    Join Date
    Jun 2003
    Location
    dFAQ.us/lordsmurf
    Search Comp PM
    Originally Posted by blud7 View Post
    1. it's noise
    2. that's normal, you really should leave it alone
    No.
    Never leave chroma noise.
    The main issue here is chroma noise, and VirtualDub CCD (camcorder color denoise) is the cNR needed.

    More can be applied, but the cNR is a quick minimum.

    The clip is far too short to worry about stabilization yet. I never even consider stabilization unless its a constant issue through the tape/video. Or only when certain scenes are required.
    Want my help? Ask here! (not via PM!)
    FAQs: Best Blank DiscsBest TBCsBest VCRs for captureRestore VHS
    Quote Quote  
  18. Capturing Memories dellsam34's Avatar
    Join Date
    Jan 2016
    Location
    Member Since 2005, Re-joined in 2016
    Search PM
    More of a luma noise, Chroma doesn't have the fine details the luma has, The fine grains are typical luma noise in low light condition, an inherit problem of CCD's back in the day, lollo did an excellent job almost eliminating it without loosing much details but leaving behind the chroma blotches, but dealing with those will damage the video further.
    Quote Quote  
  19. Video Restorer lordsmurf's Avatar
    Join Date
    Jun 2003
    Location
    dFAQ.us/lordsmurf
    Search Comp PM
    Originally Posted by dellsam34 View Post
    More of a luma noise, Chroma doesn't have the fine details the luma has, The fine grains are typical luma noise in low light condition, an inherit problem of CCD's back in the day, lollo did an excellent job almost eliminating it without loosing much details but leaving behind the chroma blotches, but dealing with those will damage the video further.
    That could be. At minimum, you have to remove the chroma noise, see if luma exists. I didn't run a test of the clip.
    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!