Configure FFmpeg hqdn3d Filter Luma and Chroma
This guide explains how to configure the spatial and temporal luma
and chroma denoising strengths using the hqdn3d (High
Quality Denoise 3D) filter in FFmpeg. You will learn the syntax of the
filter parameters, how each parameter affects video quality, and
practical command-line examples to achieve optimal denoising results for
your video processing workflows.
The hqdn3d filter reduces image noise by applying a
3-dimensional denoising algorithm that operates across both individual
frames (spatial) and consecutive frames (temporal). It separates these
operations into luma (brightness) and chroma (color) channels, giving
you precise control over how different types of noise are filtered.
Parameter Syntax and Defaults
The hqdn3d filter accepts four primary parameters in a
specific order:
hqdn3d=luma_spatial:chroma_spatial:luma_tmp:chroma_tmp
You can also use their short-form aliases as named parameters:
hqdn3d=ls=luma_spatial:cs=chroma_spatial:lt=luma_tmp:ct=chroma_tmp
Each parameter accepts a non-negative floating-point number:
luma_spatial/ls(Default: 4.0): Controls the strength of spatial denoising on the luma (brightness) channel. Higher values smooth out grain and details within a single frame, but setting this too high will blur the image.chroma_spatial/cs(Default: 3.0): Controls the strength of spatial denoising on the chroma (color) channels. This helps eliminate color speckles and color bleeding within a frame.luma_tmp/lt(Default: 6.0): Controls the strength of temporal denoising on the luma channel. This reduces flickering and noise across consecutive frames. If set too high, it introduces “ghosting” or motion-blur artifacts on moving objects.chroma_tmp/ct(Default: 4.5): Controls temporal denoising on the chroma channels, reducing color flickering over time.
If you omit a parameter, FFmpeg automatically calculates its value
based on the preceding parameters using proportional defaults. For
example, if you only specify luma_spatial, the remaining
three parameters are scaled proportionally to your input.
Practical Command Examples
To apply the filter, insert it into your FFmpeg command line using
the -vf (video filter) flag.
1. Using Positional Parameters
To apply mild denoising with custom spatial and temporal settings using positional syntax:
ffmpeg -i input.mp4 -vf "hqdn3d=2.0:1.5:3.0:2.5" -c:a copy output.mp42. Using Named Parameters
Using named parameters increases readability and allows you to specify only the parameters you want to change:
ffmpeg -i input.mp4 -vf "hqdn3d=ls=3.0:lt=5.0" -c:a copy output.mp4In this example, chroma values are automatically scaled relative to the custom luma values.
3. Conservative Denoising (Best for Preserving Detail)
For high-quality source material where you only want to remove light sensor grain without losing fine details:
ffmpeg -i input.mp4 -vf "hqdn3d=1.5:1.0:2.5:2.0" -c:a copy output.mp44. Aggressive Denoising (Best for Highly Noisy/Analog Video)
For old VHS rips or low-light security footage with heavy noise:
ffmpeg -i input.mp4 -vf "hqdn3d=8.0:6.0:12.0:9.0" -c:a copy output.mp4Note: High settings like these will result in noticeable motion ghosting and a softer image, but will significantly reduce visual noise and improve compression efficiency.