videocompression Blog
How to Remove Compression Artifacts from Video
How to Remove Compression Artifacts from Video
You know the look: blocky squares in dark scenes, weird banding across a sunset sky, fuzzy halos around moving objects. Those are compression artifacts — visible damage left behind when a video is squeezed too hard. Here's what causes them and what you can actually do about it.
What causes compression artifacts?
Video compression works by throwing away detail the encoder thinks you won't notice. When the bitrate is too low for the complexity of the scene, the encoder runs out of data budget and the shortcuts become visible:
- Blocking / macroblocking — the image breaks into visible squares, especially in shadows and flat areas.
- Banding — smooth gradients (skies, walls) turn into visible stripes because color depth got crushed.
- Mosquito noise — shimmering fuzz around sharp edges and moving objects.
- Motion smearing — fast action turns to mush when there aren't enough bits for the movement.
The usual culprits: aggressive WhatsApp/Instagram recompression, old low-bitrate rips, and re-encoding an already-compressed file over and over (generation loss).
Can you fully remove them? Honestly: no
This is the uncomfortable truth. Compression throws away information permanently. No filter can recover detail that no longer exists in the file. Anyone promising "one-click artifact removal that restores original quality" is overselling.
What you *can* do is reduce their visibility — smooth the blocks, dither the banding — so the video looks cleaner, even though the lost detail stays lost.
Reduce artifacts with ffmpeg (free)
If you're comfortable with the command line, ffmpeg has solid filters for this:
Light denoise + deblock (good first try):
ffmpeg -i input.mp4 -vf "hqdn3d,deblock" -c:v libx264 -crf 20 -c:a copy output.mp4
Stronger cleanup for badly damaged video:
ffmpeg -i input.mp4 -vf "nlmeans,deband" -c:v libx264 -crf 20 -c:a copy output.mp4
nlmeans is a high-quality denoiser (slow but effective); deband specifically attacks gradient banding.
Key rule: always encode the cleaned result at a *generous* quality (CRF 18–20). Re-compressing at a low bitrate just bakes new artifacts on top of the old ones.
The best fix: go back to the source
If you still have the original file — the camera footage, the master export — start over from that. Re-encode it once, at a sensible quality (CRF 20–23 for H.264), instead of trying to polish a damaged copy. One clean encode beats any amount of artifact filtering.
Prevent artifacts when you compress
- Use CRF mode (quality-based) instead of squeezing to a tiny fixed bitrate.
- Don't re-encode an already-compressed file unless you must — every generation loses more.
- For sharing, CRF 23 is a good balance; for archiving, CRF 18 is visually lossless.
- Prefer modern codecs: AV1 and HEVC hold up far better than H.264 at low bitrates.
Bottom line
You can soften compression artifacts, but you can't resurrect lost detail. The real win is avoiding them in the first place: keep your masters, encode once, and use a decent CRF. If you need a quick, no-install way to compress video properly, try our free online video compressor — it runs entirely in your browser, so your files never get uploaded.