VideoHelp Forum




+ Reply to Thread
Page 2 of 10
FirstFirst 1 2 3 4 ... LastLast
Results 31 to 60 of 280
  1. Thanks guys, I appreciate your help on this. I also checked in VirtuaDub and can confirm what you're saying about the order of the settings.

    Does the scene change threshold refer to the amount of scenes in a clip? I've uploaded a new clip which has 6 scenes. I haven't deflickered it yet.

    Guys, I'm confused about how to get it to show the scene changes so I can find out what setting to use for the "Scene change threshold". This is the script I used:

    Code:
    DeFlick(0, 12, 1, 6, 1) # (window size, softening (removes the flicker), interlaced (0 off or 1 on), scene change threshold, show scene change (0 off or 1 on)
    I made a video with the above script and I don't see any red in the video. I'm completely lost. Isn't there like a safe scene change threshold setting I could just use for all my wrestling vidoes? Any idea what that would be?
    Quote Quote  
  2. Forgot to upload the clip! Here it is: CLIP
    Quote Quote  
  3. I ran Deflicker on an old movie with a lot of flicker. I set the scene change threshold to 8 to 10 and it was pretty good about seeing the scene changes but not triggering on normal flicker. The threshold is basically how different successive frames have to be before it decides it's a new scene.
    Quote Quote  
  4. Originally Posted by jagabo View Post
    I ran Deflicker on an old movie with a lot of flicker. I set the scene change threshold to 8 to 10 and it was pretty good about seeing the scene changes but not triggering on normal flicker. The threshold is basically how different successive frames have to be before it decides it's a new scene.
    So is 8-10 good or bad and should I use that setting?
    Quote Quote  
  5. Originally Posted by holygamer View Post
    So is 8-10 good or bad and should I use that setting?
    That last video didn't need any deflickering. But if you must, you might want to go with a lower scene change threshold so the deflicker filter doesn't try to suppress the camera flashes.
    Quote Quote  
  6. Thanks for your help.
    Last edited by VideoFanatic; 1st Dec 2011 at 14:27.
    Quote Quote  
  7. Banned
    Join Date
    Dec 2010
    Location
    New York
    Search Comp PM
    Don't mention Virtualdub as an option for filtering. Manono says it's a naughty, naughty thing to do. And we all listen to him here.
    Quote Quote  
  8. Why, what's wrong with using a Virtualdub filter in Avisynth?
    Quote Quote  
  9. Ignore the troll, holygamer. Like a little puppy dog, he just craves attention.
    Quote Quote  
  10. Banned
    Join Date
    Dec 2010
    Location
    New York
    Search Comp PM
    Well....not quite. See below.
    Quote Quote  
  11. Banned
    Join Date
    Oct 2004
    Location
    New York, US
    Search Comp PM
    Avisynth can't do everything. Neither can VirtualDub. Each tool has its uses and its rules. To say you should never filter with VirtualDub is like saying you should never process video with FinalCut, AfterEffects, Vegas, or Premiere. It might be a point to remember that almost all video begins as analog Red-Green-Blue and gets decimated by conversion to YUV in the first place. For that reason, many problems must be fixed in YUV (which usually means working with Avisynth), and manono is one excellent teacher and an expert with Avisynth. I can understand manono's caution, which is often justified.
    Last edited by sanlyn; 21st Mar 2014 at 07:43.
    Quote Quote  
  12. yv12 > rgb convertions has been solved with avisynth 2.6 so it's not justified anymore to think like this sanlyn
    *** DIGITIZING VHS / ANALOG VIDEOS SINCE 2001**** GEAR: JVC HR-S7700MS, TOSHIBA V733EF AND MORE
    Quote Quote  
  13. We've veered off the subject of my thread somewhat! My original problem was that after denoising I still have flicker.

    I've tried VirtualDub's Deflicker filter in AviSynth but it causes motion trails.

    I've tried each of the following but it gives minor blocking artefacts:

    Code:
    TTempSmooth(maxr=3, lthresh=8, cthresh=5, strength=4, interlaced=true) 
    
    TTempSmoothF (maxr=3, lthresh=8, cthresh=5, interlaced=true)
    
    I've tried DeGrainMedian but it just denoises - it doesn't remove the flicker:

    Code:
    DeGrainMedian(limitY=2, limitUV=3, mode=1, interlaced=true)
    DeGrainMedian(limitY=2, limitUV=3, mode=1, interlaced=true)
    I could use DeBlock() after ttempsmooth but it doesn't get rid of the blocking artefacts caused by ttempsmooth.

    I have a 1 hour 30 minute video and I'm looking for something to remove the flicker without leaving artefacts, which is fast which will take less than 3 hours.
    Quote Quote  
  14. Banned
    Join Date
    Oct 2004
    Location
    New York, US
    Search Comp PM
    Originally Posted by themaster1 View Post
    yv12 > rgb convertions has been solved with avisynth 2.6 so it's not justified anymore to think like this sanlyn
    I don't understand that one. IMHO both tools are useful and necessary. I use Avisynth regularly and wish I knew more about it, but I'm not up to speed with C++ and assembly well enough to get into Avisynth as deeply as I'd like. I don't mean to denigrate either of these tools.
    Last edited by sanlyn; 21st Mar 2014 at 07:43.
    Quote Quote  
  15. Banned
    Join Date
    Oct 2004
    Location
    New York, US
    Search Comp PM
    Another try with deflick on the "original" sample mpg posted earlier, here (post #5):
    https://forum.videohelp.com/threads/341188-Still-have-flicker-after-Denoising-with-AviS...=1#post2123866

    Still some problems, but the main point here is using an overlay with chubbyrain2 to clean just the top 60 pixels instead of softening the whole image. Script (thanks to jagabo for most of it, from this thread and earlier posts):

    LoadVirtualDubPlugin("D:\VirtualDub\plugins\deflick.vdf", "DeFlick")

    Mpeg2Source("G:\forum\flicker\Original.d2v", CPU=2)
    ColorYUV(gain_y=40, off_y=-36) # --- fix levels
    AssumeTFF()
    QTGMC() # --- deinterlace
    FixChromaBleeding()
    a=last

    #---top border = 60 pixels
    a
    chubbyrain2()
    smoothuv(radius=7)
    crop(0,0,0,-420,true)
    b=last

    #---overlay the top onto original
    overlay(a,b)
    c=last

    c
    ConvertToRGB32() # --- necessary for VirtualDub filters
    DeFlick(0, 12, 0, 256, 0)
    AssumeTFF().SeparateFields().SelectEvery(4, 0, 3).Weave()
    return last


    function ChubbyRain2(clip c, int "th", int "radius", bool "show", int "sft")
    {
    # ---- based on Mug Funky's ChubbyRain ----
    th = default(th,10)
    radius = default(radius,10)
    show = default(show,false)
    sft = default (sft, 10)
    u = c.utoy()
    v = c.vtoy()
    uc = u.mt_convolution(horizontal="1",vertical="1 -2 1",Y=3,U=0,V=0)
    vc = v.mt_convolution(horizontal="1",vertical="1 -2 1",Y=3,U=0,V=0)
    cc = c.mt_convolution(horizontal="1",vertical="1 2 1",Y=2,U=3,V=3).bifrost(interlaced=false).cnr2().t emporalsoften(radius,0,sft,2,2)
    rainbow=mt_lutxy(uc,vc,Yexpr=string("x y + "+string(th)+" > 256 0 ?")).pointresize(c.width,c.height).mt_expand(y=3,u =-128,v=-128)#.blur(1.5)
    overlay(c,cc,mask=rainbow)
    show==true? rainbow : last
    }


    Function FixChromaBleeding (clip input)
    {
    # prepare to work on the V channel and reduce to speed up and filter noise
    area = input.tweak(sat=4.0).VtoY.ReduceBy2

    # select and normalize both extremes of the scale
    red = area.Levels(255,1.0,255,255,0)
    blue = area.Levels(0,1.0,0,0,255)

    # merge both masks
    mask = MergeLuma(red, blue, 0.5).Levels(250,1.0,250,255,0)

    # expand to cover beyond the bleeding areas and shift to compensate the resizing
    mask = mask.ConvertToRGB32.GeneralConvolution(0,"0 0 0 0 0 1 1 1 0 0 1 1 1 0 0 0 0 0 0 0 0 0 0 0 0").ConvertToYV12

    # back to full size and binarize (also a trick to expand)
    mask = mask.BilinearResize(Width(input),Height(input)).Le vels(10,1.0,10,0,255)

    # prepare a version of the image that has its chroma shifted and less saturated
    input_c = input.ChromaShift(C=-4).tweak(sat=0.8)

    # combine both images using the mask
    return input.overlay(input_c,mask=mask,mode="blend",opaci ty=1)
    }
    Results (NTSC MPEG2, AC3 AUDIO, 640x480 display, 13MB):
    http://dc441.4shared.com/download/Ddro2U8E/deflik6_NV2.mpg

    I tried other tools, like FixChromaBleeding() -- never knew this plugin to really fix bad chroma bleed, but it did smooth some irregular response peaks in Red and Blue. Also played with color in VirtualDub (the original is too blue) and some tricks with the red and blue bleed. I used NeatVideo at very low power, mainly for smoothing than general NR. I didn't find anything that helped totally scrub the grainy junk in the left background. NeatVideo helped a little, but this run isn't a fair test for NV because the sample noise patch was from another video -- similar to this noise, but still not the same. I tried other YUV and RGB smoothers, but they over-smoothed when used strong enough to clean up that background noise.

    Another learning experience.
    Last edited by sanlyn; 21st Mar 2014 at 07:43.
    Quote Quote  
  16. Thanks. The video looks great now. But if I just wanted to remove the flicker, what part of your script would I use?
    Quote Quote  
  17. Banned
    Join Date
    Oct 2004
    Location
    New York, US
    Search Comp PM
    There's no flicker. I think you're referring to compression artifacts/tape noise. You can apply stronger (and more) filters to clean up the blackish noise on the left, but there's a downside: you won't have any video left. I (or someone) can add more and stronger filters (I can try that tomorrow), but all filters are destructive to some degree. I even turned NeatVideo down to nearly nothing to keep from turning the main figure into a blur. Will try another sample later. Making this clip entirely progressive would help as well.
    Last edited by sanlyn; 21st Mar 2014 at 07:43.
    Quote Quote  
  18. You fixed the original video with your script. The first post I made mentioned that I still had flicker after denoising. This is the video.

    Your script removed all the noise and flicker from the original video. So could you please tell me what part of your script I could use to just remove the flicker (or whatever you want to call it). Thanks
    Quote Quote  
  19. Banned
    Join Date
    Oct 2004
    Location
    New York, US
    Search Comp PM
    Actually, almost all of that background flicker and brightness fluctuation was removed by DeFlicker as set up by jagabo earlier. The noise the other filters removed was fine-grain tape noise. Remove Deflicker from the process, and the background fluctuations return. NeatVideo at low power is pretty adept at cleaning fine-grain tape noise after you run DeFlicker; FFT3D or similar filters in temporal mode would work just as well, as would AviSynth's own TemporalSoften() at default settings.

    If what you mean is that you want to remove the bright electronic flashes and lens flare, frame-by-frame, that's neither tape noise nor problem flicker. For grainy tape you can give TemporalSoften at default a try with: TemporalSoften(4,4,8,15,2). If you're using lots of temporal filters with it you should tone some of them down a bit, or detail and motion will start smearing and ghosting.
    Last edited by sanlyn; 21st Mar 2014 at 07:43.
    Quote Quote  
  20. holygames, I don't think you understand what "flicker" is as it pertains to DeFlicker filters. In that context it refers a change in brightness of the entire frame. It's typically caused by erratic exposure of film frames, either while filming (common in old movies), or during the telecine or digitization process.

    If only parts of the frame are flickering, and different parts are flickering differently, that's a temporal noise issue, not something a DeFlicker filter will address.
    Quote Quote  
  21. Sanlyn, I tried your script and I get this error message in HC Encoder: "error loading Avisynth script, Script error: expected a , or ) (I:New\DeFlick.avs, line 67, column 60}"

    It's referring to the 2nd last line of the script.
    Quote Quote  
  22. Originally Posted by holygamer View Post
    Sanlyn, I tried your script and I get this error message in HC Encoder: "error loading Avisynth script, Script error: expected a , or ) (I:New\DeFlick.avs, line 67, column 60}"

    It's referring to the 2nd last line of the script.
    Hint: "opaci ty". The forum software sometimes adds extra spaces.
    Quote Quote  
  23. Sanlyn, can you please upload a text file containing the script you used. Thanks
    Quote Quote  
  24. Banned
    Join Date
    Oct 2004
    Location
    New York, US
    Search Comp PM
    Originally Posted by holygamer View Post
    Sanlyn, I tried your script and I get this error message in HC Encoder: "error loading Avisynth script, Script error: expected a , or ) (I:New\DeFlick.avs, line 67, column 60}"

    It's referring to the 2nd last line of the script.
    Unfortunately, when this forum's software publishes text in these threads, it has a habit of inserting blanks where they don't belong. Look at that line, and if you see a blank in the word "opaci ty" as shown here, delete the blank space so that the word reads "opacity". Gotta be carefiul when copying scripts in this forum, look 'em over and make sure you don't have extra blanks inside words. The word "interlaced" is a common victim, it often comes out "inter laced".

    I used NeatVideo to tweak the cleanup and a gradation curve color filter to fix the overly bright blue. If you don't have NeatVideo, you can use TemporalSoften in the script, but before you go to RGB and before you call Deflick. TemporalSoften works in YUY2, not in RGB. Or . . . you can use VirtualDub's built-in temporal smoother set to 3 or 4 (don't go beyond 4 with this video). The two smoothers are similar, but AviSynth's is somewhat cleaner and stronger.
    Last edited by sanlyn; 21st Mar 2014 at 07:44.
    Quote Quote  
  25. Banned
    Join Date
    Oct 2004
    Location
    New York, US
    Search Comp PM
    I added some stronger smoothers to address that left-hand blackish noisy stuff. Yeah, fixed it all right, and destroyed the video in the process. Really bad motion blue and smear, especially the guy's head movements, and the mask started looking like rubber instead of leather. Ugly.
    Last edited by sanlyn; 21st Mar 2014 at 07:44.
    Quote Quote  
  26. Fixed opacity, but now it says no function named ChromaShift line 64 and line 6. Could you please upload a text file of the script.
    Quote Quote  
  27. ChromaShift is a filter, not a script. How hard is it to do a google search for "avisynth chromashift"?
    Quote Quote  
  28. Banned
    Join Date
    Oct 2004
    Location
    New York, US
    Search Comp PM
    Last edited by sanlyn; 21st Mar 2014 at 07:44.
    Quote Quote  
  29. Sanlyn, I appreciate the time you took to write that massive script but as the title of my thread suggests - it's really just the flicker that I wanted to fix! I've got thousands of videos and I don't have the time to analyse and write a script for each one so I just concentrate on removing the blocking, grain, other noise and flicker.

    This is the script I use but it gives motion trails:

    Code:
    LoadVirtualDubPlugin("C:\Program Files\AviSynth 2.5\plugins\deflick.vdf","DeFlick")
    Mpeg2Source("RAW May 19 1997 before AviSynth 2.d2v", CPU=6)
    DeGrainMedian(limitY=2, limitUV=3, mode=1, interlaced=true)
    DeGrainMedian(limitY=2, limitUV=3, mode=1, interlaced=true)
    ConverttoRGB32(interlaced=true)
    DeFlick(0, 12, 1, 6, 0) # (window size, softening (removes the flicker), interlaced (0 off or 1 on), scene change threshold, show scene change (0 off or 1 on)(window size, softening (removes the flicker), interlaced (0 off or 1 on), scene change threshold, show scene change (0 off or 1 on)
    ConvertToYV12() 
    AddBorders(8, 0, 8, 0)
    Your video doesn't have the motion trails. Which parts of your script should I use if I just want to remove the flicker?
    Quote Quote  



Similar Threads

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