-vf hqdn3d=8:6:12:9 cleans grain out of 720p video in a few seconds and halves the file: 3.5 MB against 6.9 MB for a plain re-encode. ReelSDK's API took about 17 seconds for that job, under three quarters of a cent at $0.02 per compute minute.
Denoise video with ffmpeg
Grain costs bits, so a denoiser is also a compressor, and ReelSDK bills by the second, so speed counts too. Of 4 filters on 720p video, bm3d scored best on PSNR but took about 20 times as long as hqdn3d.
GuidesUpdated
ffmpeg -i noisy.mp4 -vf hqdn3d=8:6:12:9 -c:v libx264 -crf 20 -preset veryfast -an denoised.mp4Four strengths: spatial luma and chroma, then temporal luma and chroma. The defaults are mild; 8:6:12:9 took the grain out of the sky in a few seconds and wrote about half the bytes of a plain re-encode.
Variations
The other commands you will need
Best detail: bm3d
Block matching finds similar patches and filters them together. It scored highest against the clean copy and kept the stonework sharp, but took over a minute for 5 seconds of 720p.
bm3d ffmpeg -i noisy.mp4 -vf bm3d=sigma=10 -c:v libx264 -crf 20 -preset veryfast -an bm3d.mp4Smoothest: nlmeans
Non-local means compares each patch with its neighbours. At
s=5it made the smallest file, about a third of a plain re-encode, but smeared fine texture and took over 2 minutes, the slowest run here.nlmeans ffmpeg -i noisy.mp4 -vf nlmeans=s=5 -c:v libx264 -crf 20 -preset veryfast -an nl5.mp4Hiss in the audio
afftdnremoves steady background noise from the sound.nfsets the noise floor in dB, from -80 to -20. Copying the video stream kept the run under a second.audio ffmpeg -i in.mp4 -af afftdn=nf=-25 -c:v copy -c:a aac -movflags +faststart quiet.mp4
The flags
Four filters on the same noisy clip
PSNR against the clean copy, higher is closer. Every output was encoded with libx264 at CRF 20.
| Flag | What it does | Used here |
|---|---|---|
hqdn3d=8:6:12:9 | Fast spatial and temporal smoothing | 36.5 dB, 3.5 MB, 3.2 s |
hqdn3d | The same filter at its mild defaults | 36.9 dB, 5.8 MB, 4 s |
atadenoise | Averages each pixel over 9 frames by default | 36.7 dB, 6.6 MB, 4.2 s |
bm3d=sigma=10 | Filters groups of matching blocks together | 37.4 dB, 4.5 MB, 64 s |
nlmeans | Non-local means at strength 1, the default | 36.6 dB, 6.8 MB, 120 s |
nlmeans=s=5 | The same at strength 5, of 1 to 30 | 36.3 dB, 2.4 MB, 157 s |
| no filter | Plain re-encode, for comparison | 36.6 dB, 6.9 MB, 4.6 s |
| noisy input | noise=alls=20:allf=t+u, CRF 23 | 36.1 dB, 6.4 MB |
Source: ffmpeg filters: hqdn3d, nlmeans, atadenoise, bm3d, checked November 2026.
What the numbers say
PSNR moved less than you might expect: under a point and a half from the noisy input to bm3d, the best score. Even the plain re-encode gained about half a point, because x264 at CRF 20 drops some grain on its own. Only bm3d clearly beat it.
The bigger change was size. Random grain is the hardest thing for an encoder to compress, so taking it out first let hqdn3d at 8:6:12:9 hit about half the bytes of the plain re-encode at a near-identical score. In our side-by-side crops its sky came out clean.
Picking one
For most clips, start with hqdn3d: it is the fastest here and the four numbers are easy to tune. With no options, luma_spatial is 4.0 and the other three strengths follow from it. Raise the last two, the temporal ones, for grain that changes every frame.
Use bm3d when detail matters and you can wait, nlmeans when you want a smooth, almost painted look, and atadenoise for a quick temporal pass.
Running it on the API
All of these filters, and afftdn for sound, run on POST /v1/ffmpeg with the same args. Slow filters need care there: the hqdn3d job took about 17 seconds on the API against about 3 on our desktop, so a filter that took over 2 minutes locally can run into the 600-second job limit. Test on a short cut first and set timeout_s.
See pricing for the per-minute rate.
Without installing ffmpeg
The same command as one API call
Send the hqdn3d command's args to POST /v1/ffmpeg; the noisy clip is the one we made for this page. Each job runs ffmpeg 8.1 on a fresh machine at $0.02 per compute minute, billed per second; this one finished in about 17 seconds and cost under three quarters of a cent.
curl "https://api.reelsdk.com/v1/ffmpeg?wait=60" \
-H "Authorization: Bearer $REELSDK_KEY" \
--json '{
"inputs": {
"noisy.mp4": "https://api.reelsdk.com/f/lib/in/guides/ffmpeg-denoise/noisy.mp4"
},
"args": [
"-i", "noisy.mp4", "-vf", "hqdn3d=8:6:12:9", "-c:v", "libx264", "-crf",
"20", "-preset", "veryfast", "-an", "denoised.mp4"
],
"outputs": ["denoised.mp4"]
}'FAQ
Questions, answered
What is the best ffmpeg filter to remove video noise?
bm3d=sigma=10 scored best against the clean copy but took over a minute for 5 seconds of 720p. hqdn3d=8:6:12:9 took a few seconds and halved the file size.
Does denoising make the file smaller?
Usually, yes. Grain is hard to compress: hqdn3d=8:6:12:9 wrote about 3.5 MB where a plain re-encode wrote 6.9 MB at the same CRF.
Why is nlmeans so slow?
It compares each patch with every patch in its research window, 15 by default. On 5 seconds of 720p it took about 2 minutes at the default strength and longer at s=5.
How do I remove hiss from the audio?
Use -af afftdn with -c:v copy so the video is not re-encoded. nf sets the noise floor, from -80 to -20 dB; the default is -50.
- Stabilize a shaky video with ffmpegRemove camera shake with vidstab in two passes, or deshake in one, with the shake measured frame by frame before and after.
- Compress a video with ffmpegShrink a video with ffmpeg: CRF 28 in x264 or x265, a smaller frame or a slower preset, with the size and quality each one gets you.
- Choose a CRF value in ffmpegWhat CRF does in libx264, the file size and VMAF score for CRF 18, 23, 28 and 33 on one clip, and how x265's scale differs.
- ffmpeg -filter_complex explainedLabels, commas and semicolons: how a filtergraph wires inputs to outputs, with four working graphs and the errors they fix.
- Normalize audio loudness with ffmpeg loudnormBring any track to a loudness target such as -14 LUFS with loudnorm: one pass, or a measured second pass that keeps the dynamics.
- Video compressionCompress a video to a size budget in one ffmpeg call: a 129 MB 1080p clip fits a 5 MB target at 4.6 MB, for under 1 cent.
- Video compressorShrink a video in your browser with a size and resolution you pick, free and without uploading it, or with one API call.
- FFmpeg onlineRun your own ffmpeg command on your files in the browser, free and without installing or uploading anything.
- ReelSDK vs self-hosted FFmpegTranscoding a minute of 1080p to 720p takes about 24 seconds of compute: about 0.8 cents on ReelSDK, about a tenth of a cent on a busy 4 vCPU box. Below about 11,000 minutes a month, the API costs less than an always-on box.
Sources, checked November 2026
Ready to build?
Ship video from your app today
Your first $0.50 is free, and one key covers every endpoint.
