None of the filters you're using in the script you just posted would create motion trails. If you study your original video more closely, you'll see that it already has motion artifacts (look at the guy's nose and details of the leather mask when they move). Look at that mask closely in the video I posted, and pay attention to the rivets on the right side (shadow side) of the guy's mask; you can see remnants of the original motion blur still there. Hold on a bit, and I'll post a revision of that script. Warning: it uses lightweight settings of NeatVideo, but it will run in AviSynth. I'd have to work up something in a different denoiser if you don't want to use that one. The motion smear you saw earlier might be coming from temporal smoothers, but you can always lighten their settings. Back in a bit.
+ Reply to Thread
Results 61 to 90 of 280
-
Last edited by sanlyn; 21st Mar 2014 at 07:44.
-
I can't see motion trails in the original video. If I use the same script without DeFlick then I don't see the motion trails. So I know it's DeFlick that's causing it! If I were to replace DeFlick with TTempSmooth then I get the blocking artefacts. However you want to phrase it, either filter creates or reveals the artefacts which I do not see until I use those filters!
Last edited by VideoFanatic; 4th Dec 2011 at 21:58.
-
Believe me, the original video has some smearing, and the heavy load of noise doesn't help. However, it's more evident on your PC than on TV. I've run DeFlicker in the past, and I ran jagabo's setup severalo times. I don't see that it created any blur. However, some combinations of temporal/spatial filters can have that effect (check out VirtualDub's 2D and SmartSmoother and you'll see what I mean).
The attached .zip file has the same script as earlier, but NeatVideo is added. I can't work bad VHS without it. But -- and this is a big "but" -- you don't use it until you've done all you can in YUV/YCbCr before going to it; use it sparingly and learn its ins and outs, and never use its default profiles. The script requires and supplies the same .dnp (device noise profile) and .nfp (noise filter profile) that I used earlier. You can copy those files wherever you wish, but be sure to change the path in the script to reflect their location. I can't send you a NeatVideo .vdf plugin. It won't work without a license key in your registry and a full install of its support dll's in WIndows. NeatVideo has a free trial (works only up to 640x480, but retail can use 720x480 and pro versions can do more). If it's good enough for Adobe, Vegas, FinalCutPro and the pros, it's good enough for a hobbyist.
NeatVideo runs about the same speed as MCTemporalDenoise, depending on the video and settings. DeFlicker will slow it some more. If you don't have NeatVideo, tweak the settings on the other filters you already use. I go with jagabo's earlier assessment on this: If you use filters strong enough to completely eliminate the blackish junk and everyhting else in this clip, you'll end up with no video and lots of blur.
Here's the revised script. A copy is also in the attached .zip file. Use that copy; the copy below will likely have extra blanks that throw you off.
LoadVirtualDubPlugin("D:\VirtualDub\plugins\deflic k.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)
# ---- Change the PATH below to the location of ".dnp" and ".nfp",
# ---- and your VirtualDub plugin folder. .dnp and .nfp can be
# ---- anywhere you wish. The VirtualDub root folder is a handy place
LoadVirtualDubPlugin("D:\VirtualDub\Plugins\NeatVi deo.vdf","NeatVideo",2)
NeatVideo("G:\forum\flicker\flick1.dnp","G:\forum\ flicker\flick1d.nfp","1.300000", "2", "1", "0")
# --- To lower NeatVideo temporal smoothing, change
# --- the two lines above to read as follows:
#LoadVirtualDubPlugin("D:\VirtualDub\Plugins\NeatV ideo.vdf","NeatVideo",1)
#NeatVideo("G:\forum\flicker\flick1.dnp", "G:\forum\flicker\flick1d.nfp", "1.300000", "1", "1", "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)
}Last edited by sanlyn; 21st Mar 2014 at 07:45.
-
Donald Graft's Deflicker filter for VirtualDub includes a temporal smoother that can cause motion trails/smears.
-
It can indeed. But with the settings used in your script (and repeated here), I see cleaner motion than in the original clip. I'm surprised the filter did that well, I must have used it incorrectly until now.
Last edited by sanlyn; 21st Mar 2014 at 07:45.
-
-
OMG, Gavino, I must be showing my age. For a few weeks I couldn't find the "code" button. I thought maybe it was 'cause I was using Firefox all the time, but now I see -- I always used to go to "Advanced" view instead of Quick Reply.
My bad, for being in such a rush.
Last edited by sanlyn; 21st Mar 2014 at 07:45.
-
holygamer, NeatVideo isn't the only choice. Mainly you need a degrainer that doesn't oversharpen that left-hand tape damage. I'm looking over ways to accomplish the same thing but staying in YUV. NeatVideo does work in its own version of YCbCr, but its input has to be RGB to begin with.
Last edited by sanlyn; 21st Mar 2014 at 07:46.
-
Right now I'm running this clip two ways: one with MCTemporalDenoise alone and more of its functionality turned on (like deblock, for instance), and one with NeatVideo alone. MCTemporalDenoise is running slooowly at 1 frame every 3 minutes, and NV is running 1/4 frame per sec (and people complain that NeatVideo is "slow"!). This is really a messed-up clip. The bigger the mess, the longer it takes. I'm running out for some Christmas shopping, will check it later. Both filters are looking mighty clean, so far.
Last edited by sanlyn; 21st Mar 2014 at 07:46.
-
Newest version of Neat is substantially faster, with multi GPU support
MCTD has partial GPU support, GPU=true lets the FFT3Dfilter portion of MCTD run on FFT3DGPU -
I'm using the new v3 (3 copies, all mine). I'm running both filters at the same time on my pathetic 2.2 GHz and shopping Newegg and Amazon at the same time. My two cooling fans are whirring away. I do note that NV runs faster in VirtualDub than in AviSynth (must have something to do with NV's optimization?), but I wanted to run these deinterlaced. In MCTD I turned on 3 or 4 functions I never used before. MCTD's doc warned me I'd slow things down, so I'm not surprised.
The optimizations you mention: I've had little luck with most of them them so far. But I think my cheap Biostar mobo might have something to do with that. It's sluggish, I think by default. I have a retail Gateway PC with the same Athlon chip, but it must run 3x faster than this. Unfortunately, I can't use my AGP cards on the Gateway. Can't have it all, I guess.Last edited by sanlyn; 21st Mar 2014 at 07:46.
-
-
I understand completley, Gavino. I wrote my last Windows program in 2001. I don't have the slightest idea what's going on now. I can't even type any more.
Last edited by sanlyn; 21st Mar 2014 at 07:46.
-
According to the MCTemporalDenosie doc, FFT3D does run some functions with the "medium" setting. They're both still going. I used the same script as before with FixChromaBleeding and Chubbyrain2, but removed all filters except MCTD in one script and NeatVideo in the other. NV is winning the speed test (it'll finish after lunch), but MCTD seems to be winning the noise and anti-artifact test (it'll finish late tonight). I won't let them run all day, I'll just get enough video to compare more than the 60 frames I have now.
Meanwhile, here's the line I used to load MCTD. It's probably way off base (likely, not even in the ballpark) and must seem utterly idiotic to anyone who knows MCTD better than I do (which is just about everyone, including my wife), but here 'tis:
MCTemporalDenoise(settings="medium",twopass=false, chroma=true,interlaced=false,deblock=true,\
useQED=false,ecrad=3,stabilize=true, maxr=2,edgeclean=true)
I forgot to look up "ecrad". I'm probably running features at cross-purposes, but I'm determined to learn to use this damn monster. Some of this stuff came from ancient examples in doom9. I know: the HTML has a table of features that are activated with "medium", but I tried some settings anyway.Last edited by sanlyn; 21st Mar 2014 at 07:46.
-
sanlyn are you running ATI card in your listed specs ? I think Neat Video works better (speed wise) with Nvidia CUDA enabled cards
-
I don't have a PC that can handle the CUDA. The two ATI's are in two PC's used exclusively for video, where all the software is installed. I don't usually have a speed problem with NeatVideo (within the limits of my Biostar, anyway), it's mainly this messy clip. I don't even have a problem running AftertEffects CS3 on this PC with my 9600XT.
NeatVideo finished, so MCTD picked up considerable speed.
I have plans underway, tho, to build an updated PC next year. After all, it's only $$$Last edited by sanlyn; 21st Mar 2014 at 07:46.
-
GPU is off by default for all settings in the actual .avsi both in the chart and the actual code (at least with the version I'm using 1.4.20 ) . It appears to contradict the mediawiki's chart
http://avisynth.org/mediawiki/MCTemporalDenoise
AFAIK FFT3D is used for all settings and presets, I always thought the "sigma" directly correlated with the "sigma" strength for FFT3Dfilter/GPU , but I don't know enough code details to be sure -
NeatVideo lost the noise test on the left-hand side of the video. The other 2/3 of the image looks pristine. MCTD seems to be more effective so far on that noise. I'll let it run a while and get more of a look when I can get the video in motion.
Not a totally fair test for NeatVideo, as I have no appropriate noise test patch from this clip. I borrowed one from a video with "similar" noise, but that's not the way to do it. Yep, NeatVideo is limited in that respect: many denoisers learn as they go, but NV doesn't.Last edited by sanlyn; 21st Mar 2014 at 07:47.
-
I looked at both (they both say v1.4.20), but I believe you're right. The avsi chart is likely the one I should use. I do see where FFT3D sigma is noted as somewhat high by default and there's a tweak for it, but I let it run as-is.
This is a bit odd, as I ran a toned-down MCTD with NeatVideo in the same script a day or so ago, and it only ran 22 minutes. Well, I'll wait a little longer and see what happens. . . .Last edited by sanlyn; 21st Mar 2014 at 07:47.
-
Never used FFT3Dgpu before, but it just froze my whole 'puter until I killed it. Shucks. Oh, well, MCTD doc warned about that with some cards and OS's. CPU usage banged thru the ceiling at 100%.
Later I'll try some of the plugins separately and see just what they do. I've never used about half of them. Nothing like working with a script that has you learning a dozen plugins at the same time!Last edited by sanlyn; 21st Mar 2014 at 07:47.
-
Well, folks, the surprising news (to me, anyway), is that as far as NR is concerned, it's a draw. NeatVideo was better in some areas, MCTD better in others, but neither could clean up the fluttery stuff on the left of this clip. Both were very slow, but the earlier combo of DeFlick + NeatVideo outperformed both -- as far as the left-hand 1/3 goes. NV and MCTD used alone had cleaner color and edges, contours, etc.. Not all that conclusive, really: NeatVideo didn't have a proper test patch and I don't know MCTD well enough to tweak the right parts. But I'll work on it.
So DeFlick is the tool for the messy left-hand stuff, with NeatVideo to finish the work. So I'm still looking for a degrainer/denoiser to replace NeatVideo and work on that left-side clutter in YV12 or YUY2. Now to try the AviSynth version of DeFlick. . .Last edited by sanlyn; 21st Mar 2014 at 07:47.
-
So far I've tried degrainers, smoothers, etc., various mods of MCTemporalDeNoise, DeGrainMedian, RemoveDirt, and what have you. The Avisynth version of Deflicker worked about as well to kill most of the flutter across the frame. But that stuttering left-hand noise component just won't give. The DeFlicker Avisynth plugin and NeatVideo combo is still the champ here. But I'd like to keep this clip out of RGB if possible -- and not everyone wants to fool with NeatVideo.
The last multi-function script I tried was RemoveDirtMC. I tried that some time back, but my system refuses to load the NLmeansCL .net plugin. The last statement I wrote to load it and its support .dll gave me an error message that sez Avisynth can't load AvsFilterNet.dll:
Code:LoadPlugin("D:\AviSynth 2.5\plugins\AvsFilterNet.dll") LoadNetPlugin("D:\AviSynth 2.5\plugins\NLMeansCL_netautoload.dll")
I've had this kind of noise in videos before, especially from damaged tape. So far, NeatVideo is the only thing I've found as a final cleanup for this garbage. Everything else just makes a mess of it.Last edited by sanlyn; 21st Mar 2014 at 07:48.
-
I don't know why you're so obsessed with this clip...
I think your desire to avoid RGB is misplace here. The changes that any denoising algorithm makes are are much bigger than the YUV/RGB/YUV errors. It's like saying you don't want to drive a mile down the road to save $100 on a purchase when that drive is only going to cost you pennies. -
You're absolutely correct
. I was running plugins during breaks or while working on one of my own clips to finish by Christmas. The idea was to make it simpler for the OP (and learn more about these multifunction scripts for my own benefit). IMO the earlier Deflick/NeatVideo version should be good enough.
Working now on something else anyway, just checked here to see if holygamer made up his mind about anything.Last edited by sanlyn; 21st Mar 2014 at 07:48.
-
I was just looking for a fast script to remove the flicker without causing motion trails but everyone has contributed massive scripts for stuff that I don't want! The original script Sanlyn posted removes the flicker without causing motion trails and it does a lot more but I still don't know what part of it I need to just remove the flicker without causing motion trails!
-
Why do you keep asking that like this is the first time you've visited this thread? You've been here since the start of the thread and you know that I'm trying to remove the flicker/tape noise or whatever you want to call it, to the left of the guy in the video. The filter is called DeFlicker. The webpage for it says "This filter corrects video that has frame luminance variations over time, what we might generically call flickering". It looks like flicker, the filter is called DeFlicker, the web page mentions flicker and when I use the filter it removes the flicker so that's why I mention flicker. You can see the flicker clearly here
-
I told you already that Deflicker filters are for WHOLE FRAME LUMINANCE CHANGES. Luminance changes in a small areas are not flicker they are NOISE. You use DENOISE filters to remove them not Deflicker filters.
https://forum.videohelp.com/threads/341188-Still-have-flicker-after-Denoising-with-AviS...=1#post2125219
This video may flicker but a deflicker filter will not fix it because the average luminance of every frame is the same:
You may have to click on it to make it flicker.Last edited by jagabo; 6th Dec 2011 at 12:39.
-
Mm . . .if you run another smoother without the other filters, you'll see something that "looks like" flicker in various areas, especially in the left-hand background and the dark clothing. But that's not real full-frame flicker. It's localized flutter, dancing grain and hopping artifacts -- I really hate the latter -- and damage on the left. Kinda like the tape was flawed and not hugging the heads, or maybe a VCR that made one of the dupes had fluctuating output of some kind (???). I don't know, but it's noisy and tough to fix on the left without wrecking something. But it's not flicker.
To answer holygamer: Run DeFlick first to tame the flutter, about half of it anyway. The rest was cleaned with NeatVideo (at just below-medium power, mostly in Cb and Cr, less in luma. The .dnp and .nfp files I posted have NeatVideo's settings). If you run NeatVideo first, it still doesn't work! I looked for a NeatVideo replacement for your use, but can't find one. By themselves, neither filter did the job. Temporal smoothers are the closest I came, but as jagabo noted earlier if they're set strong enough they're overkill. Earlier, I ran MCTemporalDenoise by itself and NeatVideo by itself, each at pretty strong settings. I think you can see by the posts that neither filter alone did what I wanted.
But it ain't flicker, unless you want to call it "local flicker" or "partial flicker", or whatever. By itself, NeatVideo is practically useless on flicker or spots, and wasn't designed for it. Flicker affects everything in a frame. I think what you refer to is localized temporal noise. I call it flutter, and I'm fairly certain it's from damaged tape. A line-level tbc would have helped -- if you separate fields, you'll see what I mean.
When working with bad video you often find a specific combination of filters that works better than each filter alone. I've seen noise like this on other damaged tapes and used similar cleaners, but this is the first time I saw a good script that set up DeFlick properly. It wasn't perfect (there's still slight motion blur), but anything stronger will likely make it worse, not better.
Maybe there are other combinations? Something that uses more of MvTools? I dunno, that's what I was looking for. . .but with horrible captures/damaged tape, life's tough without specialized Avisynth plugins and, IMO, NeatVideo in combination. Many don't like NeatVideo (I don't think they learned to use it correctly), but I sure got my money's worth from it for 8 years.Last edited by sanlyn; 21st Mar 2014 at 07:48.
-
You need to keep the line in the script that fixes levels in this clip (ColorYUV). If you do, the "flicker" you talk about would be more obvious and DeFlick will clean even better. But what's left in this clip after DeFlick fixed some of the localized luma variations (and it worked pretty well, too, as jagabo set it up) -- what's left isn't flicker. It's temporal noise (streaks and fine grain), and that's what NeatVideo fixed. Other smoothers will work on it, but as we said, if used strong enough they oversmooth the whole image.
Last edited by sanlyn; 21st Mar 2014 at 07:48.
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