Compression artifacts are visible or audible distortions that a lossy codec introduces when it discards information to reduce bitrate. In video quality assessment, the term covers the whole family of defects, including blocking, ringing, mosquito noise, banding, blurring and temporal pumping, that appear when an encoder cannot represent a scene faithfully within its bit budget.
Artifacts are not random noise. Each type follows from a specific step of the encoding pipeline, such as block-based transforms, coarse quantization or motion prediction, which is why experienced engineers can often tell from the pattern alone which setting caused the problem.
Why lossy video coding creates compression artifacts
Compression artifacts arise because codecs such as H.264, HEVC, VP9 and AV1 trade accuracy for size. The encoder divides each frame into blocks, predicts most blocks from neighboring pixels or earlier frames, transforms the prediction error into frequency coefficients and then quantizes those coefficients, which rounds many of them to zero.
Quantization is the step that actually throws information away. The quantization parameter (QP) controls its strength: in H.264 and HEVC it runs from 0 to 51, and each increase of about 6 QP doubles the quantizer step size, roughly halving bitrate at the cost of detail. Fine textures and sharp edges live in high-frequency coefficients, so they are the first to disappear or to be reconstructed incorrectly.
Motion prediction adds a temporal dimension. When the encoder reuses a poorly matched block from a previous frame, errors propagate until the next keyframe, and the artifacts appear to crawl, smear or pulse rather than sit still.
Main types of compression artifacts
The main artifact types can be recognized by their shape, location and behavior over time. The table summarizes the visual signature of each and the encoding step responsible.
| Artifact | What it looks like | Main cause |
|---|---|---|
| Blocking | Visible square grid in flat or moving areas | Coarse quantization of block transforms |
| Ringing | Halos or ripples beside sharp edges | Loss of high-frequency coefficients |
| Mosquito noise | Shimmering specks around text and edges | Ringing that changes frame to frame |
| Banding | Steps in smooth gradients such as skies | Too few levels after quantization |
| Blurring | Loss of fine texture and detail | Deblocking and zeroed coefficients |
| Keyframe pumping | Periodic jump in sharpness | Quality gap between I-frames and P-frames |
| Color bleeding | Color smearing past object edges | Chroma subsampling plus quantization |
Modern codecs hide some of these defects with in-loop filters. The deblocking filter in H.264 smooths block edges, HEVC adds sample adaptive offset, and AV1 adds constrained directional enhancement and loop restoration. These filters reduce blocking, but at low bitrates they shift the problem toward plastic-looking blur rather than removing it.
What makes compression artifacts worse
Artifact severity depends mainly on the ratio between scene complexity and available bitrate. The same 4 Mbit/s that looks clean for a static talking head can collapse into blocks during confetti, rain, water or fast camera pans, because those scenes generate large prediction errors in every block.
| Factor | Effect on artifacts | Typical mitigation |
|---|---|---|
| Low bitrate for the resolution | Blocking and blur everywhere | Lower resolution or raise bitrate |
| High motion and fine texture | Blocking during action scenes | Variable bitrate with higher peaks |
| Sensor noise or film grain | Wasted bits and mosquito noise | Denoise or use grain synthesis |
| 8-bit encoding of gradients | Banding in skies and shadows | 10-bit encoding and dithering |
| Long GOP in live streams | Errors persist between keyframes | Keyframe every 2 seconds |
| Repeated re-encoding | Artifacts accumulate generation by generation | Keep a high-quality mezzanine master |
Generation loss deserves special attention. Each time already compressed video is decoded and encoded again, the new encoder spends bits reproducing old artifacts, so quality falls faster than the bitrate alone would suggest. Professional workflows avoid this by editing from intra-frame mezzanine codecs such as ProRes and compressing only once for delivery.
How compression artifacts are measured
Compression artifacts are measured with objective metrics that compare the encoded video with its source, supported by subjective viewing tests when decisions matter. No single number captures every artifact type, so engineers usually combine several.
| Metric | What it measures | Limitation |
|---|---|---|
| PSNR | Pixel-level error in decibels | Poor match with perceived quality |
| SSIM | Structural similarity of local patches | Weak on temporal artifacts |
| VMAF | Fused features trained on viewer scores | Can be inflated by sharpening |
| Banding metrics | Visibility of gradient steps | Specific to one artifact type |
| Subjective MOS tests | Mean opinion of trained viewers | Slow and expensive |
As rough orientation, VMAF scores above about 93 are commonly treated as visually close to the source on a typical display, while scores in the 70s usually show noticeable artifacts. These thresholds depend on viewing distance, screen size and content, so they serve as guides rather than guarantees.
Reducing compression artifacts in practice
Reducing compression artifacts means giving bits to the content that needs them and avoiding encoding choices that waste them. The most effective measures are listed below in roughly descending order of impact.
- Build a content-aware encoding ladder so each resolution receives enough bitrate for its complexity.
- Prefer two-pass or constant-quality modes such as CRF for files, and capped variable bitrate for streaming.
- Encode in 10-bit even for 8-bit sources to reduce banding at little cost.
- Use slower encoder presets, which search motion more thoroughly and save bits for detail.
- Apply gentle denoising before encoding instead of sharpening, which creates extra edges to code.
- Avoid upscaling heavily compressed sources, because video upscaling enlarges existing artifacts.
A common mistake is to fight blocking with post-decode sharpening or contrast boosts. These make mosquito noise and ringing more visible. The real fix almost always lies upstream, in bitrate, resolution or source quality.
In plain words
Video files are huge, so streaming services and cameras shrink them by leaving out details that viewers are unlikely to notice. When they leave out too much, the picture starts to show the shortcuts: squares in dark scenes, fuzzy edges around text, or stripes in a sunset sky.
Think of it like a photocopy of a photocopy. Each simplification loses a little, and eventually the losses become visible. Those visible losses are compression artifacts, and the usual cure is more data, not more processing.
A real-world example
A sports streaming service receives complaints that football matches look blocky whenever the camera pans across the crowd. The engineers find that the 1080p rung of the ladder runs at 4.5 Mbit/s constant bitrate, which is enough for close-ups but not for thousands of moving faces.
They switch to capped variable bitrate with an 8 Mbit/s peak, move to 10-bit HEVC for capable devices and add a 900p rung for weaker connections. VMAF on crowd scenes rises from the mid-70s to about 90, and the complaints about blocking stop within the following week.