VideoHelp Forum

Try DVDFab and download streaming video, copy, convert or make Blu-rays,DVDs! Download free trial !
+ Reply to Thread
Results 1 to 9 of 9
Thread
  1. Member
    Join Date
    Jan 2013
    Location
    Florida
    Search Comp PM
    I was wondering if there was something in avisynth that addresses this.

    As I was writing this post, I was going to try to explain what I was seeing, and I was going to use the word "flicker", when I thought that, "deflicker" popped in my mind, as something I had seen mentioned around the avisynth world.

    What I have noticed, or at least think I am noticing, is in my old 8mm home movies I had scanned, there is an occasional frame that is all around brighter, to a degree. Not totally washed out like a "flash frame", but noticeable. I think it is accentuated by the fact that my films were recorded at probably 16fps, and scanned with a 15fps output file (which makes it real easy to get to 30fps)

    But anyways, as I watch them, I notice an occasional bright frame as they play. Noticable. I also noticed that as I played a BD I burned, that when I sped it up to 2x the speed in the PS3, that seemed to really cut down on the visible flicker, but of course at that speed everybody looked cartoonish in the movements.

    I also noticed that when I uploaded the finished file to youtube, it wasn't as noticeable either, by a great degree.

    I am using a tweaked version of John Meyers script for my restoration. In it he has this notation, where he discusses the changes he made to VideoFreds script.: "Deflicker seemed redundant, given all the averaging that takes place with MDegrain, and also the averaging that is done when the autolevels outputs are selected. I include that as a "commented out" option."

    I am not using the autolevels, so I'm thinking this might be something I could add back in by uncommenting it. Now, the proof will be in me doing that and looking at the results. I won't have access to do that for about a day or so, so I thought I'd throw this post up now just to hopefully gain some info on this.

    Deflicker sure sounds like a possible solution, I'm also wondering if that is the best way to go, in the avisynth world. Or has there possibly been a new/improved plugin that does this same function.

    Thank you
    Quote Quote  
  2. MDegrain and similar temporal noise filters will only remove very mild flickering. Deflicker filters are designed to remove the type of flicker you are describing. But they smooth out the average luma of the frames and often don't work well (if different parts of the frame have different changes) and you have to be careful of scene changes.
    Quote Quote  
  3. Member
    Join Date
    Jan 2013
    Location
    Florida
    Search Comp PM
    Thanks Jagabo. It appears that there are no settings for using deflicker, in Johns script it is simply added in at the end of a depan statement ".deflicker()" Does that sound right? Or are there parameters I will need to add in between the parentheses?
    Quote Quote  
  4. I can't provide very much help without an actual snippet of film to see what you are describing. Flicker is usually defined as a somewhat consistent exposure variation. It can be periodic, like the flicker you get if you try to transfer film by simply pointing a video camera at the movie screen, or it can be non-periodic, where there is no "rhythm" or exact repetition to the pattern of exposure variation, but where it is fairly constant. The reason I describe this at length is to differentiate flicker from a random, singular event. You mention the "flash frame" that happens at the beginning of many scenes because the camera shutter was getting up to speed and was rotating too slowly for the first 1-2 frames. That is not flicker, and requires different tactics to remove or partially fix.

    The two things I have found useful to reduce non-rhythmic repeating flicker are:

    Deflicker
    MAnalyse

    The first you've already talked about, and you can use the documentation that jagabo linkd to in order to tweak the defaults, if you wish.

    The second is actually MDegrain2/3, but the setting that you want to change is found in MAnalyse. You need to take each MAnalyse call that precedes MDegrain2/3 and change dct=0 to dct=1, e.g.,:

    Code:
      bvec1 =  MAnalyse(superfilt, isb = true,  delta = 1, blksize=block_size, overlap=block_over,dct=1)
    If you use the script as I posted it, you'll need to change four lines.

    Warning: The script will become extremely slow with dct=1.

    However, it should do a really good job of smoothing out exposure variances. When I have combined it with deflicker, I have sometimes gotten almost perfect results. But, it all depends on the exact nature of your exposure variations.
    Quote Quote  
  5. Member
    Join Date
    Jan 2013
    Location
    Florida
    Search Comp PM
    Thanks jagabo, I found that site last night, but couldn't open it due to the filter at work, where I was. Checked it out after I got home.

    John, I would call what I am seeing like what you describe in the second scenario, no real exact repetition, but overall fairly consistent.

    I've gotten real good at spotting the flash frames and excising them, as you know it's not hard to spot them. I think every one I found, when they were there, was on the first frame of the segment. Haven't found one on the second frame yet.

    I checked the script I'm using, which is 99% yours, and yes, I will need to change the dct to "1" four times, just as you referenced.

    I'm running a 90 minute file through my rig right now, and I am getting roughly 1.35 fps out of my i7-6700HQ based computer, so it'll be awhile before I can try out a segment with the new settings. But it sure sounds promising.

    Thank you all again,

    Bruce
    Quote Quote  
  6. I use a script to find all flash frames. I save the frame numbers to a text file, import them into my NLE (Sony Vegas) as markers, and am then able to go directly to each frame. I then have a script within Vegas (different than AVISynth scripts) that cuts the next frame on the timeline. I could automate the entire process, but sometimes I need to keep the flash frame (when the scene is really short) and once in awhile the flash continues to the next frame, so I have to cut that. On some cameras, there is an exposure variation on the last frame of the previous frame, so I have to check that as well.
    Quote Quote  
  7. If there's little motion between the flash frame and the previous or next, I often replace it with the previous or next frame. If the flash frame occurs in the middle of a shot and there's significant motion, I'll replace it with a motion interpolated frame.

    https://forum.videohelp.com/threads/364731-How-can-I-remove-the-dirt-and-green-spots-fr...=1#post2323171
    Quote Quote  
  8. Originally Posted by jagabo View Post
    If there's little motion between the flash frame and the previous or next, I often replace it with the previous or next frame. If the flash frame occurs in the middle of a shot and there's significant motion, I'll replace it with a motion interpolated frame.
    I've done that as well, especially with Polavision because sometimes the emulsion flakes off, leaving a giant white-hot hole in the center of the film. I then interpolate from the adjacent frame and replace the entire frame.

    Here's a really short Polavision film sequence showing the problem, and then the result after doing interpolation. Not only were there big holes where the emulsion came off, but that emulsion flake stuck to the adjacent film in the reel, creating a huge black spot a few frames later. In addition, as I've posted before, Polavision film sits forever in the chemicals used to develop it, so it is full of chemical spots that cannot be removed with film cleaner. Thus, there is a LOT of dirt removal that must be done chemically.

    https://www.youtube.com/watch?v=gzTistk2Ms0

    However, for flash frames, I seldom have this option. There are two reasons this doesn't work well for flash frames. First of all, the flash frame happens at the beginning of a scene, and therefore the forward vectors from the previous frame are useless. The bigger problem, however, is that despite the name "flash frame," these are seldom completely isolated frames. Very often the next frame, and occasionally the frame after that is also over-exposed, although not as badly as the first frame after the camera starts. Therefore, creating a new frame from one that itself isn't quite right doesn't always work.

    It is generally just easier to remove that bad frame and leave it at that. This is the best approach for flash frames for yet one more reason and that is this: most people imparted a slight movement to the camera when they pressed or released the camera "run" button. These were almost always spring-loaded, and pressing that button usually torqued the camera slightly. As a result, it is very, very common to have movement in the last two and first two frames of every scene that comes from an amateur movie film camera.
    Quote Quote  



Similar Threads