← All articles

Why Does My Video Look Blocky? Diagnosing Compression Artefacts

“Blocky” is used for four different faults that have four different causes and four different fixes. Naming the right one is most of the work.

The four, and what each one means

Blocking — visible square edges, typically 8 or 16 pixels, most obvious on smooth gradients like a sky or a wall. The encoder ran out of bits and quantised each block so coarsely that neighbouring blocks no longer agree at their shared edge. Cause: bitrate too low for the content.

Banding — smooth gradients breaking into visible steps, usually in skies, fades to black and studio backdrops. Not enough distinct values to represent the gradient. Cause: 8-bit encoding of content that needed 10-bit, or heavy quantisation of an already-flat area.

Mosquito noise — shimmering fuzz that clings to hard edges, especially text and graphics, moving frame to frame while the edge itself stays put. Ringing around the sharp frequency transition an edge creates. Cause: same as blocking — insufficient bits — but it shows up on edges first.

Smearing or ghosting — detail that arrives late after a cut or a fast pan, as if the picture is catching up. The encoder is leaning on motion prediction and has too few bits to correct it. Cause: too few keyframes, or a bitrate that cannot handle the motion in the scene.

Three of those four are the same underlying problem — not enough bits — and one is a bit-depth problem. That matters because the fix is different: more bitrate does nothing for banding.

Measuring it, rather than squinting at it

Blocking has a specific signature: the picture’s edge energy concentrates on a regular 8-pixel grid. Compare how much edge energy sits exactly on that grid against how much sits everywhere else, and you get a ratio that climbs steadily as quality falls. Measured across a JPEG quality ladder on a photograph, that ratio runs from about 1.29 at high quality to 13.59 at the bottom.

Two traps are worth knowing, because both produce confident accusations against perfectly good files:

Flat-fill artwork defeats it entirely. A UI screenshot is full of 8-pixel-aligned rectangles by design — that is what design systems produce. The ratio reads them as blocking. A PNG screenshot was once told it had “visible JPEG blocking”, which a PNG cannot have. Above a certain flatness there is no photographic detail left to form the comparison from, and the honest answer is to decline.

Letterbox bars are not part of the picture. A 720p film clip carries 173 rows of pure black — 24% of the frame. Hand that to an exposure check and it reports severe crushed shadows on an ordinary letterboxed film. Hand it to a noise estimate and the bars are the flattest thing in the world, so that is what gets measured. Bars have to be found and removed before anything else runs.

The number that usually explains it

Before looking at artefacts, look at bits per pixel per frame — the file’s bitrate divided by its pixel count and its frame rate. Raw bitrate is meaningless on its own: 5 Mbps is generous at 720p and starved at 4K. The ratio is comparable across any resolution and catches the commonest real cause in one step.

A useful second check: a file whose bitrate is fine for its resolution but which still looks blocky has usually been re-encoded from something already compressed. The second encoder spent its bits faithfully reproducing the first encoder’s artefacts.

What to do

  • Blocking or mosquito noise — raise the bitrate, or lower CRF. If the source was already compressed, go back further; no amount of bitrate fixes an artefact that is already in the input.
  • Banding — encode in 10-bit if the chain supports it. This is nearly free with modern codecs and it is the one fix that bitrate cannot substitute for. Failing that, a small amount of dither before encoding breaks up the steps.
  • Smearing after cuts — shorten the keyframe interval, or use scene-change detection so a keyframe lands on the cut.
  • Everything at once — check the resolution is real. A file upscaled to 4K carries 4K’s pixel count with 1080p’s worth of information, and every ratio above goes bad at once.

Check one file

Upload a video and DiffALL reports compression blocking, bitrate for its resolution and frame rate, focus, noise and exposure, each with its own verdict and the measurement behind it — plus any frozen frames or dropped frames it found and where. Checks that cannot read a file decline rather than guessing, and the report says which ones did.

With the original in hand, comparing the two directly gives a per-second score and the exact worst moment, which is a much sharper tool for answering what did this encode cost me.

No original to compare against? DiffALL measures one file on its own and names what is wrong with it.

Check a file — free