I have a Blu-Ray I just bought and for some reason its got ALOT more visible grain/noise in the picture than the DVD and it looks terrible.
I tried using deen in my source but it doesn't really clean it all that well and destroys too much detail as well. Deen gets rid of the grain but leaves alot of moving splotches in their place and it looks worse to me.
Anyone got any suggestions on what avisynth filter can clean this without destroying it too much?
+ Reply to Thread
Results 1 to 28 of 28
I tried TemporalDegrain and it made it look amazing when it comes to grain removal. Theres a big problem with it though, its thinning outer lines or simply blurring them away. hairtips for example, the black outer lines just disappear.
Which parameter in that filter can reduce that from happening?
Try McTemporalDenoise(). It's very slow though.
Heres another picture to work with from the unfiltered source, and an example of what temporaldegrain() does with the lines in the hair and details.
As you can see it cleans it nice but ruins lines and details. What can I do to clean this up and preserve the lines?
You can use masks to reduce the filtering strength in shadow areas and on dark lines
Would you mind giving me a starting point in a script using settings of your choice with the temporaldegrain() included so that I have something to mess with and adjust for that last picture I shared?
I'm asking because I don't know how to use a mask in a script yet. Once seen, I can probly figure out the adjusting and how they work on my own.
A masked filter sequence might look something like:
WhateverSource() src = last # remember the source edges = mt_edge(thY2=4).mt_inpand().mt_expand() # mask based on edges filtered = TemporalDegrain() Overlay(filtered, last, mask=edges) Interleave(src, last, edges.GreyScale()) # show source, processed, edge mask
A mask based on intensity might look like mt_binarize(40) -- pixels with brightness less than 40 become black, pixels with brightness over 40 become white. Or ColorYUV(cont_y=500, cont_u=-256, cont_v=-256). The brightness masks need to be inverted to use with the above script. Or reverse filtered and last in the call to Overlay. You need to adjust the mask so it marks details you want to keep but lets the filtered video through where you want the noise removed.
Obviously, for the final render you don't want to Interleave the three videos.
Last edited by jagabo; 27th Nov 2014 at 11:21.
So dont bother using this line because I dont want to interleave it?? I'm guessing its for preview purposes then remove it when ready to use?
Interleave(src, last, edges.GreyScale()) # show source, processed, edge mask
Yes. You can also get rid of src=last because that line was only to there to make a copy of the unfiltered video for the interleave.
But that script only shows and example of how you would use a mask. Using a 2d edge mask probably isn't going to help much with your video. Because, again, the noise is in the same frequency and amplitude range as the details you are trying to retain. If you make the 2d mask to retain those details it will also retain the noise.
Something that might help is to make a 3d mask. That is, a mask that takes into account details that don't change from frame to frame. That will allow those details to be retained better. But you'll have to provide a sample of your source video to get detailed instructions.
Well losing some details wont bother me as much as losing the lines and outer lines. As long as I can keep the lines such as the outlines in the hair that went away from being destroyed or altered, Ill be happy.
The 3d mask sounds appealing. I will provide a video sample when possible.
I'm sorry, I accidentally forgot this thread was waiting for a sample since I was gone for so long and couldn't get one at the time. I decided I wanted to do this movie again as soon as I came across another movie with the same issue and it reminded me about this post. If I'm going to see this in multiple sources then I am going to need to learn how to use that 3D mask or figure out how to clean it and I appreciate your help with this.
Here is an unfiltered sample for the movie I want to do right now.
It has the same exact issue.
My goal is to clean it up some with temporaldegrain (Unless you have a better alternative), and try to preserve details in lines and other things as much as possible without too much damage.
Please show me this 3d mask usage to help preserve lines.
Last edited by killerteengohan; 16th Mar 2015 at 03:29.
TemporalDegrain() alone worked well on that clip. I didn't notice any areas where lines were lost.
Pause it on a frame like frame 81 and go look at it with no filters at the very beginning where the train is blowing up and theres lots of smoke. Then pause it on the same frame with temporaldegrain. Its destroyed from temporaldegrain. The lines are smeared or gone, smoke is smeared, rubble looks like nothing anymore. its really damaging to its details.
I was going to give screenshots but my program is now all of a sudden out of nowhere say it cant load FFTW3.DLL line 81. I dont know why it would start doing that out of nowhere. it was working 10 minutes before I made my post with the sample.
Last edited by killerteengohan; 16th Mar 2015 at 09:30.
I just tried mctemporaldenoise() and it does a bit better than deen and doesnt totally destroy all the lines and details like temporaldegrain does.
It doesnt clean as well as temporaldegrain does though, you can still see the moving splotches, its just more reduced than deen had them. it seems to darken lines alot though and I wasnt looking to do that. That's why I was hoping you would show me the 3D mask you were talking about.
Last edited by killerteengohan; 16th Mar 2015 at 10:43.
Did you try playing with TemporalDegrain's options? Especially sad1 and sad2. Try somewhere around 25. That will reduce the ghosting but might still be strong enough to remove most of the noise.
Nope, actually I spent a few hours playing with MCTemporalDenoise's settings/parameters and I got it to do pretty much what I wanted it to with very little damage.
MCTemporalDenoise(sigma=5, sharp=false, radius=1, ecrad=1) worked fine for me.
I was not aware of TemporalDegrain causing ghosting or those parameter options for it. Is this something I should look out for as common side effect? Which parameter is the cause of that? the sad1 and sad2?
Now that you say it causes ghosting, I'm gonna have to look for ghosting in my MCtemporaldenoise output file.
MCTemporalDenoise has no effect if I lower its thsad and thscd 1 down to 25. It starts to work decent at about 200 and thats the lowest default it has. Are these going to differ from Temporaldegrains sad1 and sad2?
I will go ahead and play with temporaldegrains options you mentioned when I find the time to tomorrow.
Last edited by killerteengohan; 16th Mar 2015 at 14:54.
You might try some of the non motion compensated filters. But you'll want to stabilize the picture first. And dark areas will need different treatment that bright areas. I tried this and it worked pretty well:
ffVideoSource("00022 - Copy.mp4") Stab(mirror=1) light=TTempSmooth(maxr=7, strength=7, lthresh=6, cthresh=8) heavy=TTempSmooth(maxr=7, strength=7, lthresh=15, cthresh=20) Overlay(light, heavy, mask=heavy.ColorYUV(cont_y=300, off_y=60).Blur(1.0))
What exactly is the sigma setting for? I notice when I turn it up and down the removal gets stronger or weaker and it does more or less to the lines and details. Is this the same thing as sad1 and sad2 and or thsad and thscd1? Could I turn those down low and sigma up high to make up for it and not get ghosting?
I currently do not have the function Stab to view your suggestion and will have to find it.
Last edited by killerteengohan; 17th Mar 2015 at 02:03.
Okay now that ones all fixed up and looks very acceptable thanks to your assistance. (Im still curious to have my question about sigma answered though)
Here is a sample from the first thing we were talking about to begin with. Its what I wanted to clean up most and a 3D mask was suggested but a sample was needed.
I tried to get both light and dark scenes in that sample. Its just as short as the last sample and same bitrate, so why its almost twice the size, I'm not sure.
This movie is ALOT worse and I cant clean this up too well. Temporaldegrain cleaned it up but ruined it at its default settings and the script I used on that last movie didn't work well enough for this movie.
Please see if you can clean this up with that mask.
Think of it like this: sigma is the overall strength of the denoising. The SAD settings control how different a pixel has to be before it's considered detail rather than noise.
The basic method used is something like this: Consider the pixel at x,y in the current frame and the next frame. If the difference is less than the threshold value (just noise) average the two pixels together. If the difference is larger than the threshold value it must be detail, so don't average them together. So the idea is to set the threshold so that all the noise is covered, but details aren't removed. Unfortunately, when the noise is too strong you have to set the threshold very high to get rid of the noise, but then low contrast details start getting removed or ghosted too.
Thats makes thing so much more clear for me. Thanks for the details.
Any progress on that original movie thats awful looking?