VideoHelp Forum

Our website is made possible by displaying online advertisements to our visitors.
Please consider supporting us by disabling your ad blocker or buy a VSO converter software :)
+ Reply to Thread
Results 1 to 11 of 11
Thread
  1. Member
    Join Date
    Jul 2017
    Location
    Connecticut
    Search PM
    I need help stabilizing and removing the dust and scratches. I don't want to use the wrong filters and destroy the footage. i included 2 samples to show the wobble and dirt and scratches.
    Image Attached Files
    Quote Quote  
  2. I have "Brave Little Toaster" on one of my old laserdiscs, and don't remember the flicker you see in sample2. I'm not sure where they came from and I'm sure you can get a better source. Sample 1 looks fine to me and I don't know why you'd bother trying to do anything. Just watch the movie and enjoy it!
    Quote Quote  
  3. Something like this (original on the left, cleaned on the right)?
    Image Attached Files
    Quote Quote  
  4. Member
    Join Date
    Jul 2017
    Location
    Connecticut
    Search PM
    That's exactly what I want jagabo. Is that deflicker?
    Quote Quote  
  5. Member
    Join Date
    May 2014
    Location
    Tennessee, US
    Search Comp PM
    I'd guess it's Avisynth's ReduceFlicker() and Stab(). The audio pitch and pacing are completely off. There are better ways to get animation film rates up to PAL fps without just speeding up the works. Really annoying when PAL does that.
    - My sister Ann's brother
    Quote Quote  
  6. Originally Posted by Starfx View Post
    That's exactly what I want jagabo. Is that deflicker?
    I used Donald Graft's deflicker filter for VirtualDub's in AviSynth, Stab, and a few other things:
    Code:
    LoadVirtualDubPlugin("g:\Program files\VirtualDub\plugins\deflick.vdf","DeFlick") 
    import("C:\Program Files (x86)\AviSynth\plugins\TemporalDegrain.avs") 
    import("C:\Program Files (x86)\AviSynth\plugins\RemoveDirtMC.avs") 
    
    Mpeg2Source("sample1.d2v", CPU2="ooooxx", Info=3) # dering
    
    Stab(range=3, dxmax=4, dymax=4)
    Crop(6,4,-10,-4)
    
    ConvertToRGB32()
    #DeFlick(window size, softening, interlaced, scene change threshold, show scene change)
    DeFlick(8, 6, 0, 10, 0) 
    ConvertToYV12()
    
    TemporalDegrain(SAD1=100, SAD2=75, sigma=4)
    RemoveDirtMC(20)
    Dup(threshold=5.0, blend=true, show=false)
    Deflicker left a little bit of flicker, which was further reduced with TemporalDegrain. And, of course, TemporalDegrain removed a lot of noise. Using higher value for softening in deflicker, or higher values in TemporalDegrain will remove flicker better (and give better temporal noise reduction) but will lead to blending artifacts and some loss of detail, especially in panning shots. RemoveDirtMC() removed most of the spots that only appear for only a single frame. It can't remove spots that appear over multiple frames.

    Dup (near duplicate frames become exact duplicates) was used to reduce some of the rolling shutter wiggle where parts of the frame move independent of other parts. The high threshold was needed to reduce the wiggle, but leads to some blending of frames when there are only tiny differences between frames. Original on the left blended mouth on the right:

    Click image for larger version

Name:	blend.jpg
Views:	19
Size:	23.8 KB
ID:	42793

    Using blend=false will help reduce that but you will then miss some unique frames. Using a lower threshold will also reduce the blending (or missing unique frames) but you will get less stabilization. Of just don't use it at all and live with the mild wiggle.
    Quote Quote  
  7. Member
    Join Date
    May 2014
    Location
    Tennessee, US
    Search Comp PM
    Originally Posted by jagabo View Post
    Code:
    LoadVirtualDubPlugin("g:\Program files\VirtualDub\plugins\deflick.vdf","DeFlick") 
    import("C:\Program Files (x86)\AviSynth\plugins\TemporalDegrain.avs") 
    import("C:\Program Files (x86)\AviSynth\plugins\RemoveDirtMC.avs") 
    
    Mpeg2Source("sample1.d2v", CPU2="ooooxx", Info=3) # dering
    
    Stab(range=3, dxmax=4, dymax=4)
    Crop(6,4,-10,-4)
    
    ConvertToRGB32()
    #DeFlick(window size, softening, interlaced, scene change threshold, show scene change)
    DeFlick(8, 6, 0, 10, 0) 
    ConvertToYV12()
    
    TemporalDegrain(SAD1=100, SAD2=75, sigma=4)
    RemoveDirtMC(20)
    Dup(threshold=5.0, blend=true, show=false)
    Clever use of the dup plugin, first time I've seen it used anywhere. I got similar results (but not quite as wiggle free) with QTGMC/SelectOdd and some other stuff, reduced the speed to film rate and used DGpulldown to get 25fps and to make it sound like a movie instead of Alvin and the Chipmunks. Thanks for your notes on that script.
    - My sister Ann's brother
    Quote Quote  
  8. Video Restorer lordsmurf's Avatar
    Join Date
    Jun 2003
    Location
    dFAQ.us/lordsmurf
    Search Comp PM
    Hmmm...
    I need to try dup() for the software TBC and a de-blend script that I've been toying with.
    Quote Quote  
  9. Keep in mind that Dup only works when there are two or more still frames in a row. I tried something like this for when there is motion in only parts of the frame:

    Code:
    p00 = Crop((width/4)*0, (height/4)*0, width/4, height/4).Dup(threshold=5, blend=true)
    p01 = Crop((width/4)*1, (height/4)*0, width/4, height/4).Dup(threshold=5, blend=true)
    p02 = Crop((width/4)*2, (height/4)*0, width/4, height/4).Dup(threshold=5, blend=true)
    p03 = Crop((width/4)*3, (height/4)*0, width/4, height/4).Dup(threshold=5, blend=true)
    
    p10 = Crop((width/4)*0, (height/4)*1, width/4, height/4).Dup(threshold=5, blend=true)
    p11 = Crop((width/4)*1, (height/4)*1, width/4, height/4).Dup(threshold=5, blend=true)
    p12 = Crop((width/4)*2, (height/4)*1, width/4, height/4).Dup(threshold=5, blend=true)
    p13 = Crop((width/4)*3, (height/4)*1, width/4, height/4).Dup(threshold=5, blend=true)
    
    p20 = Crop((width/4)*0, (height/4)*2, width/4, height/4).Dup(threshold=5, blend=true)
    p21 = Crop((width/4)*1, (height/4)*2, width/4, height/4).Dup(threshold=5, blend=true)
    p22 = Crop((width/4)*2, (height/4)*2, width/4, height/4).Dup(threshold=5, blend=true)
    p23 = Crop((width/4)*3, (height/4)*2, width/4, height/4).Dup(threshold=5, blend=true)
    
    p30 = Crop((width/4)*0, (height/4)*3, width/4, height/4).Dup(threshold=5, blend=true)
    p31 = Crop((width/4)*1, (height/4)*3, width/4, height/4).Dup(threshold=5, blend=true)
    p32 = Crop((width/4)*2, (height/4)*3, width/4, height/4).Dup(threshold=5, blend=true)
    p33 = Crop((width/4)*3, (height/4)*3, width/4, height/4).Dup(threshold=5, blend=true)
    
    
    StackVertical(\
      StackHorizontal(p00,p01,p02,p03),\
      StackHorizontal(p10,p11,p12,p13),\
      StackHorizontal(p20,p21,p22,p23),\
      StackHorizontal(p30,p31,p32,p33))
    Ie, breaking the frame up into 16 sections and running Dup on each section individually. But it's too obvious where the seams are.
    Quote Quote  
  10. An alternative to Dup that might provide a smoother result, you could use my interlaced video adaptation of MugFunky's "filldrops" code. Here it is:

    Code:
    function filldropsI (clip c)
    {
      even = c.SeparateFields().SelectEven()
      super_even=MSuper(even,pel=2)
      vfe=manalyse(super_even,truemotion=true,isb=false,delta=1)
      vbe=manalyse(super_even,truemotion=true,isb=true,delta=1)
      filldrops_e = mflowinter(even,super_even,vbe,vfe,time=50)
    
      odd  = c.SeparateFields().SelectOdd()
      super_odd=MSuper(odd,pel=2)
      vfo=manalyse(super_odd,truemotion=true,isb=false,delta=1)
      vbo=manalyse(super_odd,truemotion=true,isb=true,delta=1)
      filldrops_o = mflowinter(odd,super_odd,vbo,vfo,time=50)
    
      evenfixed = ConditionalFilter(even, filldrops_e, even, "YDifferenceFromPrevious()", "lessthan", "0.1")
      oddfixed  = ConditionalFilter(odd,  filldrops_o, odd,  "YDifferenceFromPrevious()", "lessthan", "0.1")
    
      Interleave(evenfixed,oddfixed)
      Weave()
    }
    I also have the same code for progressive film. You can control how close a near dup has to be from its neighbors by changing the two numbers in the "fixed" lines near the end of the function. They are both set to 0.1 in the script. If you only want to replace frames that are exact duplicates, you set this number to 0.0.

    The difference between this function and "dups" is that this function will use motion estimation to interpolate the new frame, which might provide a smoother result (I'd have to try it out on the actual video to know for sure).
    Quote Quote  
  11. Here's sample of the earlier video with the original Dup() replaced with 16 Dups as in post #9.
    Image Attached Files
    Last edited by jagabo; 13th Aug 2017 at 12:39.
    Quote Quote  



Similar Threads