HandBrake Guide

HandBrake Deblock: Fix Compression Blocks in Video

Use a short comparison to find out where HandBrake can help with compression blocks.

A magnifying loupe beside a framed city scene at dusk

Play the original clip at the same timestamp before you change HandBrake's settings. If the original already has square compression blocks, try Filters → Deblock → Light on a short sample. If the blocks first appear in the export, leave Deblock off and give the encoder more room to preserve the picture. I start with the original because filtering a clean frame costs detail and can leave the next encode's problem exactly where it was.

Find which copy has the blocks

Pause both files at the same scene and compare them in the same player at the same size. Dark walls, smoke, and fast cuts are useful places to look. Compression blocks have square edges that come and go as the picture moves. A uniformly soft image may have lost resolution. Wide, smooth steps across a sky or shadow point to banding. Horizontal teeth that follow a moving edge point to interlacing. Those symptoms call for different checks. HandBrake explains what Deblock, Denoise, and the deinterlacing filters address in its filter documentation.

What you seeFirst change to testWhat to compare
Square edges already visible in the originalFilters → Deblock → Light on a new copyBlock edges and nearby hair, fabric, or lettering
Original is clean. The export introduces blocksIncrease video quality with the same encoder and Deblock offThe same cut or motion, with dimensions and frame rate unchanged
A scene breaks up on a TV or in one playerPlay the finished file locally in a second playerWhether the same frames break up in both tests
A large mosaic appears with missing frames or audio jumpsCheck the original in a second player and inspect the HandBrake Activity LogSource-read errors, timing problems, and whether the encode finished

Check the player branch before you spend time re-encoding a file that looks fine locally. In one reported dark-scene example, a commenter saw the symptom in one player and got a clean picture in another. If the difference stays with the playback setup, check what the device receives and decodes before changing the source file. If two encodes break in identical places and source playback varies by player, look for decode messages in the HandBrake Activity Log before you change the quality setting again.

Soften blocks that are already in the source

  1. Open the best available original, choose the title, and set up your delivery format. Use a fresh output name so you can compare the copies.
  2. Open Filters and find Deblock. Make a short baseline with Deblock set to Off.
  3. Change Deblock to Light. The Windows Tune choices in the 1.11.2 preset definitions are Small (4x4), Medium (8x8), and Large (16x16). Start with Medium and leave it in place for the first comparison. The size setting and the filter preset are separate controls.
  4. Encode the same range again. Compare moving frames and pause on a frame with both a visible block boundary and a fine edge you want to keep. If Light softens the picture more than it helps, try Ultralight or keep the baseline. If Light helps and the blocks still pull your eye, test Medium on the same range before committing to it.
HandBrake Windows Filters with Deblock Light and Medium (8x8) tune
Set Deblock to Light for the comparison. Keep Tune and the rest of the settings fixed. Open full size.

Keep unrelated filters the same between the two copies. The example panel uses a progressive source and has the other filters off. If the source needs deinterlacing, keep the same deinterlacing settings for both versions. Save sharpening for a separate comparison. At a clean block boundary, sharpening can make the seam easier to see.

Deblock reduces the visibility of compression boundaries by smoothing a damaged picture. The source still contains whatever detail survived the first encode. If an earlier copy is cleaner, encode that copy first. When an archive needs to preserve the original as received, store it and make a separate viewing version with the filter applied.

Compare a short clip with identical settings

Use Preview for a quick test near the problem. On Mac, choose a sample position and duration, then click Live Preview. HandBrake's Preview walkthrough explains the sample position control. When the defect occurs at one exact transition, switch the main window's Range to Seconds and choose a start point just before the cut and an end point after it. The HandBrake trim walkthrough shows how the range fields work.

HandBrake macOS Preview with Live Preview, sample position and duration
Choose the same position and duration for the Off and Light samples. The Mac preview is shown here. Open full size.

For example, if blocks flicker at 01:08, try a range from 01:03 to 01:18. Save one clip with Deblock Off and a second clip with Deblock Light. Play both clips through the cut, then pause them at the same source frame if you need a closer look. Use the same encoder, output dimensions, frame rate, and quality value in both jobs. If you compare several different settings in one encode, you lose the easiest way to tell which change helped.

Pick one more shot with detail that matters, such as a face, small type, or a patch of fabric. A filter that looks helpful on a flat wall can soften that second shot too far. Choose the mildest setting that keeps both samples watchable. If the two clips have different defects and neither is better across the scenes you care about, keep the least altered copy.

A published frame comparison using HandBrake 1.2.2 shows why the copy matters more than the bitrate number. The source and x264 sample both reported 4,996 kbps at 23.976 fps, yet the matched frames still showed a difference. The source was MPEG video and the export was AVC, so the two bitrate readouts described different encodes. Compare the pictures themselves when deciding whether an existing copy can take another pass.

Fix blocks introduced by the export

Keep Deblock off and open the Video tab. If you used Constant Quality with the x264 encoder, move toward higher quality, for example from RF 22 to RF 20. That is a controlled comparison to try, and the resulting size will depend on your source. Use the same scene, dimensions, and encoder preset. The HandBrake quality control guide describes the scale and its effect on the encode.

HandBrake macOS Video tab with Constant Quality set to RF 20
With x264 selected, try RF 20 as one comparison against RF 22. Keep the rest of the encode settings fixed. Open full size.

If delivery requires a strict average bitrate, test a higher budget if the destination allows it. Under a fixed size cap, a lower resolution can be the better compromise. Compare it against your original settings on the hardest scene. Keep the copy whose picture is usable and whose actual file size fits the cap. The HandBrake file-size guide explains how to include audio in the budget.

When trying another encoder, start with a preset that suits the player and use that encoder's own scale. HandBrake's comparison of quality controls calls out that the same RF number represents different settings in x264, x265, and SVT-AV1. Give each sample its own filename and keep the source frame and delivery check constant.

You may see deblock=1:0:0 in x264 settings even when the Deblock filter is off. The former records the encoder's built-in loop filter. To find out whether you enabled the filter that works on the source picture, check Deblock in HandBrake's Filters tab.

Give dark-scene blocks and blocks near a cut the same source-versus-export check. A HandBrake issue about specific SVT-AV1 options describes a case tied to keyframes. That report concerns its encoder and conditions. If the fault persists after a fair quality test, save a short baseline job using another encoder appropriate for the destination and compare it with the original. Keep the original encoder's Activity Log so you can check versions and settings before applying advice from that issue.

Choose the sample you can live with

Judge a filtered sample by what you gained and what you lost. If the edges of the blocks are less visible and skin, texture, and lettering still hold up, encode the full copy with the same settings. If the source was clean and the higher-quality encode fixes the new blocks, keep that change with Deblock off. Watch the exported file in the player that matters before you queue similar videos. When the same damaged frames persist in the original, the next useful step is to look for a cleaner source.

Filed under Compress video