View Full Version : What is a high quality denoiser?
Chengbin
27th July 2009, 14:35
I want to denoise a video. Can anyone recommend a high quality denoiser? Time is not an issue.
JohannesL
27th July 2009, 14:48
Post a sample.
Chengbin
27th July 2009, 14:52
Here's a sample (It's a 13 year old video, so it is a film to digital transfer).
http://i31.tinypic.com/35lz2hc.png
thewebchat
27th July 2009, 18:19
Does the noise move? If so, use MVTools. Otherwise use dfttest or fft3dfilter.
Adub
27th July 2009, 18:22
I've found that TTempsmooth(F) works wonders on anime, due to it's temporal stability (read: same frames displayed for a long time).
However, It looks like halo's are more of a problem in this source than noise.
Dark Shikari
27th July 2009, 18:36
It also looks like one could do Spline36Resize(last.width/2,last.height/2) and not lose one bit of detail.
10L23r
27th July 2009, 19:57
Id prefer lanczos with a lot of taps here, because it looks low-passed and very blurry.
Adub
27th July 2009, 22:35
The problem with Lanczos would be that it has the tendency to compound the ringing problem.
Chengbin
27th July 2009, 22:40
I've found that TTempsmooth(F) works wonders on anime, due to it's temporal stability (read: same frames displayed for a long time).
However, It looks like halo's are more of a problem in this source than noise.
This will sound very stupid.
What is halo?
LoRd_MuldeR
27th July 2009, 22:53
Really, I can't see any difference between Spline36 and Lanzcos4 for that image...
Chengbin
27th July 2009, 23:28
I found MVDegrain works very well.
I thought MVDegrain is a degraining filter???
thewebchat
27th July 2009, 23:59
Despite what all the "cinemophiles" or whatever try to tell you, grain and noise are the exact same thing.
onesloth
28th July 2009, 00:05
Despite what all the "cinemophiles" or whatever try to tell you, grain and noise are the exact same thing.
It would probably be more accurate to say grain is a type of noise.
10L23r
28th July 2009, 01:55
Really, I can't see any difference between Spline36 and Lanzcos4 for that image...
I can. Lanczos4 is very very slightly sharper. Actually, the difference between lanczos4 and spline36 is only noticible upon zooming in 800% or so.
The problem with Lanczos would be that it has the tendency to compound the ringing problem.
Not in this case, because of the blurriness.
It would probably be more accurate to say grain is a type of noise.
Imo, "grain" tends to be more coarse than "noise."
Nightshiver
28th July 2009, 03:29
Video sample please.
lych_necross
28th July 2009, 07:10
Without a video sample of the source, I can only make a general recommendation. Try MCTemporalDenoise
Chengbin
28th July 2009, 14:00
Without a video sample of the source, I can only make a general recommendation. Try MCTemporalDenoise
How much RAM does MCTemporalDenoise use with fft3dgpu? It ate 2GB of RAM in 5 seconds and then crashes because I only have 3GB of RAM.
buzzqw
28th July 2009, 15:01
add a setmemorymax(1024)
BHH
Adub
28th July 2009, 17:08
This will sound very stupid.
What is halo?
Halo's are a video artifact in which a sort of "shadow" or "halo" occur around an edge in a video source.
See here for examples:
http://forum.doom9.org/showthread.php?t=143687&highlight=halo
10L23r
28th July 2009, 21:14
What exactly is the difference between haloing and ringing??:confused:
If I'm correct, a little ringing gives sharpness, whereas haloing is just simply annoying.
LoRd_MuldeR
28th July 2009, 21:43
Ringing (aka "Gibbs phenomenon") looks like that:
http://upload.wikimedia.org/wikipedia/de/c/c7/Gibbs-Beispiel-1.png http://upload.wikimedia.org/wikipedia/de/e/e9/Gibbs-Beispiel-2.jpg http://upload.wikimedia.org/wikipedia/de/d/d0/Gibbs-Beispiel-3.png
10L23r
28th July 2009, 21:46
So ringing is simply a compression artifact?
LoRd_MuldeR
28th July 2009, 22:26
So ringing is simply a compression artifact?
"Ringing" is one kind of compression artifacts you may encounter (JPEG compression is one popular example) and it's caused by Gibbs phenomenon.
The "haloing" effect is more a result of certain resizing filters...
Chengbin
29th July 2009, 01:57
Here is a sample
http://www.megaupload.com/?d=XW87ALMZ
10L23r
29th July 2009, 05:44
.mkv??? Is that straight from the source or did you re-encode it?
lych_necross
29th July 2009, 07:12
How much RAM does MCTemporalDenoise use with fft3dgpu? It ate 2GB of RAM in 5 seconds and then crashes because I only have 3GB of RAM.
Make sure that you are using the official 2.58 build of avisynth (no MT). Also, make sure that you are using the plugins the script explicitly calls for. Using SetMemoryMax(512) might help with memory leaks. Usually, memory leaks are caused by bad plugins, bad encoders, and/or bad frontends.
Chengbin
29th July 2009, 13:39
.mkv??? Is that straight from the source or did you re-encode it?
It was re-encoded (You (and I) don't want the huge .ts from the DVR)
JohannesL
29th July 2009, 13:44
Processing that is good for your re-encoded sample is likely not as good for the source..
10L23r
29th July 2009, 21:53
It was re-encoded (You (and I) don't want the huge .ts from the DVR)
Cut out a part losslessly in DGMPGDEC or tssplitter or whatever. We only need 5-10 seconds...
Btw, I feel that MCtemporaldenoise is overkill for this sample. That's just my opinion.
Chengbin
30th July 2009, 03:51
I can't.
It has to be re-encoded in order to be sent to me. I was curious how good a 13 year old episode would look in 1080p.
It was sent by a friend in Japan. There is a 1GB file size limit on the upload site, so he had to re-encode it for me in order to get it to me. I can't take a ts anyway, it would be a waste of his time (actually that's not true, his internet speed is so much faster than mine), and my time downloading it. Plus, I have a 60GB internet bandwidth cap anyway (Canadians gets ripped in everything), which goes by very quickly with webtv (legal, from the channel's website).
Plus, I got very nice results with MVDegrain 3. MCTemporalDenoise is way too slow. I thought MVDegrain was slow, obviously I was really wrong. Unless anyone has a better option, I'm sticking with MVDegrain.
10L23r
30th July 2009, 05:50
I see.
This works on your sample well enough for me:
ffvideosource("sample.mkv")
crop(180,0,1080,1080).spline36resize(720,540)
fft3dfilter().fluxsmootht()
I haven't compared it to mdegrain yet.
lych_necross
31st July 2009, 08:01
Too slow huh... try degrainmedian and/or hqdn3d. Their much faster and do a pretty good job. Use something like:
...source()
Degrainmedian(mode=2).hqdn3d(2,1,2)
You might have to play with the values to get the desired look.
Blue_MiSfit
31st July 2009, 09:01
fft3dgpu is AMAZING if you have a modern graphics card. If not, fft3dfilter is pretty good too.
Degrainmedian and hqdn3d are a little tricky IMO.
~MiSfit
Chengbin
31st July 2009, 13:41
fft3dgpu is AMAZING if you have a modern graphics card. If not, fft3dfilter is pretty good too.
Degrainmedian and hqdn3d are a little tricky IMO.
~MiSfit
I have a 8800GT, I think it can be classified as a good card.
So if I do a set memory max, say 1024MB, it will run? How can you just limit the memory use and have something still working?
I believe I've read that fft3dgpu is not for every video, and you need to adjust the sigma values for different videos. Is my memory serving me? I really like MVDegrain 3 because it works magic on every video and it is not terribly slow.
Oh right, I just remembered that I said time is not an issue.
m3mbran3
31st July 2009, 14:39
If time is not an issue then use MCTemporalDenoise. It uses a combination of fft3dgpu/fft3dfilter and MDegrain1/2/3
10L23r
1st August 2009, 02:46
I personally prefer MC_spuds to MCTemporalDenoise for film. But I don't think either of them are specifically optimized for CGI/anime.
If time is not an issue, open up each frame in an image editor and manually remove the noise :D
Chengbin
1st August 2009, 13:17
I personally prefer MC_spuds to MCTemporalDenoise for film. But I don't think either of them are specifically optimized for CGI/anime.
If time is not an issue, open up each frame in an image editor and manually remove the noise :D
I mean I have infinite CPU processing time. I'm busy as hell.
D'zzy
1st August 2009, 15:33
I personally prefer MC_spuds to MCTemporalDenoise for film. But I don't think either of them are specifically optimized for CGI/anime.
If time is not an issue, open up each frame in an image editor and manually remove the noise :D
Hi, 10L23r. Can you tell me how do I actually do the manual edit thing? I really need it since there're some bad frames that won't get filtered correctly. I figure it's best to repair them by hand.
Sagekilla
1st August 2009, 18:47
@D'zzy: It's pretty easy actually. If you use AvsP, it's much easier.
Generally speaking though, you open up your movie in a video editor, step through til you find the damaged frame, save it as a bitmap and edit it.
Then, to get it back into your video, you could use avisynth:
# If our damaged frame was #4000
Avisource("MyVideo.avi")
src = lst
src.Trim(0, 4000) + ImageReader("FixedFrame.bmp") + src.Trim(4001, 0)
I might be slightly wrong here on the exact trim numbers, but that should be about right.
D'zzy
1st August 2009, 18:56
@Sagekilla
Yes, this way I know :-)
The problem is that it's not just one frame that I want to replace, but maybe 20 or so. And this way I get a memory leak... :-(
Sagekilla, it'll be very nice if you can also take a look at this post (http://forum.doom9.org/showthread.php?t=148653). Thanks.
Gavino
1st August 2009, 19:00
...
src = lst
src.Trim(0, 4000) + ImageReader("FixedFrame.bmp") + src.Trim(4001, 0)
I might be slightly wrong here on the exact trim numbers, but that should be about right.
Should be:
src = last
src.Trim(0, 3999) + ImageReader("FixedFrame.bmp", end=0) + src.Trim(4001, 0)
Depending on the frame rate and colorspace of your source, you may also need fps parameter to ImageSource and a ConvertToXXX.
D'zzy
1st August 2009, 19:05
Should be:
src = last
src.Trim(0, 3999) + ImageReader("FixedFrame.bmp", end=0) + src.Trim(4001, 0)
Depending on the frame rate and colorspace of your source, you may also need fps parameter to ImageSource and a ConvertToXXX.
Thanks Gavino!
If you have time, would you take a look at this (http://forum.doom9.org/showthread.php?t=148653)?
I've decribed the problem I encountered with this approach. And also other newbie questions... :)
Chengbin
2nd August 2009, 14:51
After 10 hours to encode a 20 minute video with MCTemporalDenoise on high, it is finally done.
Obviously the first thing I noticed is the amount of time it took. MCTemporalDenoise made the encoding drop to 0.77fps, while MVDegrain 3 dropped it 1.46fps. Quite a difference
Second thing I noticed. It did not lower the bitrate needed for the same CRF value, MVDegrain 3 dropped bitrate significantly (I don't have a figure, because I was encoding it with anamorphic, but the MC encode was not. Compared to anamorphic, MVDegrain 3 dropped bitrate from 2700Kbps to 1800Kbps)
Third thing I noticed. Picture quality was about the same. Degraining capabilities were the same as well. Both filters created visible ringing and banding artifacts in dark scenes. They're about the same, because in some dark scenes the MCTemporalDenoise was less visible, and in some scenes the MVDegrain encode looked better.
In conclusion, MVDegrain 3 is the obvious winner in this case.
Thanks a lot for your suggestions. I'm curious why nobody recommended MVDegrain? It is such a great denoiser.
thewebchat
2nd August 2009, 15:39
Uh, I did. Back on page one, about three posts down.
Chengbin
2nd August 2009, 16:57
Uh, I did. Back on page one, about three posts down.
Right, I forgot about that.
m3mbran3
2nd August 2009, 18:21
MCTemporalDenoise set to medium uses MDegrain3 and low uses MDegrain2, the advantage is that it also uses fft3dfilter and sharpens. Any setting above high uses MCompensate+TTempsmooth which I find is way too strong for almost all sources, as you also found out. For most DVDs I usually just use the very low setting as otherwise you start to lose details and people start to look plasticy, this may be different for anime sources though.
Chengbin
3rd August 2009, 04:08
Actually, I take back what I said.
After using MVDegrain 3 to encode the same video again, MCTemporalDenoise is smaller, in fact it is 10% smaller.
How does MCTemporalDenoise work? I thought it uses MVDegrain as well and some other filters.
thewebchat
3rd August 2009, 04:50
MCTemporalDenoise is a pretentious way of saying "use mdegrain with motion vectors calculated from a pre-denoised clip to increase the ability to find motion vectors on very noise inputs." It works like this:
pre= Deen(strength=9001)
presuper = pre.MSuper
pre1b = presuper.MAnalyse(isb=true)
pre1f = presuper.MAnalyse(isb=false)
<insert more boilerplate mvtools stuff>
realsuper = MSuper
MDeGrain3(realsuper,pre1b,pre1f,pre2b,pre2f,pre3b,pre3f)
All actual filtering is done by MDeGrain. I believe MCTD uses FFT3DFilter for the pre clip, but it's not very important. It might also do some lame sharpening but that could be another one of those generic mvtools wrappers I'm thinking of.
m3mbran3
3rd August 2009, 04:56
not lame sharpening LSFmod.
lych_necross
3rd August 2009, 07:15
MCTemporalDenoise can use either ffd3dfilter or FFT3Dgpu depending of the settings you use. For speed try this:
SetMemoryMax(1024) # or 512 if you like
SetMTMode(2,0)
...source()
# ...IVTC or deinterlace if needed
MCTemporalDenoise(settings="low", gpu=true)
SetMTMode(1)
GetMTMode(false) > 0 ? distributor() : last
or you could try
MT("""MCTemporalDenoise(settings="low", gpu=true)""",2)
instead of setmtmode.
AHHH! Deen! The detail killer, squasher of quality, no thanks.
vBulletin® v3.8.11, Copyright ©2000-2026, vBulletin Solutions Inc.