Log in

View Full Version : Another deflicker idea


Osmiridium
5th February 2006, 22:26
Hiya people

Recently I've been struggling to get rid of flicker on a capture from an old local history video. If I haven't been using the existing filters properly - then my apologies to the authors.

Strong temporal smoothing was able to kill the flicker - but of course smoothed out way too much detail. But then an idea struck while reading about Fizick's EquLines filter. What if I used a super-smoothed clip merely as a reference - and fed the average luma for each line of this reference clip back into the source clip? I knocked together a little scriptette and plugin-ette to test this - and (for my video at least) it worked pretty well. Detail was preserved, and the flicker was very much reduced.

It may be of use to someone else - so here it is then. Each clip can be in YUY2 or YV12 format - but their heights must be the same. I should say I'm very much a video newbie, so I hope this hasn't all been done before. :scared:


LoadPlugin("wdeflicker.dll")

dodgy=AviSource("flickery_clip.avi")
smoothed=dodgy.TemporalSoften(5,40,40,70) # Smooth out any flicker

WDeflicker(dodgy,smoothed) # Deflicker clip "dodgy", using clip "smoothed"

Mug Funky
6th February 2006, 07:53
you might want to try tsp's medianblurt as a smoother if you're only using if for averageluma. it'll be pretty slow though.

good idea.

O.S.D
24th April 2006, 11:53
Hi

I want to know what this means:

dodgy=AviSource("flickery_clip.avi")

and can i replace it? becouse if i use it the AviSource
get loaded twise and the filters before this filter getts bypassed.

:thanks:

Osmiridium
26th April 2006, 10:56
Hiya O.S.D.

Sorry it's taken a day or two to get back to you. If I've understood what you're doing, you simply have to change the "dodgy=" line to:

dodgy=last

You might find it useful to play around a little with the TemporalSoften parameters (the values I gave seemed to work best on my particular clip). Or use Mug Funky's medianblurt suggestion instead of TemporalSoften. If your values are too strong dark horizontal lines may appear in scenes with high contrast.

I should remind you too that other deflicker filters are available, which may be more suited to your clip. :D

Blue_MiSfit
6th June 2006, 21:00
Worked VERY well for me. I was encoding Rebel Without a Cause (classic!) - an NTSC DVD that had been remastered very nicely. Excellent contrast and noise removal for such old film. Unfortunately, there was a lot of flickering, either as a byproduct of filtering, or the film itself.

WDeFlicker did the job perfectly, using the settings mentioned on this page. It's a little slow - full speed playback takes about 50% of my FX-55 equivalent, so encoding takes a little longer than usual, but it totally took care of the problem.

Encoding cropped anamorphic with AC3 audio to 1/2 DVD+R was transparent (perhaps superior), no other filtering. Very nice.

~MiSfit