In-depth look at de-noising in Handbrake 0.9.9 (with image/video examples)

WARNING: This write-up was written for version 0.9.9 which has been replaced by 0.10.0. The denoise settings have CHANGED since then. I’ll try to either update this write-up or put together a new one at some point, but in the meantime, note that the custom settings mentioned below will not work correctly with 0.10.0.  

When encoding your favourite DVD’s or BluRays, one of the issues you’re bound to run into at some point is a noisy source.

Now I’m using the term “noise” very loosely here – when I say “noise”, I’m basically referring to little dots on the screen that aren’t part of the actual picture. This can be the result of film grain, compression artifacts, a poor camera, etc. Before I start to sound like I’m trying to get everyone on the “noise is evil” bandwagon, note that sometimes film grain is digitally added to a movie during production to go for a certain look. In less common cases, digital film grain can be added to cover up other issues such as color banding in the master. Whether noise is good or bad often depends on it’s intent, and also depends on your own preferences – some people like it, others loath it.


That said, when it comes to the video encoder, noise is extra detail – detail that the encoder is going to try and keep, at least to some extent. And this is expensive detail to keep. Encoding a noisy source can easily double the bit-rate/file-size necessary at a given quality. And if you don’t give a noisy source enough bitrate, the overall quality of the picture tends to suffer heavily.

If you’re looking for small file sizes, or you’re not a fan of noise on a visual level, removing some of this noise can be helpful. Handbrake includes a denoiser, so here I’ll show you how to use it.



Handbrake uses a denoiser called “HQDN3D”. It’s not the best or most powerful denoiser out there, but it’s fairly quick and does a reasonable job as long as your source wasn’t a disaster and/or your expectations aren’t crazy.

It’s accessed in the “Picture Settings” section of Handbrake.

The default settings are:

  • Off
  • Weak
  • Medium
  • Strong
  • Custom


At some point you probably want to see what denoising actually does, so in the video below, I start by showing the effects of Weak/Medium/Strong before delving into the custom settings. I suggest you tinker with the buttons in the player to set this to 1080p and fullscreen (if your connection can’t handle 1080p, go as high as you can – otherwise you’ll have to rely on the pictures below, as lower resolutions on YouTube kill too much detail).

If you’re planning to de-noise, but are not interested in the Custom stuff and just want to use the presets, my suggestion is to start at “Weak”, because you start to get significant blur as you move towards “Medium” and “Strong”.


If you’re remotely serious about denoising, custom settings are the way to go.


Custom values are entered in the form of 0:0:0:0 . Using all zeroes would not do any denoising, so realistically you’d put some actual numbers in there. But before you start plunking in random numbers, to give you a little bit of a reference, here are what those presets above actually use:

WEAK: 2:1:2:3

MEDIUM: 3:2:2:3

STRONG: 7:7:5:5

Handbrake’s denoiser does 2 types of denoising. One is called “spacial” which is represented by the first 2 numbers. The other is called “temporal” which is represented by the last 2 numbers. We’ll look at both.





The first 2 numbers have to do with “spacial” denoising. For example, 2:2:0:0 would only do spacial denoising.

The technical jargon has to do with looking at a single frame. To put it in an easy-to-understand way, the end effect is that the picture is softened, smoothed, or blurred (pick your favourite term). The noise is caught in the process, and softened/smoothed/blurred away.

I’ve used high spacial denoising below (higher than a rational person would normally use) to show what happens as this setting is pushed too far. Click for a larger image.

Screenshot that was not denoised Example of high spacial denoising (15:15:0:0)

You can easily see the effects of spacial denoising when a resulting video is paused. Tiny changes in these numbers can have a drastic effect.


Spacial denoising is very powerful, but:

  1. it reduces the sharpness of your picture (unavoidable)
  2. it can make everyone look like Ken & Barbie dolls (worse at higher settings).
  3. a high enough setting will kill all the noise, but will kill all the other detail in the process.

Unless you really love a soft picture, be very conservative with the spacial settings.




The last 2 numbers have to do with “temporal” denoising. 0:0:4:4 would only do temporal denoising.


The technical jargon has to do with comparing sequential frames. To put it in an easy-to-understand way, the end effect is that all those little “dots” that keep bouncing around the screen are averaged out and tend to disappear (mostly).

Below, an example of the “original” compared to somewhat rational noise-reduction settings – the same that were included in the video (0:0:10:10). The 2nd has had the grain “calmed” somewhat, and there isn’t much loss of detail. Since these are 1080p images (around 1MB each) and won’t fit in a pop-up window, you may want to right-click and open-in-a-new-window.

Example without noise reduction Example of medium temporal denoising.

You generally see the effects of temporal denoising when the resulting video is played back – those little dots that bounced around flat surfaces don’t bounce around as much anymore. The effects of temporal are usually hard to see when paused.

Below is an example of what happens when this is pushed too far (“original” vs custom settings of 0:0:25:25). It’s called “ghosting” and if you look at the larger version, you’ll see a “ghost” image. Obviously, settings of “25” are considered unreasonably high. Normally you don’t ever want to go higher than “10”. Click for a larger image.

Example of a motion scene (no denoising) Example of motion scene with high temporal settings (0:0:25:25)

Temporal denoising is much more forgiving than spacial denoising, and you generally don’t lose any “sharpness” in the image, but it:

  1. is not guaranteed to get rid of all the noise, even at high settings
  2. will do almost nothing for you if your source is already “clean” (no dancing-dots/grain/noise/etc)
  3. can cause ghosting at high settings
  4. is not motion compensated – your lower motion scenes may look clean, but during high-motion scenes, all those little dots that went away tend to reappear in areas of the screen that contain motion.

While high settings inevitably cause ghosting, you can usually be fairly liberal with this setting up until the point of ghosting (which tends to start at around 0:0:15:15). Personally I wouldn’t usually go higher than 0:0:10:10 as things start to look “off” before you actually see the ghosting.


COMBINING SPACIAL AND TEMPORAL (2:2:6:6, 1:1:8:8, etc)

You may have noticed that none of the presets use “0’s”. They all do some degree of spacial AND temporal denoising. It’s fairly common to combine them to some degree.

Due to the type of noise I usually try to reduce (“dancing dots”), I typically push up the temporal denoising first, and then add a slight bit of spacial denoising if necessary. Depending on the noise *you* are targeting, your methodology may be a little different.

Note that these have various effects on file-sizes, and now’s as good a time as any to take a look at an example….



I encoded the full 43m21s episode of “Alias” Season 1, Episode 7 at RF18, using the “veryslow” preset and various denoise settings. Here were the results:


Standard (no denoising) – 806.8 MB

Spacial (5:5:0:0) – 474.8 MB
Spacial (10:10:0:0) – 373.6 MB
Spacial (15:15:0:0) – 332.8 MB

Temporal (0:0:10:10) – 482.0 MB
Temporal (0:0:15:15) – 451.2 MB
Temporal (0:0:25:25) – 419.1 MB

Combined (3:2:9:7) – 422.3 MB


You’ll notice that:

  1. Nearly any denoising was helpful with this source. I didn’t use lower (sane) values, but even small settings here do help (trust me!).
  2. I used fairly high values but got pretty high gains too.
  3. Numbers used for the “combined” setting were smaller than any of the individual tests, yet the file size came out quite small. That’s where the value really is in combining spacial and temporal. If I needed the file to be about 420 MB for example, trying to do that with only spacial would result in a very blurry video. Trying to do that with only temporal would result in a very ghosty unwatchable video. On the other hand, by having *some* spacial and *some* temporal, I’d get a very watchable video.

As a reminder, if your source is already “clean”, temporal will do zilch for you. That includes file-size. If you try using temporal denoising on a “clean” source you might not even save 5%. It’s one of those things that works wonders when there’s noise, and seems useless when there isn’t.

Spatial on the other hand will *always* reduce the file size (though it will *always* blur to some extent too).


USING SIMILAR NUMBER PAIRS (2:2:0:0, 0:0:6:6, 1:1:4:4, etc):


This part gets slightly technical. If you don’t really care “why” we use similar number pairs, just use them and you’ll be fine (skip to the next section).

Each number pair has to do with luma and chroma. The format of the custom setting is actually broken down like this:

SpacialLuma : SpacialChroma : TemporalLuma : TemporalChroma

  • “Luma” is basically a black and white scale – how dark or how bright the pixel is. Back in the days of B&W TV’s, the television signal that contained the picture was all Luma.
  • “Chroma” is the color information, which is applied to the Luma to give you the picture.


Most of the time (with most types of noise), “Luma” does the brunt of the work when denoising. That’s because most types of noise affect at least the luma channel (sometimes only the Luma channel).

Chroma noise is more hit-and-miss. It’s rare to find noise that only affects chroma. Chroma noise is usually a little harder to see visually too.


So while using 2:0:7:0 wouldn’t be a crazy thing to do (and would probably clean up most sources nearly as well at 2:2:7:7), you shouldn’t ever find a reason to use the opposite like 0:2:0:7 unless something wonky happened to your source.

For a bit of a balance, it’s not uncommon to use similar values but with the luma slightly higher. So 2:1:7:6 might be used instead of 1:1:6:6 or 2:2:7:7. That said, minor tweaks like that aren’t likely to be very noticeable. So don’t spend too much time trying to figure out whether it’s advantageous to bump the luma higher or not for your current source.


If the noise in the source doesn’t particularly *bother* you, and your goal is simply to clean up a little excess noise, or slightly bump down the file size with little-to-no degradation of the actual picture (a “freebie” size reduction), something like:

0:0:3:3 a nice safe custom setting. Your file size will drop slightly, you’ll have slightly less noise, but you probably won’t notice a lick of difference when watching.


If file-size reduction is what you’re aiming for (or you’re trying to pack more quality in a fixed file size), try:


…your picture will be softened a little, but it’s so slight that you probably aren’t going to notice with most sources unless you’re doing a side-by-side comparison.


If the source is visibly noisy or you’re hard-core about dropping down the file size, but are still hoping you won’t notice the difference try:

2:2:9:9 for a DVD

4:4:9:9 for a BluRay

…BluRays are a little more forgiving when it comes to softening via the spacial setting due to the increased resolution. That said, whether you notice the difference or not is going to depend on your source and…. well… you.




The more aggressive you are with denoise settings, the more unintended consequences you’re going to run into. Every source is different, and thus, the pitfalls will be different.


Here are a few in particular to watch for:

  • The “Ken and Barbie doll” look – people look like plastic, or like they’re smothered in make-up (spacial settings too high)
  • Color banding – instead of say… a sky gradually going from light-blue to dark-blue, you have “bands” of colors” (the actual cause can be complicated, but high spacial OR temporal settings tend to exasperate this). Note that sometimes noise actually covers up *existing* banding in the source, in which case you’ll have to make a the choice between seeing noise or seeing banding. Other tools can “fix” banding via dithering, but Handbrake is not meant for that.
  • Ghosting – at the low end, tends to start looking like weird motion-blur. At the high end, you get an after-image during scene changes. If you inexplicably start to feel motion-sick while watching your encoded video, chances are this is why. Caused by high temporal settings.
  • Noise during motion – since the temporal denoising isn’t motion compensated, if the source was very noisy and temporal did a great job of cleaning it up, you’ll probably run into an issue where as soon as there’s motion, you get a few frames where there’s massive noise where the motion just took place. This sudden change can draw visual attention to the noise which is arguably worse than just having noise there all the time.

When experimenting with denoise settings to try and “fix” a problem area of the video, BE SURE TO CHECK OTHER PARTS OF THE VIDEO for unintended consequences. Making a noisy scene look perfect almost always comes at the expense of other scenes. Denoising is a balancing act. You usually have to accept that you’ll never remove all the noise without severe detriment to the rest of the video.



Finally, x264 includes a built-in denoiser which you can access with some custom settings in Handbrake.

The run-down:

  • it’s motion-compensated
  • negative side-effects are minimal
  • it can bump down file size pretty well
  • it’s usually not very good/helpful for most noise

To use it, you’ll have to add something like this in the “custom settings” box:


(this would be for a setting of 400).

Manually setting x264's NR setting

Typically, values in the 100-1000 range would be used, with higher being stronger denoising. You could try higher/lower, but YMMV. If I understood it correctly back when I read up on it, it drops certain detail which is-probably-noise. Warning: I may not have understood correctly.

Personally, I’ve found it fairly useless on it’s own for most sources (aside from the file size benefit). However, combined with a custom denoise setting, I’ve found that it seems to slightly help some of the noise that remains during motion. That said, I haven’t done extensive testing with it and found it pretty hard to come to solid conclusions because the end result isn’t nearly as obvious as with the spacial/temporal stuff, so you might want to do your own testing and draw your own conclusions here. Again, your mileage may very.

So, hopefully this write-up is more helpful than the previous one that lacked images/video. If not, or if you have something to add, or if you notice that I’ve said something horribly wrong, feel free to leave a comment below!

Leave a Reply

35 Comments on "In-depth look at de-noising in Handbrake 0.9.9 (with image/video examples)"

Sort by:   newest | oldest | most voted
bmcelvan .
Hi Matt, One more question for you about these denoise settings. Rather, I’d like your opinion. In terms of using NLmeans versus the innate nr= function of handbrake. In your opinion, does one of these “not change” the picture more than other other. I know you mentioned that NLmeans does a much better job than hqdn3d of not changing the actual source material. Are you aware of any difference between NLmeans and nr=? For example would using NLmeans_MEDIUM_nr=0 be “better” than NLmeans=Light_nr=400? Or as far as your concerned both are pretty good at keeping the content fairly unmodified? I would never use more than NLmeans=MED, and that would be for animation only, otherwise I’ll stay with Light. Is there a max level or nr= that you recommend not going over? Specifically, I am trying to reduce file sizes but I don’t really want to reduce the “quality” per se. If… Read more »
Matt Gadient
For an encode really focused on preserving fine detail, I’d personally be inclined to use HQDN3D custom settings with little or no spacial and just some temporal. Something like 0:0:0:x:x:x where x is a low number (1-4 range for starters, probably no higher than 7 or so). You could swap the 0 to a 1 in the spacial, but by definition you’re guaranteed to be softening out at least a little detail with any spacial. Technically temporal is changing the picture too mind you, but it doesn’t tend to soften out detail – it’s biggest side effect occurs during motion and most people can’t make out a whole lot of detail during motion anyway on top of the motion blur etc that can already exist. Wouldn’t use the HQDN3D presets though, since they’re high on the spacial. I don’t think nr= is going to noticeably clobber much in the way… Read more »
bmcelvan .

Great response…thank you.

I will do exactly that…a couple 30 seconds tests with high bitrate testing hqdn3d



bmcelvan .

Hi Matt (Or anyone else),
If I don’t care at all about encoding speed, just quality and just want to reduce file size if possible in films with some grain, for example jurassic park or Raiders of The Lost Ark, which method is better? If I use NL-means, I will use the appropriate third option (either film or animation in my case).

Is one of methods better theoretically or is it going to be completely subjective?

Should I use a custom value like 0:0:3:3 or 1:1:4:4, or should I just use the Ultralight setting?

Also using latest handbrake, does these numbers now need to be adjusted, are there six numbers now?



Matt Gadient
Someone else can chime in with their own input/observations, but my own point of view at this point in time: 1) HQDN3D is pretty basic, but also pretty straightforward. There’s a clear divide between spacial and temporal, and as long as you “get” those 2 concepts, delving into custom values and fine-tuning isn’t out of reach. I’m personally not a fan of the presets for it (higher spacial than I’d prefer), but since custom presets aren’t insane to figure out it’s usually my go-to denoiser. 2) NLMeans is pretty complex. Not just a matter of “how much spacial/temporal to do”, but there are different weightings, etc. I don’t recall the details behind each of the options if you actually break it down into custom values, but suffice it to say, technically it should be a superior denoiser. However, the custom options are significantly more complicated and intertwined – I played… Read more »
bmcelvan .
Thanks so much for this. Another reason I asked was because the wiki for handbrake is currently being re-written and there is nothing at all about the filters…just a “Coming soon.” With that said I googled different text strings and I couldn’t find much other than “nlmeans is better.” I found a few references to people saying it is more complex but is much better at removing noise/grain without changing the original image at all so I think I’ll go this route with either ultralight or light. A quick 10 second encode of nlmeans_ultralight_film compared to the hqdn3d light (and also 1:1:4:4) looked much better to me and the file size was smaller, however it did take longer but like I said I don’t care about time. I’m currently doing longer encodes, a full chapter of 5 minutes to really see if I can find good/bad/differences between them and any… Read more »
Matt Gadient

Just in case you’re interested in tinkering with the NLMeans custom options, details about the options were laid out a few years ago in a post on the HB forums and it can currently be found at . I don’t recall if it’s what I went by when playing with NLMeans long ago, but glancing through, it looks familiar. Could be documentation elsewhere too, but BradleyS went into a lot of detail in that post and it’s probably a great starting point if you decide to delve down that path.


Handbrake Denoise hqdn3d, preset custom example :

Hey Matt,

I know you’ve been asking about NLMeans and I’ve been running it with the light setting. It probably knocks 6-10% off filesize without changing the picture at all from the original as far as I can tell. However, the video takes about 3x as long to compress in this setting and it slows my computer to a crawl (uses all cpu resources when this filter is active).

Going back to hqdn3d, which I like better only for encode time, I’m not exactly sure how to manually control the settings of this (in 10.x.x) in the Extra Options command line. I just want light/light on both t/s denoise:

4:4:9:9 would become 4:4:4:9:9:9? How can I tell what the light setting is doing now? And how do I add it to video options? :hqdn3d=4:4:4:9:9:9 (like that?)

Feedback appreciated

I should also point out that nr=300 in video options did drop video size another 6-8% as well.

mark bower
a little more useful (possibly) info – Correctly, the frame sizes are 1920 x 1080p with the use of pillar boxes added to the original 4:3 super 8mm format. The transfer vendor coded the digitized video to run at 24fps, not the original 18fps. So I add one duplicate frame for every three frames of the original, a 4/3 or 1.333 ratio, using the “setpts=1.333*PTS” function. Then when I play the video, because of the extra frames, the video has an apparent run rate of 18fps. ie, after 24 frames have run in one second, 18 original frames will have been viewed, padded with 6 duplicates. 1)Your comments here do seem logical. I use “ffmpeg” on the command line to render/transcode; the rule for use of -vf in ffmpeg is to separate the various filter functions with commas. So based on your comments, my complete entry for the filter portion… Read more »
mark bower
This post was great in its extensive discussion. I have completed digitizing my family super8mm films to 1440 x 1080p, but they all have observable graininess. I have to covert the digitized speed (24fps) back to an apparent runtime speed of 18fps, and for this I use SETPTS. So a couple of questions: 1) When using the “vf” filter, what is the correct sequence for the following and why? -vf “setpts=1.333*PTS,hqdn3d= ” or -vf “hqdn3d=,setpts=1.333*PTS”. In other words, should the frames be duplicated before or after noise reduction? is there interference depending on the order of application? 2) How many frames on either side of the frame that is being modified does the temporal function reach to. For instance, with temporal settings of 2:2, might the software look at two frames before and two frames after? 3) And I believe you have answered the question on argument values vs file… Read more »

I just upgraded to 0.10 and am severely disappointed with noise settings. I have played around with a few in order to achieve what I did with 0.9 (custom denoise settings like 1:1:2:3 for a typical TV show DVD), and the program gives me no way whatsoever to figure out what “equivalent” settings would be going from one version to another. Huge oversight in my opinion. Users should be able to start with what they already have and tweak from there, rather than having to invent all their wheels all over again, which is such a painful process. Screw that, I’m downgrading back to 0.9 and will not upgrade until they give me equal control over noise filters as I have in 0.9.


‘Anxiously’ awaiting an update. I thought the update was pretty sad seeing as they didn’t bother to include a converter to update all my saved profiles to the new xml format.. I downgraded so I wouldn’t loose my profiles.. then tried to manually port them, but too much had changed and I ran out of time before my flight. 🙁
Hoping you’ll get some time to work on an update at some point!
Cheers, and thanks for the best Handbrake guide out there! (or here, as it were?) 🙂


Are you planning to update this for HB-0.10? I’ve just updated and got bit by the change in HQDN3D settings: it now accepts both chroma channels, so my 0:0:3:3 ended in a mess…
Looking here:
around line 200, you can see that my “0:0:3:3” needs to change to “0:0:0:3:3:3″… the HB folks have really been irresponsible with this (could they really not add a line in the release notes to explain this?).


Thanks so much for the additional tips Matt, pretty much what you stated, that it’s a constant issue but I shall try and report back. At the end of the day, older shows on DVD aren’t the best visually to begin with so it’s anybody’s guess? BTW have you ever tried hand breaking older DVD’s or experienced anything like I have described? I would be curious to hear your settings and or result to compare? Thx again Jim

Great advice and learned alot! My main concern was fuzzy pixilation or (dancing dots) I think you called them that become present when i backup my OLDER TV shows DVD’s like ‘The Cosby Show’ I used the an older Handbreak Beta set at the REGULAR/NORMAL Setting w/CQ set to 14 – Anamorphic at STRICT and the Detelecine & Decomb is set to DEFAULT with a Denoise setting of 0:0:4:4 I had hoped for the best to remove some of the fuzzy dots that tend to appear more in background or when there isn’t a character closeup, but it did little to remove them and only shrunk the file which is great. Newer DVD shows don’t have this fuzzy grain to begin with so its never an issue. In fact I have no complaints with any of my backups DVD or Bluray overall – just these older movies or TV shows… Read more »

Many, many thanks!!! Great job on your article, it helped me a lot to understand better the settings and make better decisions for cleaning bad or very old sources… I greatly appreciate it!!!


Great stuff. Very helpful and very appreciated that you took the time


Thanks for this write up. Very very informative and and easy to use. I had never bothered with handbrake’s advanced settings as I get good results with the defaults (H264, MKV, RF19-2.5, aac stereo 224). However, I was trying to encode my Blu-Ray of Marnie – which is notorious for its poor transfer, especially the crazy film grain. This guide helped me get decent results given the poor quality of the source.


> useless on its own for most sources (aside from the file size benefit)

That seems ideal to me, if I take it to mean it can shave some bitrate with no visual impact. I’d like to know more about the bitrate impact of nr vs HQDN3D, when removing the normally invisible camera noise a high-quality source would have; Google searches were completely inconclusive.


So what do you use to counter the color banding that comes from HQDN3D? I’ve tried gradfun in mplayer, but it’s only somewhat effective – the gradient newer looks quite like it did before the denoising.


A few months ago, I started using Handbrake and was unhappy with my rip quality. I did extensive Google searching and found your guide. So I’d like to thank you for such a comprehensive guide on not only Handbrake, but also denoise!


Thanks for this. I originally avoided custom denoising (and hence **all** denoising, as the presets are crap), as it seemed complicated, but looked into your previous denoising post a month ago and regretted not doing it beforehand — temporal can really improve things immensely.

Any chance of you also doing a custom de-interlacing post? Or is it too complicated for a simple guide like this (the Handbrake docs for decomb are really messy).

BTW, I can’t find a contact email for you anywhere here… how else are we to send you examples of horribly interlaced DVDs?

Sore Wrist

Nice guide, sir. One question: Will it take longer to encode the file using any of the settings provided? I assume it will, but since you’ve done extensive testing, you can probably tell without me trying. I need to get a powerful machine…