![]() |
Filter to clean up a noisy source with MA script?
I'm trying to encode "Deliverance" and since it's an old movie (1972) it's quite noisy. Hence I'm having trouble with getting a high CQ value. What filter can I use to clean up the movie? Please, let me know what filter to use, settings and placement in the script.
|
In the MA Script you can find a Line including STMedianFilter.
Just change it to Deen() (download Deen() via Warpenterprises) or change to TemporalSoften(2, 10, 10, 15, 2) (No Filter download necessary, included in MPEG2Dec3.dll) Its heavy but you will kill noise. On the other Hand many details will be lost, for exampe killed structures in Hairs or flat surfaces in Skins. TemporalSoften for me is the best compromise cause - Its fast - Its the Filter which keeps the most details when doing a "normal, not to heavy" denoise But if set to heavy, the Picture in Surfaces will look like viewed through a Glass with "static" Dots. So watch out! So use MA like this: Code:
## Defined Variables and Constants ## If you lost to much details just change to TemporalSoften(1, 8, 8, 15, 2) The undot() is put behind TemporalSoften to eliminate a little bit the mentioned "viewed through a Glass with static dots" effect. The Threshold of Asharp is set to (1, 2) to avoid sharpen more the noisy surfaces in the movie. BUT! If someone can tell me how to configure TemporalSoften in the MA Routine that it handles the "static" Scenes more heavy with individual parameters ... let me know! Makes more sense. Just to avoid the double filtering. Like this? Code:
TemporalSoften( fmin( round(3/nf), 6), round(2/nf) , round(3/nf) , 1, 2) ")Well I'll try some settings at Weekend. |
I would leave the "temporal" values out completely in STMedian and increase the "spatial" values :!:
Use only the "spatial" values, and not "a-la-adaptive", but use it statically. You want to kill noise spots, which are (ideally) different from frame to frame. So what is really needed is strong "spatial" filtering. Not "temporal" filtering. -kwag |
Thanks guys!
@kwag Could you please point me int the right direction on the spatial filtering? Shall I keep the temporal values, and what are good starting values for the spatial filtering? :roll: This movie (Deliverance) is in bad need of a clean up. It's very noisy/pixelated. |
Quote:
:banghead: |
Quote:
Quote:
It's two completely different things :!: -kwag |
Quote:
|
Oh, sorry. I ment to say noisy. :oops:
|
What are my options on STMedian filter? I mean what's the range of values for parameter 3 and 4, and what do they do?
|
STMedianFilter(S_FilterThreshHold, S_EdgeThreshHold, T_FilterThreshHold, T_MotionThreshHold)
Tom Barry: Quote:
|
does deen act as a spatial-temporal smoother. or just spatial?
what exactly does it do? i've read the documentation that came along with it, but it doesn't exactly say what it does. Thanks :twisted: |
Deen is a Spatial only filter.
|
Well, now I've tried encoding with Deen() but I only gain 2-3 in CQ. "Deliverance" is about 1:45 long and I usually get a CQ around 70 for this kind of movies. In this case the CQ stops at around 56 :!:
Can someone please post good settings for STMedian (spatial values) to use for low, medium, and high noise sources? |
Are you sure your problem doesn't come from a source too sharpen ?
It's strange that you gain so little CQ on the video. Deen is quite heavy in noise removing. Try this : deen("a2d",2,10,12) (note: oops, I said an error last time, by default deen is a Spatio-Temporal filter using a 3d matrix. For Spatial only filtering you have to use the line suggested above). Finally, I can suggest you eDeen that is heavier than deen. Ps:For the values of StMEdian, why don't you do some test and give results there ? |
@Dialhot
I don't know. I'm using the MAscript and it has always worked before, on other movies. Maybe I could try increasing the LumaBlur? Or do you have any other suggestions? |
I edited my post while you were answering. See the suggestion I do in it :-)
|
Where can I find eDeen?
EDIT: Now that I think of it the DVD seems like it is over sharpened. Almost like when you apply too much sharpen filter in Photoshop, if you know what I mean? |
|
Thanx :wink: :D
|
You can soften it with unfilter (that is its original purpose). Or as you suggested raise a little the blur on the luma.
|
i would also recommend Unfilter, on the website it shows sample pictures of terminator 2 with unfilter, so you can check that out. :wink:
|
Grateful for all help but what I really need is a filter for removing noise. As I said before, I've tried Deen and now also eDeen but none of them where any good on my noisy DVD source. Is there any other filter I could try for cleaning up my source?
|
VagueDenoiser or Wavelet Noise Reducer have very good results, except those take a long time.
Try the new Mipsmooth, its in the avisynth forum if you want. If you're running AVS2.0, pixiedust is good. |
Hey guys. I tried out some of the tips here and found that Deen() worked best as a replacement for stmedianfilter. My DVD source is from the Alias TV series, and certain scenes appear grainy/pixelated/noisy (I dont' know how to define it!). But here are some screen caps to show you:
original 720x480 screen cap from DVD http://www.digitalfaq.com/archives/error.gif 704x480 KDVD, no filtering, encoded with CCE @ Q 30 http://www.digitalfaq.com/archives/error.gif 704x480 KDVD, original MA script http://www.digitalfaq.com/archives/error.gif 704x480 KDVD, MA script with Deen() http://www.digitalfaq.com/archives/error.gif So as you can see, my source is grainy to begin with, and then encoding at Q 30 introduces some more artifacting. It's hard to tell from the screen caps but the artifacting looks really ugly when the original MA script (without Deen) is applied. The artifacts dance around and really stick out at you. Deen helps to smooth it all out, but again I don't think you can see that well from these caps. Deen has the added benefit of really compressing this noisy sample. Encoding is slowed down a bit, but not as much as VagueDenoiser would. I tried fooling around with the first two values in Stmedianfilter but wasn't able to achieve the desired effect. Any suggestions? |
Nice :wink:
But it seems you used a small jpeg compression quality to obtain small files to post in here, by this its not easy to see an objective result cause of added jpeg artefacts :cry: Could you change the pics by the same ones but less compressed therefore less artefacts? :) I tried also a lot by just changing the Stmedian Line to Deen(). But you have to set the Deen() to spatial settings if you follow Kwags recommendations. For example Deen("a2d",2,12,15). Well also try to set deen() optimal for the video stream individually. I'm still not happy by using Deen(xxxx) in MA cause the last two days I was armed with some MA spatial mods to attack bad DVD Sources like my "Black Rain" Sample in the "How Funny" Thread. I also Tried VagueDenoiser using diff. settings. We'll see ... :D |
Quote:
Let me know how it compares, instead of deen. -kwag |
Deen is a very good spatial filter, i have been using it since the begining we started using Avs 2.5, i wonder Y it took you guys so long to find out about it :twisted: BTW you can also use it as a smoother just can not remember setting since Im not in my PC. :roll:
|
Hey Karl what are you doing sneaking in front of me :mrgreen:
|
Be careful "Deen()" set to default like this is not spatial-only!
If you want spatial only choose "a2d" method! Example: Deen("a2d",2,10,12) This is mentioned in Deen's Readme doc. |
Wow, okay so this is a tough choice for me. There wasn't a big difference between Deen() and Deen("a2d",2,10,12) in my test clips. They both did a good job of smoothing out and blending the grainy footage. However upon closer inspection I realized that the grain is in both the background AND the foreground, so both versions of Deen lose detail in the foreground images. On the other hand, STMedianFilter(3, 3, 1, 1 ) did a good job of cleaning up the background, making the artifacts not dance around as much as with the original StMedianFilter(8,.24,0,0). The other deciding factor is encoding time and amount of compression. Here are my results for a 2:30 min clip:
Deen() encoding time = 4:07 min, size = 43,509 kb Deen("a2d",2,10,12) encoding time = 4:16 min, size = 43,130 kb STMedianFilter(3, 3, 1, 1 ) encoding time = 3:18 min, size = 48,010 kb StMedianFilter(8, 24, 0, 0) encoding time = 3:29 min, size = 48,156 kb On my mediocre 20" TV, Deen() actually looks fine to me but I'm sure I'd notice the difference in detail on my parents 47" widescreen HDTV. So my choice might be STMedianFilter(3, 3, 1, 1 ) in the end. However since Deen() does a better job at compressing maybe I can lower the Q factor in CCE (n.b. inverse relationship from CQ in tmpgenc) to compensate. Any thoughts? P.S. I've recompressed my jpegs from above to be higher quality. Still not sure if you can tell a difference or not... |
Quote:
That's why I gave you those values :) I just haven't updated the optimal script, but those are the new values for the script. A smaller radius for spatial filtering, and the minimal value for temporal. STMedianFilter(3, 3, 1, 1 ) Does wonders on background noise, without speed penalties. -kwag |
Quote:
Welcome back :cool: -kwag |
Site design, images and content © 2002-2026 The Digital FAQ, www.digitalFAQ.com
Forum Software by vBulletin · Copyright © 2026 Jelsoft Enterprises Ltd.