Log in

View Full Version : What's your "go-to" for grain reduction while preserving detail?


osgZach
20th May 2013, 16:53
Kind of scratching my head on this. I'm looking for options though.

I am trying to encode my Jurassic Park BD down to a manageable size, although I don't want to do a 2-pass and restrict it that way. I'm worried that would destroy it more trying to achieve a target bitrate than just trying to scrub some of the grain out.

That being said, I did a CRF 18 encode w/x264 and the file size came out at an unexpected mere 1GB reduction from the source VC-1 stream (!). It's eating up a LOT of bitrate.

This is a very, very grainy film. Which I wasn't expecting because although I haven't watched it for a long time, I remember the image from VHS and DVD being a lot cleaner, while still sharp and with lots of detail.


I am currenty doing another test with HQDN3D (all ripbot offers) but I don't get much grain reduction before I start seeing detail loss (tires, Grants pant wrinkles) and would like to experiment with other filters.


Ideally a filter that focuses on the grain while removing a lot (I want -some- grain left) and not killing / oversmoothing the image as a whole. Something light on CPU (I already use brutal encoding settings) as well.

I usually do not degrain films (Inception somewhat grainy but jesus, that came out at 7.5GB w/audio.). So I have little experience in this area. Any recommendations would be appreciated.

(If folks want a couple clips to play around with, I will provide. Just ask.)

sigma2x
20th May 2013, 18:56
I am no expert, but I love Jurassic park and I would try fft3dgpu if you have a relatively quick GPU.

x265
20th May 2013, 20:09
SMDegrain or MCTemporalDenoise.

osgZach
20th May 2013, 20:17
Thanks, will look into those.

x265
20th May 2013, 20:31
http://doom10.org/index.php?topic=2178.0

Chainmax
20th May 2013, 22:31
http://forum.doom9.org/showthread.php?t=149919

:)

aldix
20th May 2013, 23:52
MAnalyse+MDegrain2/3, perhaps some prior pre-filtering, too :)

feisty2
21st May 2013, 04:48
try smdegrain
smdegrain (tr=3,pel=4,lsb=true,search=5,blksize=4,mode=-1)
using a smaller "blksize" value helps a lot on detail loss
if you specifically want to protect dark details add "str=1.5"

feisty2
21st May 2013, 06:19
here's the denoising script I used for most medium/low quality dvd
smdegrain (tr=6,pel=4,thSAD=400,Search=5,lsb=true,mode=-1,blksize=4) #degrain+remove non edge around gibbs noise#
a=last
b = a.smdegrain (tr=6,pel=4,thSAD=1200,Search=5,lsb=true,mode=-1,blksize=8) #remove edge around gibbs noise#
e1 = b.mt_edge("prewitt",0,255)
e2 = e1.mt_expand().mt_expand().mt_expand().mt_expand()
ee = mt_lutxy(e2,e1,"x y -").mt_inflate().removegrain (11)
mt_merge(a,b,ee)
hope it will help :)

osgZach
21st May 2013, 13:33
Can't seem to get SMDegrain to work at all... Tried both the original and the modded version. Keeping getting: invalid arguments to function "SMDegrain", error

IF there is a dependency issue with a missing plugin it sure is going out of its way NOT to tell me. I can't even instantiate a basic SMDegrain() call (which should use defaults??)

edit: Got it solved. Something with the way Ripbot writes its Avisynth scripts, so I just made a fresh one. Will have to play around with some settings now

osgZach
30th May 2013, 13:00
I've been waffling back and forth on the issue for many days. Tried X filter, tried Y filter, dealt with Z problems. I even played with the Neatvideo demo in After Effects, but I don't have the money for that and it looks like it would take quite a while to render as well.

Ultimately I came back to HQDN3D. Of course a really important part I figured out was which setting I -really- needed to tweak (I'm not very knowledgeable about Luma/Chroma etc). The Luma, that has the most effect on the grain that I could see.
I also decided to do it on a single machine, so I could set some zones for the brief credits intro, and the end credits. Just setting the zones didn't get me much on an unfiltered clip (just shy of 1GB savings CRF 23 vs 19 for the rest).

So I am doing HQDN3D(4,0,4,0) and hopefully will get a file size closer to 16GB max. I'll probably post some sample clips and pictures later to get others' opinions on the job I did.

osgZach
1st June 2013, 12:24
So I ended up using Neat Video after all. The demo was really impressive and it does exactly the kind of job I'm looking for. I think I gained somewhere around 50% compressibility just from knocking down the grain.

I took several screen shots and tried to capture various different lighting conditions, and also included a couple shots where the grain "noise" is much more visible (darker scenes) and contrasted those with brighter scenes.

Overall I could probably tweak it a bit more, but I thought it came out very nicely..

7zip Archive (http://pics.oldskoolgames.com/forums/doom9/JP-Neatvideo-before-after.7z) (61mb)

There are 7 sets (14 shots) with before / after. I messed up the first frame in that it is not the exact same frame, but the rest are fine.

I am really, really impressed with this tool. Although a bit steep at $100, I felt they could have included 1080p support in the Home version.

Reel.Deel
4th June 2013, 15:00
@osgZach

Any chance of uploading a sample from the source?

matfra
4th June 2013, 17:53
osgZach
Good job !!
Im going to test this and tell you the result

osgZach
5th June 2013, 08:17
Yeah I can get a sample up in a little while. I actually need to re-rip the disc because I accidentally deleted the dumps. Also worth noting is that I am going back to tweak the profile I created a little better. I plan on leaving more grain in. I think it is also important to acknowledge that I am judging a lot of perceptive quality on a 1080p Monitor as opposed to an HD screen.

I have noticed that even really grainy stuff looks a lot cleaner on TV's vs PC Monitors, I'm guessing due to the filters that TV's have. Also in this case the goal was to reduce the file size in particular, and not a quality complaint.

mandarinka
5th June 2013, 13:28
The stuff I posted here (http://forum.doom9.org/showpost.php?p=1625058&postcount=19)...

osgZach
5th June 2013, 16:56
Here is a 414 frame clip from the source.. It is a 550MB AVI encoded with UT Video Codec in YUV 4:2:0

jp-clip1.avi (http://pics.oldskoolgames.com/forums/doom9/jurassic-park/jp-clip-lossless.avi)

I have also taken shorter 120 frame clips to provide different conditions and compressed them with CRF 14 - 16 though I believe they are transparent for the most part. I was originally just going to provide these because they were smaller and easier to upload, but I didn't want to deal with complaints about not having a "true" source sample. Feel free to do tests on these as well.


jp-clip-1 (http://pics.oldskoolgames.com/forums/doom9/jurassic-park/jp-clip-1.mkv)

jp-clip-2 (http://pics.oldskoolgames.com/forums/doom9/jurassic-park/jp-clip-2.mkv)

jp-clip-3 (http://pics.oldskoolgames.com/forums/doom9/jurassic-park/jp-clip-3.mkv)

jp-clip-4 (http://pics.oldskoolgames.com/forums/doom9/jurassic-park/jp-clip-4.mkv)

jp-clip-5 (http://pics.oldskoolgames.com/forums/doom9/jurassic-park/jp-clip-5.mkv)