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:
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?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)
+ Reply to Thread
Results 31 to 60 of 280
-
-
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.
-
-
-
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.
-
Ignore the troll, holygamer. Like a little puppy dog, he just craves attention.
-
-
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.
-
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)
Code:DeGrainMedian(limitY=2, limitUV=3, mode=1, interlaced=true) DeGrainMedian(limitY=2, limitUV=3, mode=1, interlaced=true)
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.
-
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.
-
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)
}
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.
-
Thanks. The video looks great now. But if I just wanted to remove the flicker, what part of your script would I use?
-
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.
-
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 -
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.
-
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. -
-
Sanlyn, can you please upload a text file containing the script you used. Thanks
-
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.
-
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.
-
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.
-
ChromaShift is a filter, not a script. How hard is it to do a google search for "avisynth chromashift"?
-
Chromashift 2.7
http://www.geocities.com/siwalters_uk/chromashift27.zipLast edited by sanlyn; 21st Mar 2014 at 07:44.
-
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)
Similar Threads
-
Annoying flicker from 8 mm film
By mexuser in forum Newbie / General discussionsReplies: 3Last Post: 29th Mar 2011, 19:31 -
Flicker on DVD Menu
By Funky Monk in forum Authoring (DVD)Replies: 1Last Post: 12th Sep 2009, 17:42 -
Denoising Audio on xvid4psp
By tofuguy in forum AudioReplies: 1Last Post: 1st Dec 2008, 11:01 -
Where to find Benchmark Images to test Deinterlacing, Denoising, Scaling...
By gfxcat in forum Newbie / General discussionsReplies: 6Last Post: 7th Apr 2008, 20:37 -
Flicker effect
By wan2no in forum EditingReplies: 1Last Post: 26th Jul 2007, 20:38