How to Denoise Low-Light Video with FFmpeg hqdn3d

This article provides a straightforward guide on how to use FFmpeg’s hqdn3d (High Quality Denoise 3D) filter to reduce noise in low-light videos. You will learn the syntax for adjusting both spatial and temporal denoising parameters to clean up grainy footage while preserving video quality and avoiding motion artifacts.

Understanding the hqdn3d Filter

The hqdn3d filter is a three-dimensional denoiser that filters both spatially (within a single frame) and temporally (across multiple frames). It is highly effective for low-light videos, which often suffer from “boiling” sensor noise or high-ISO grain.

The filter accepts four parameters in the following order:

hqdn3d=luma_spatial:chroma_spatial:luma_tmp:chroma_tmp

The Command for Low-Light Denoising

Because low-light noise fluctuates heavily from frame to frame, you need stronger temporal filtering to smooth out the noise over time.

Here is the recommended FFmpeg command for low-light video:

ffmpeg -i input.mp4 -vf "hqdn3d=4.0:3.0:10.0:7.5" -c:v libx264 -crf 18 -c:a copy output.mp4

Parameter Breakdown:

Fine-Tuning the Settings

If you experience issues with the output, you can adjust the values based on your footage: