How to Use FFmpeg hqdn3d Filter to Denoise Video

Video noise, often seen as grain or fuzziness in low-light footage, can drastically reduce the quality and compressibility of your files. FFmpeg provides a highly effective solution with the hqdn3d (High Quality Denoise 3D) filter, which performs 3D denoising by smoothing out noise both within individual frames (spatial) and across consecutive frames (temporal). This guide covers how the hqdn3d filter works, explains its key parameters, and provides practical command-line examples to help you clean up your videos.

Understanding the hqdn3d Parameters

The hqdn3d filter accepts four optional parameters, formatted as follows:

hqdn3d=luma_spatial:chroma_spatial:luma_tmp:chroma_tmp

As a general rule, temporal parameters (luma_tmp and chroma_tmp) should be slightly higher than spatial parameters to prevent a “plastic” or overly blurry look, as temporal denoising preserves fine static details better than spatial denoising.

Practical Command Examples

1. Applying Default Denoising

If you do not specify any parameters, FFmpeg will use the default settings. This is a great starting point for moderate video noise.

ffmpeg -i input.mp4 -vf hqdn3d -c:a copy output.mp4

2. Light Denoising (Preserving Detail)

For high-definition videos with only minor noise, use lower values to prevent losing sharp details and textures.

ffmpeg -i input.mp4 -vf hqdn3d=2:1.5:3:2.25 -c:a copy output.mp4

3. Heavy Denoising (For Low-Light or VHS Footage)

For highly pixelated, low-light, or analog VHS rips, you will need stronger filtering. Note that values this high may introduce “ghosting” artifacts behind moving objects.

ffmpeg -i input.mp4 -vf hqdn3d=8:6:12:9 -c:a copy output.mp4

4. Denoising Only Chroma (Color Noise)

If your video has color blotches or chromatic noise but you want to keep the brightness details intact, you can set the luma parameters to zero.

ffmpeg -i input.mp4 -vf hqdn3d=0:3:0:4.5 -c:a copy output.mp4

Tips for Best Results