Did your version of "how to win friends and influence people" go out of print? I'd love to read it.
This thread is like watching someone trying to fix a wristwatch with a hammer, and then telling the world how rubbish the watch is.
Kudos to jagabo for his patience.
Given the frustration some people voice about AVIsynth, I'm not sure how they use a PC at all. For years I found PCs frustrating on a daily basis, and even today I've just found something stop working because of some as-yet untraceable driver issue. Hey Ho. You've got to find a way to work with the frustrations of complex and imperfect technology. Or go back to pen and paper. Or buy something from Apple and accept that whatever it does is what you wanted to do. or something.
Just find a way to stay calm. Or slide further into the grumpy old man cliche. (not all old men are grumpy; not all grumpy men are old).
The answers to most AVIsynth issues are over on doom9. You can even ask questions. After five days I think. If you don't declare that everyone there is a dipshit. That doesn't go down well in any social circles that I know of. YMMV.
Cheers,
David.
+ Reply to Thread
Results 241 to 270 of 280
-
Last edited by 2Bdecided; 6th Jan 2012 at 07:47.
-
Scoob's challenge, of course, was just an attempt to get others to do the work for him. That's why I didn't give the script. He can do a little work himself.
-
jagabo, your clip has a significant amount of pixelation in the background.
I used:
TFM()
TDecimate()
TemporalCleaner (Luma 5, Chroma 5).
TTempSmooth (luma 5, chroma 5)
Tweak (sat 0.8)
That was the first step.
I saved that, and opened it in V-dub. Ran NeatVideo WITH the Temporal filter on (already created an accurate noise profile for the clip) for a final touch on remaining flickering. Sharpening at around 55%.
My background looks calm, and there's no ghosting/blurring. The issue that I'm having is on dark scenes, and I should have been more specific. There are some dark scenes in this episode, which I will lower the temporal settings a bit, and add DNR in V-dub. Deflicker is not good for this, as it causes "fading" between scenes.
I'll post a clip tonight so you all can see.
Question, if I stack TTempSmooth and TemporalCleaners in my script, I usually put cleaner first to lock the pixels, and then smooth it out with TTempSmooth afterwards. Is this accurate, or would the other way around work?
*hopes for an answer that, for a change, doesn't start with "it depends..yadd yadda"* -
-
Macroblock artifacts. Perhaps it was just the fact that it was compressed, and nothing to do with your filtering.
-
Unclescoob, I don't see any of that. I do see plainly visible flutter, bouncing pixel blocks, and color banding in the filtered sample you posted a few days back.
Pixelization is a real word, but I think you might mean "pixelation". pixelization is explained here, but I don't see that in any of these samples (not even yours, that I recall).Last edited by sanlyn; 21st Mar 2014 at 08:00.
-
[QUOTE=sanlyn;2132479]I think you might mean "pixelation". [QUOTE]
Sanlyn, please re-read my post. I DID say pixelation, not pixelization. -
and anyway, this is going nowhere. you all can continue with this thread if you wish. I'm halfway there with my solution, no thanks to any of you...as usual.
bye. -
We're eager to see your solution and learn from it. I'll be the first to confess, no one has all the answers. I'm certain you'll share your better mousetrap with other members...as usual?
Last edited by sanlyn; 21st Mar 2014 at 08:01.
-
There's definitely pixellation. I'd bet money that it was primarily from the low bitrate.
One technique people use for tweaking their scripts is to use histogram("luma") , add that to the end of your script and preview the results. This is an exagerrated luminance view, that will help you see problem areas in your video more easily, and what areas still need addressing. The other part of the equation is encoding and settings.
For unclescoob , what settings should I use, what order, blah blah blah.... The truth is , it does matter on the source, and filter settings, order etc.. It's just as easy for you to preview your script in avspmod. Hint: open multiple versions of scripts in tabs in avspmod . Push f5. Use the number keys to swap back & forth quickly.
Other suggestions for improvement:
1) Use an edgemask to prevent the erosion of line detail . Note this is what I mentioned earlier: erosion of line detail, NOT a mask for temporal smoothing which doesn't really make sense as a general approach
This is common occurence during overfiltering , lines, especially in dark areas get eroded . More easily observed in animation but it occurs in live action footage as well. e.g. Flip back & forth and compare the dark lines in the guy's hair, the ceiling "tiles" etc... (The loss of line detail in the red hair is because jagabo didn't down the saturation) .
2) Sharpen/realign the chroma. If you notice the color goes over the lines, like some crazy kid with crayons was coloring it. Very common for low chroma resolution VHS caps, and made worse by chroma filtering, which essentially blurs the chroma. You can use MergeChroma(AwarpSharp2(#some settings)) to realign the chroma. If it's always shifted 1 direction only, then you can use chromashiftSP. But for low res VHS caps, usually it's a big blur and shifting in 1 direction doesn't work very well
For example look at the yellow blaster cord, the color of his "hand" goes beyond the line, the yellow dress outline etc...
-
Thanks, poisondeathray. Will try all of that. Good stuff.
Last edited by sanlyn; 21st Mar 2014 at 08:01.
-
PDR, if you don't mind my asking, what script did you use for that? I appreciate it.
-
poisondeathray: OK, I gathered the pieces for the 2003 and 2009 aWarpSharp's, toon v1 and v1.1, etc., and will try your suggestions. Is it necessary to use aWarpSharp2 with MergeChroma ? (ed: I'll answer my own question and try it both ways). At what point did you use aWarpSharp2, or is the sequence not that critical? I'll be working with the plugins listed by jagabo:
referring to the m2v he posted in #236; will work saturation/color/etc. a bit more. Will also try the earlier MCTD scripts.
I don't know if we're talking about pixellation, pixelizing, whatever, but I'm thinking of the color displacement as "bleed". I guess we all mean the same thing, different terms. I refer to the color bleed in the caps I posted in #233. Look at the gal's blue earrings, yellow dress, etc. Lines also look kinda jaggy (pixellated, anyone ? ? ?) but remember those caps are 200% blowups in Photoshop. Whether the color extends left, right, or both ways, I call it bleed or smear because the extended areas aren't sharply delineated, they're soft-edged. Some of the displacement is obvious enough to be called ghosting, I guess, but it's odd because it's somewhat irregular.Last edited by sanlyn; 21st Mar 2014 at 08:01.
-
By "pixellation" I'm referring to macroblocking. Color bleed can be improved by mergechroma(awarpsharp2() ) with some settings
I'll leave the macroblocking for another discussion, because there are many factors that can cause it, most commonly low bitrate (MPEG2 compression is very poor). Overdenoising can cause macroblocking, because most MPEG2 encoders assign higher quantization to dark areas and gradients - so you get macroblocking . There are other techniques you can use , like dithering, ordered dithering and adding grain/noise. Also encoders have different settings for this.
Under a given set of conditions , monitor calibration, settings etc, you might not be able to see gross macroblocking, but it is there. Also there are vast differences in perception between people. Some people are very perceptive to small flutters and macroblock edge noise. If you're not one of these people (or even if you are) Use the histogram("luma") technique to see it more vividly - this way you can adjust your scripts and encoding settings appropriately
Principally, Awarpsharp2 is a line thinner. But when used in conjunction with mergechroma , it can help improve color bleed if you use it on U and V planes. The depth is the most important setting, but if you use chroma=4 it will align using luma as the guide. As usual look at the docs for the other switches
Another common use for awarpsharp/2 to "fix" broken , aliased lines in animation , when used in conjunction with antialiasing and line darkers (e.g. fastlinedarken, toon). e.g
https://forum.videohelp.com/threads/323127-Improve-the-quality-of-video-animation
http://forum.doom9.org/showthread.php?t=134078
I don't know how you took those screenshots in that earlier post (e.g. resize algorithm, but it wasn't a point resize), also jpg is lossy might be adding some artifact. 2 problems with those shots are 1) color bleed 2) edges are "ratty" with aliasing . Part of it might be caused by compression as well -
You basically told me (and everyone else) to **** off several times, so you can see my reluctance to help. Despite that, I though maybe you had a bad day, so I attempted to help you again in several threads, and you told me (and everyone else) to **** off again... and again.... my patience wears thin. Even the most patient helpful members are annoyed. Guess what? if you alienate people they are less likely to help.
If you notice quite a few helpful knowledgable members have stayed away from your threads... I wonder why??
I used the same approach as jagabo with some minor differences, the edge mask, and chroma realignment (plus higher bitrate!). I'll point you to the right direction, but it's up to you to tweak the settings. You should learn the different basic approaches and concepts, the settings are not important - you can fiddle with them later. This way you can apply what you learn to different types of content and videos - everyone has different tastes and this is subjective
I used stab to stabilize , deflicker to soften a bit of the flicker (but used ttempsmooth at the very end to eliminate residual flicker) , removedirtmc, then applied dfttest and smdegrain with an edgemask. Awarpsharp2 and santiag to thin and improve the lines and antialias, then toon to darken them, dehalo_alpha to reduce halos. TTempsmooth to smooth over things at the end, plus mild sharpening with lsfmod and dithering
If you want to see examples of using dark line mask protection , search doom9 e.g
http://forum.doom9.org/showthread.php?t=163130
Also look at masktools documentation and examples. You have at least make some effort in your own learning , these approaches are free with vdub and avisynth - or pay someone to fix everything for you -
OK, I follow you there.
I've always used quality monitor gear, but the latest consumer-level IPS LCD panels are somewhat annoying because their heavy 6-bit dithering tends to mask disturbances, making noisy stuff look smoother than it really is. Will just have to live with that until I get enough $$$ for studio gear. But IPS beats the older panels any day.
They were VirtualDub captures to clipboard into Photoshop, then a quickie simple 2x resize. But even at original size, I was still seeing some rough lines.
Mucho thanks for all this great information. I've been immersed in doom9 on these plugins for most of today. Now you've given me more to look up. My wife will never forgive you guys. (She keeps asking when will I take a break from this stuff. Women just don't understand these things). I'll try all these suggestions here and even on Version 2 of that infamous opera -- yeah, that'll keep me busy thru the end of the world later this year, and past it!. Some of these plugins might not work well with "real" video, but I'm guessing many of them will.Last edited by sanlyn; 21st Mar 2014 at 08:01.
-
-
Say, I just read something very similar on a site I found (you might know the "AMV" site on anime processing). Apply sharpened chroma (aWarpSharp2) to the original luma. Ergo, this sharpens chroma but not luma. Good heavens, is that why I've occasionally been turning off Y-channel sharpening in NeatVideo all this time (to prevent oversharpening artifacts, especially on edges and highlights). That's a rhetorical question, more or less.
Okay, I was going to get to sleep on time tonite, but now I'm taking the laptop to bed to look up more on this whole area.Last edited by sanlyn; 21st Mar 2014 at 08:01.
-
unclescoob, I think I see the problem. Couldn't find anything wrong on my end, kept checking every damn thing in sight. Worked fine. So I download my own attachment of MCTD required .zip, and when I tried to open it I got a zip error and it wouldn't decompress. So I downloaded the zip again; this time everything unzipped except fftw3.dll. But WinRAR gave me a view of the .zip files inside, and the fftw3.dll filesize didn't look right. Apparently some corruption in the posted .zip.
I removed that old zip attachment today and replaced it with a new one. Downloaded it twice and tested. Ran OK.
Rather than download the whole thing, the only problem appears to be fftw3.dll. Here is a direct link to that version of fftw3.dll (right-click, save, unzip, copy the dll to system32): ftp://ftp.fftw.org/pub/fftw/fftw3win32mingw.zip . This is the identical direct link found in the FFT3D documentation.
Happens now and then. Happened to me with a video couple of years ago, downloaded but refused to play.Last edited by sanlyn; 21st Mar 2014 at 08:02.
-
*** DIGITIZING VHS / ANALOG VIDEOS SINCE 2001**** GEAR: JVC HR-S7700MS, TOSHIBA V733EF AND MORE
-
Sure, I can post some examples in a bit
But for now, try something like this on a random sample that has blurry chroma / color bleed
MergeChroma(Awarpsharp2(depth=8, chroma=4))
Be careful with the depth setting, make sure you zoom in and echeck the edges, because it can overshoot alignment -
I took a random frame from one of the earlier videos, just for demonstration purposes
The "zoom in" is done by a point resize (nearest neigbor), and cropped in
You can download "0.png" and try it out yourself as an exercise
Normally you would avoid using RGB source, because YV12<=>RGB<=>YV12 will worse then chroma blurring (That's why filtering is preferrable in avisynth, especially for cartoons where lines are cleaner and more noticable)
1) ConvertToYV12 only (for comparison)
2)
ConverttoYV12()
MergeChroma(Awarpsharp2(depth=10, chroma=4))
3)
converttoyv12
toon(0.3) #darkens lines
awarpsharp2(depth=3, thresh=128) #thins lines in luma
santiag(1,1) #antialiasing
toon(0.3) #darkens lines
mergechroma(awarpsharp2(depth=10, type=1, blur=1, chroma=4)) #sharpen and realign chroma
dehalo_alpha(darkstr=0.6) #reduce halos
lsfmod(strength=33) #resharpen image
I'm sure you can do a better job if you took more time to fiddle with the settings -
-
Here is another random example to illustrate
Because the chroma bleed is in more than 1 direction (typical of low chroma resolution, or over denoising Cb Cr channels) , ChromaShift / ChromaShiftSP won't work so well - If you shift it in 1 direction, it will overshoot the other way
mergechroma(awarpsharp2(depth=28, chroma=4))
-
Sorry, pdr, I'm following all this but couldn't run anything yesterday. One of those nasty rootkit infections suddenly jumped into my PC. I mean, literally, it just "appeared" while I was moving stuff into my Avisynth folders off an internet link. Some trash like "Win XP Security Pro 2012". Knew it was a rootkit because it wouldn't let me run Explorer, My Computer, or regedit. Luckily I could still run ESET while the bad guy's fake intruder warnings popped up everywhere. ESET killed the popups. But it took TdssKiller, two runs of ComboFix, Malwarebytes twice, and another ESET scan 5 hours to clean up, then a while to rebuild system files and the winsock layer. Bummer. Firing off a nasty letter to ESET today and making a new partition image backup.
Last edited by sanlyn; 21st Mar 2014 at 08:02.
-
While running various plugins/scripts on this troublesome video, I find myself calling procedures that are almost all used by MCTemporalDenoise. Rather than run so many reiterations of the same filters, I've been trying to optimize MCTD. Hours of searching doom9, et al, leave me with this question: is MCTD's post-processing activated by setting parameters in MCTD as in the following:
Code:MCTemporalDenoise(settings="very high",enhance=true, . . .(other settings. . .)
Code:MCTemporalDenoise(settings="very high",enhance=true, . . .(other settings. . .) MCTemporalDenoisePP(denoised, source,sharp,adapt, strength, . .etc. . .)
It seems a waste of time to use "enhance" in the first statement just to tame a few values, then turn around and undo some of the work by using the second statement.Last edited by sanlyn; 21st Mar 2014 at 08:02.
-
Thanks for confirming. Getting what I want but, wow -- just 2 simple changes, slows it down! Can't have everything.
Last edited by sanlyn; 21st Mar 2014 at 08:02.
-
Finally getting somewhere...almost. Hopefully I'm learning at least a little about MTCD. Here's an MPEG of the video so far. Starting to see this one in my sleep, too (DVD, 13-MB): http://dc143.4shared.com/download/8wIG8qg_/Sample1_Take5sV2.mpg
I didn't work with color except to try to fix levels a bit in YUV. The macroblocks and artifacts would give anyone a fit.
[Attachment 10507 - Click to enlarge]
[Attachment 10508 - Click to enlarge]
Code:# ####################################################### # # Functions FixChromaBleeding(), RemoveSpots(), and # FastLineDarken() v1.3 are full text at bottom of script. # All other plugins/functions are autoload .dll or .avsi, # except those loaded/imported below. Note old v1.5.1 of # masktools.dll is loaded for v1.3 of FastLineDarken(). # # ####################################################### import("D:\AviSynth 2.5\plugins\Stab.avs") # ----- Load old mvtools 1.5.1 for old FastLineDarken ----- LoadPlugin("D:\AviSynth 2.5\plugins\masktools.dll") Mpeg2Source("G:\forum\toon2\sample1.d2v", CPU=6) AssumeTFF() TFM(d2v="G:\forum\toon2\sample1.d2v") TDecimate() Trim(7,0) Tweak(coring=false,sat=0.95) ColorYUV(cont_y=-5) ColorYUV(gain_v=-25) ColorYUV(cont_v=-35) ColorYUV(off_v=12) ColorYUV(gain_u=5) # ****************** general denoising ****************** Stab(dxmax=2, dymax=2) FixChromaBleeding() Crop(10,2,-6,-2) McTemporalDenoise(settings="very high",stabilize=true,maxr=4,TTstr=5,edgeclean=true,\ enhance=true,fixband=true,GFthr=1.6,AGstr=2.0) RemoveSpots() # ********* work on macroblocks & dancing grain ********* Gradfun2DBMod() TTempSmooth(maxr=4,lthresh = 5,cthresh = 5,strength=7) TTempSmooth(maxr=4,lthresh = 5,cthresh = 5,strength=7) # *************** lines and chroma smears *************** santiag(1,1) mergechroma(awarpsharp2(depth=10, type=1, blur=1, chroma=4)) dehalo_alpha(ry=2,rx=2,darkstr=0.6,brightstr=1.0) FastLineDarken() MergeChroma(LSFMod()) AddBorders(8,2,8,2) ConvertToRGB32(matrix="Rec601") # ****** ...and one big spot that wouldn't give up ****** a1=last # <- original source a2=a1 # <- temporary clip for cropping, discarded later # -- b0 = temporary copy of accumulated frames overlaid with cleaned frames # -- b1 = temporary clip that is a rectangle taken from a CLEAN frame using Crop() # -- b2 = temporary clip that will be overlaid with the clean rectangle # -- Out1 = clip that will contain the cleaned-frame version of a1 b0=a1 b1=a2.FreezeFrame(432,432,431).Crop(172,352,-532,-118) # - replace 432, then crop clean rectangle b2=Overlay(b0,b1,x=172,y=352) Out1=ReplaceFramesSimple(a1,b2,mappings="432") # - Out1 = all of a1 with 1 spot replaced Return Out1 # **************** FixChromaBleeding() ******************** 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)).Levels(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",opacity=1) } # **************** RemoveSpots()******************** function RemoveSpots(clip input, bool "_grey", int "repmode") { _grey=default(_grey, false) repmode=default(repmode, 16) clmode=17 clensed=Clense(input, grey=_grey, cache=4) sbegin = ForwardClense(input, grey=_grey, cache=-1) send = BackwardClense(input, grey=_grey, cache=-1) alt=Repair(SCSelect(input, sbegin, send, clensed, debug=true), input, mode=repmode, modeU = _grey ? -1 : repmode ) restore=Repair(clensed, input, mode=repmode, modeU = _grey ? -1 : repmode) corrected=RestoreMotionBlocks(clensed, restore, neighbour=input, alternative=alt, gmthreshold=70, dist=1, dmode=2, debug=false, noise=10, noisy=12, grey=_grey) return corrected } # **************** FastLineDarken() v1.3 **************** function FastLineDarken( clip c, int "strength", int "luma_cap", int "threshold", int "thinning") { str = string(default(strength, 48) /128.) lum = string(default(luma_cap, 191)) thr = string(default(threshold, 4)) thinning = default(thinning,24) thn = string(thinning /16.) exin=c.expand().inpand() diff = yv12lutxy(c,exin,yexpr="y "+lum+" < y "+lum+" ? x "+thr+" + > x y "\ +lum+" < y "+lum+" ? - 0 ? 127 +",uexpr="x",vexpr="x",u=2, v=2) linemask = yv12lut(diff.inpand(),"x 127 - "+thn+" * 255 +")\ .yv12convolution("1 1 1","1 1 1",y=3,u=0,v=0) thick = yv12lutxy(c, exin, yexpr="y "+lum+" < y "+lum+" ? x "+thr+" + > x y "\ +lum+" < y "+lum+" ? - 0 ? "+str+" * x +",uexpr="x",vexpr="x",u=2, v=2) thin = yv12lutxy(c.expand(),diff,yexpr="x y 127 - "+str+" 1 + * +",u=2, v=2) return (thinning == 0) ? thick : maskedmerge(thin,thick,linemask,y=3,u=2,v=2) }
Last edited by sanlyn; 21st Mar 2014 at 08:03.
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