VideoHelp Forum




+ Reply to Thread
Page 2 of 2
FirstFirst 1 2
Results 31 to 50 of 50
  1. Originally Posted by jmac698 View Post
    Sorry to confuse you It's only used for examining the settings to use. I did say the script was a mess...
    Btw, how to average all frames in a clip, pixel by pixel?
    I'm not sure if this is what you mean but I know the ColorTools has an "accumulate across frames" option when calling for it's RGB & Luma "Histograms"...maybe you mean something similar to that?
    Quote Quote  
  2. Serves me right for being lazy
    Code:
    #cherbette part2 after dejitter processing
    
    AVISource("D:\project001a\sampleproblem5\cherbette.avi")
    ref=crop(200,50,50,100)#Set this to an area in the scene which you know doesn't change
    refbright=getrefbright(ref)
    stabilizebrightness(last,ref,refbright)
    
    MCTemporalDenoise(settings="low")
    QTGMC( Preset="Slow" , Sharpness=1.2, SLMode=1)
    selecteven
    
    function getrefbright(clip v){
        v
        current_frame=0
        AverageLuma
    }
    
    function stabilizebrightness(clip v, clip ref, float refbright){
        ScriptClip(v,"""
        b=ref.averageluma
        tweak(bright=refbright-b)
        #subtitle(string(b)).subtitle(string(refbright),y=16)
        """, args="ref, refbright")
    }
    Quote Quote  
  3. My advice for select ref, is to find an area as vertically high as practical (but which shouldn't change, like the wall in a background), and a little wide (8 wide or so minimum, but wider is better)
    You can even select spots where it's moving, but there may be a slight dimming in the overal video as it's zooming in.

    The long shots showing the crowd will be hardest to fix. One good thing about this video actually is the timestamp, you could actually use the first few digits as your brightness reference.
    Quote Quote  
  4. Ok,
    here's the logical conclusion of my technique
    http://www.sendspace.com/file/ivxne6
    I'll go ahead and say it this time - the flickering is almost perfect. Needs just a little tweaking. I'm afraid that while this technique is very powerful, it really needs some kind of steady background to reference.

    What else is wrong with it? I can fix the color streak at the top, for example..
    Quote Quote  
  5. Member
    Join Date
    Jul 2009
    Location
    Spain
    Search Comp PM
    Originally Posted by jmac698 View Post
    Btw, how to average all frames in a clip, pixel by pixel?
    Do you mean to get the average luma over all frames, for example?
    Code:
    GScript("""
      sum = 0.0
      for (current_frame=0, FrameCount()-1) {
        sum = sum + AverageLuma()
      }
      avg = tot/FrameCount()
    """)
    It will slow down script loading, as it (inevitably) has to read each frame at compile-time.
    Quote Quote  
  6. No, the average picture, pixel-by-pixel. Like if I wrote average(v.trim(0,-1),1/framecount(v),v.trim(1,1),1/framecount(v)...)
    Quote Quote  
  7. Originally Posted by jmac698 View Post
    Ok,
    here's the logical conclusion of my technique
    http://www.sendspace.com/file/ivxne6
    I'll go ahead and say it this time - the flickering is almost perfect. Needs just a little tweaking. I'm afraid that while this technique is very powerful, it really needs some kind of steady background to reference.

    What else is wrong with it? I can fix the color streak at the top, for example..
    So is it safe to use the time ticker as my reference for your script or is it more efficient to use a stable spot in the background?
    Quote Quote  
  8. You'll just have to try it.

    My new sample uses a new technique, but that one needs a sample from a steady background for the whole frame to work. Mostly just wanted to see what it looks like. My conclusion is that your video is really quite good, if it can be dejittered and the variation in brightness line-by-line removed, what's left is fine, with a little denoising.
    Quote Quote  
  9. I agree...it's really not in that bad of shape. There are some scenes that are extremely washed-out later on though...I'm hoping maybe I might be able to stabilize them using scenes that don't have the brightness flicker....and of course eventually correct the time base errors on the scenes with darker edges (audience shots of Cher from afar etc). It's all a work in progress.

    May I ask what your new technique is?
    Quote Quote  
  10. I have to say it's not really user friendly, but I find a stable background on each line, then average that out for many frames, then use that as a reference brightness for the same spot.
    For example if pixel 50 on line 1 is supposed to be 140, but this frame it's 132, then I increase the brightness for the whole line by +8. Now that reference pixel is perfect, and due to this type of noise being only changes in brightness for the whole line, the whole line is perfect too.

    Did you see my latest video?
    Quote Quote  
  11. I sure did...it looks much more stable than before and seemingly better than the results I was getting toying around with trying to do it on my end.
    Quote Quote  
  12. This should work for the whole video:
    Code:
    #cherbette part2 after dejitter processing
    
    AVISource("D:\project001a\sampleproblem5\cherbette.avi")
    ref=Crop(76, 400, -558, -40)#3 digits of time counter
    refbright=getrefbright(ref)
    stabilizebrightness(last,ref,refbright)
    
    #MCTemporalDenoise(settings="low")
    #QTGMC( Preset="Slow" , Sharpness=1.2, SLMode=1)
    #selecteven
    
    function getrefbright(clip v){
        v
        current_frame=0
        AverageLuma
    }
    
    function stabilizebrightness(clip v, clip ref, float refbright){
        ScriptClip(v,"""
        b=ref.averageluma
        tweak(bright=refbright-b)
        #subtitle(string(b)).subtitle(string(refbright),y=16)
        """, args="ref, refbright")
    }
    Quote Quote  
  13. Thanks once again Jmac...can't wait to test it out. I'll post some result clips
    Quote Quote  
  14. http://www.mediafire.com/?ogs31usfm7bs565

    Here's a couple minutes before and after Jmac's latest script...
    Quote Quote  
  15. Interesting, the flicker to me just passed the threshold from being annoying to noticeable, but watchable. Also you can increase threshold in the dejitter script to fix the few flickering lines up top. It doesn't look like you ran a pass with mctd and gmtc.

    There's ringing on the edges and color bleed. I'm not the expert on this stuff, someone else probably has solutions for it.

    There's a spot where she's leaning over that dejitter doesn't seem to work, that's weird.

    I don't know how you managed to suffer through my slow dejitter script What kind of machine do you have?
    Quote Quote  
  16. It only took I think 6 hrs for that 2 minute segment lol...I just let it process overnight. I'll toy around with the dejitter threshold. I didn't run mctd or gmtc just yet but I will..I just wanted to demonstrate the "deflicker" alone.
    Quote Quote  
  17. Oh man.. well the good news is I'm learning how to write plugins in C, cause I know my script is just too slow. In fact, the sooner I get back to that project, the sooner everyone will get to use it so...
    Quote Quote  
  18. That is GREAT news! I'll definitely be eying the progress
    Quote Quote  
  19. Ok I wrote my first useful plugin, it's called decomet and is useful for cleaning up VHS recordings with black streaks or dropouts. However it relies on a special technique where you have to record the video twice. I've found that the dropouts especially appear at different spots in the video, so it's easy to remove them. The black streaks seem to stay more in the same area but the plugin still reduces them. It's not perfect but it does make a difference.

    http://forum.doom9.org/showthread.php?goto=newpost&t=163049

    Anyhow that has not much to do with your sample, just to inform you that I'm working on a dejitter plugin
    Quote Quote  
  20. That one sounds like it could be useful on some things I have...
    Quote Quote  
Visit our sponsor! Try DVDFab and backup Blu-rays!