HandBrake Guide

Shrink a video to a size limit with HandBrake

A size ceiling starts with duration and the wanted audio. Choose a matching Social preset or calculate an average video bitrate, leave headroom, and check the completed delivery copy.

Stacked film slides in a slim tray, with a wave in the top frame

To make a video fit a size limit in HandBrake, choose a Social preset that covers both its duration and allowance, or calculate an average video bitrate after subtracting the audio budget. Current HandBrake has no Target Size box, and RF can't promise a final file size. I'd use H.264 (x264), AAC and multi-pass average bitrate for a controlled upload copy, then check its completed size in bytes.

Choose a size ceiling or a quality target

A hard limit and a smaller-looking file are different jobs. If an upload must be below 20 MB, the available bytes decide how much quality you can retain. If you only want to save storage while keeping a good picture, constant quality is usually the more useful starting point: HandBrake varies the bitrate with the footage.

Your requirementUseWhat to check
A short clip fits a listed Social size and durationA matching Web > Social presetBoth numbers in its name, selected tracks and completed bytes
A different or tight upload ceilingCalculated Avg Bitrate with controlled audioRange duration, audio sum, headroom and actual output
A smaller copy with no fixed ceilingConstant QualityPicture quality and resulting size, rather than a promised MB value

HandBrake's quality and bitrate modes trade different kinds of control. A higher RF generally produces a smaller x264 or x265 file by accepting more loss, but the same RF can produce different sizes for different sources. Repeatedly guessing RF is an awkward way to hit a strict upload limit.

If an older tutorial tells you to enter Target Size (MB), its interface is obsolete. The project's explanation of the removed target-size feature cites the reliability of those estimates. The current route is a suitable preset or a bitrate budget, followed by a check of the finished file.

On supported 64-bit Windows 10 and 11 systems, VidCoder's Target Size mode uses the HandBrake engine and calculates an average video bitrate from the duration and audio settings. Leave room below a hard upload limit and check the actual size of the completed file.

Set the allowance and the footage worth sending

Check the receiving service's current file limit and accepted container, video codec and audio format. Use its byte allowance when available. Don't borrow an old email or chat limit from a tutorial; account plans and upload types can differ.

  1. Open the original. Select Open Source, choose the file and wait for scanning. Select the intended Title if the source contains several recordings. Keep that original and make a separate delivery copy.
  2. Keep the needed passage. If only part is required, use Range > Seconds and set its start and end positions. For 1:00 to 3:00, the retained duration is two minutes. The range and trim guide explains endpoints, precision and several clips.
  3. Use that retained duration. A two-minute selection from an hour-long source needs a two-minute budget. An unnecessary opening consumes bytes that could carry useful picture detail.
HandBrake Seconds range showing the two-minute interval from 1:00 to 3:00
Use the duration of the selected range in the bitrate calculation. This range runs for 120 seconds. Open full size.

The source, preset and destination workflow creates a new encoded video. Changing the filename extension from MKV to MP4 doesn't itself compress the picture. Set the MP4 container and wanted tracks together when that is what the receiver accepts.

Use a Social preset when both conditions fit

Open the preset menu or pane and look under Web for Social. Its size must be no larger than the upload allowance, and its duration must cover your selected range. The resolution and frame-rate values are output ceilings, so a 360p preset isn't a way to deliver intact 1080p text.

HandBrake 1.11.2 presetDuration in the preset name
Social 10 MB 30 Seconds 720p60Up to 30 seconds
Social 10 MB 1 Minute 540p60Up to 1 minute
Social 10 MB 2 Minutes 360p60Up to 2 minutes
Social 25 MB 30 Seconds 1080p60Up to 30 seconds
Social 25 MB 1 Minute 720p60Up to 1 minute
Social 25 MB 2 Minutes 540p60Up to 2 minutes
Social 25 MB 5 Minutes 360p60Up to 5 minutes

These names come from the 1.11.2 built-in preset definitions; the general manual's table doesn't list every size option. For a 90-second clip under 10 MB, choose Social 10 MB 2 Minutes 360p60. The 30-second option spends more bytes each second and doesn't fit that longer duration. Use the bitrate budget below for a strict 20 MB allowance.

At its full two minutes, the 10 MB 360p60 preset budgets 500 kbps for video and 160 kbps for AAC. That's 9.90 MB of nominal track data at 120 seconds before container overhead and bitrate variation. For a hard decimal limit, calculate a smaller budget with room to spare and check the finished file in bytes.

After selecting a preset, inspect Audio and Subtitles. The current Social definitions use multi-pass x264 and AAC stereo at 160 kbps, but a preset stores track-selection rules rather than your actual source tracks. Adding another soundtrack or replacing AAC with a large passthrough track changes the budget. Check the finished bytes even when the name fits.

Calculate the average video bitrate

The file must hold video, audio and container information, plus any retained subtitle data. Start by reserving a little room, divide the remaining bits by the clip's duration, then subtract all audio bitrates. The number left is the video bitrate to enter, not the total combined bitrate.

video kbps =
  (limit bytes × 8 × (1 - reserve)
   ÷ seconds ÷ 1000)
  - total audio kbps

For a decimal-MB allowance, the shorter form is (MB × 8000 × (1 - reserve) ÷ seconds) - audio kbps. In the examples, reserve is 0.05, or 5%. That's a working starting margin, not an encoder rule or a guarantee for every file. Round the result down and inspect the completed output.

Keep the units straight. The definitions of MB, MiB and bits give 1 MB as 1,000,000 bytes, 1 MiB as 1,048,576 bytes and one byte as eight bits. Here, kbps means 1,000 bits per second. A formula that omits the conversion between bits and bytes can miss the limit by a large factor.

Example: 20 MB for two minutes

Use a limit of 20,000,000 bytes, a 120-second range, one 128 kbps AAC soundtrack and a 5% reserve:

20,000,000 × 8 × 0.95 ÷ 120 ÷ 1000
  - 128 = 1138.67 kbps

Round down to 1100 kbps video. At those chosen rates, the nominal stream allowance is 16.50 MB video + 1.92 MB audio = 18.42 MB. That leaves 1.58 MB below the ceiling for overhead and headroom. These are calculated allowances; the encoded file's actual byte count is the acceptance check.

Example limit and durationAudioVideo setting, rounded downNominal streams before overhead
10 MB, 30 seconds128 kbps2400 kbps9.48 MB
20 MB, 120 seconds128 kbps1100 kbps18.42 MB
25 MB, 60 seconds128 kbps3000 kbps23.46 MB

All three examples use the same 5% starting reserve and decimal MB. They are arithmetic examples, not quality recommendations for every kind of footage. A busy sports shot and a static presentation can need different amounts of data to look acceptable.

Count every audio track, including passthrough

Two 128 kbps audio tracks consume 256 kbps together. In the two-minute example, that leaves about 1010.67 kbps for video before rounding, instead of 1138.67. Keep the language and accessibility tracks the recipient needs, then budget them deliberately.

Passthrough copies the source audio bit for bit. Selecting 128 kbps beside a passthrough choice doesn't shrink that copied stream: those controls apply to the fallback encoder if it is used. For a predictable small-file route, explicitly encode AAC at the chosen rate, or account for the actual copied track's size. Don't let an uncounted surround soundtrack spend the entire allowance.

If the calculated video bitrate is zero or negative, stop. The reserved allowance and selected audio already consume the available rate. Shorten the clip, use a lower appropriate encoded audio rate, or choose a permitted larger-file delivery route. Entering zero won't solve the budget.

Put the budget into HandBrake

  1. Choose a nearby output preset first. Match the receiver's resolution and frame-rate needs. On Summary, choose MP4 when accepted. Selecting another preset later can replace your custom settings.
  2. Set Audio explicitly. Retain the intended soundtrack, choose AAC encoding and set the budgeted bitrate. For the worked example, use one stereo AAC track at 128 kbps.
  3. Open Video and choose H.264 (x264). Select Avg Bitrate (kbps) on Windows, or the corresponding average-bitrate option on Mac/Linux. Enter 1100 for the two-minute example. Don't enter the combined audio-and-video number.
  4. Enable Multi-Pass Encoding. This is the x264 software-encoding route. Multi-pass improves how the average bitrate is distributed across the footage; it doesn't inspect the upload service or reserve your audio allowance automatically.
  5. Review the picture and tracks. Check Dimensions, cropping, frame rate, Audio and Subtitles. Keep the required content, then recalculate if the selected duration or audio changes.
  6. Choose a fresh destination and start. Set Save As, use Browse to pick the folder, and give the delivery copy a new filename. Select Start Encode and wait for completion.
HandBrake Mac Video tab showing Average Bitrate set to 1100 kbps with Multi-pass encoding selected
Enter the calculated video allowance under Average Bitrate. For the 20 MB example, use 1100 kbps and configure the 128 kbps audio budget separately. Open full size.

I use x264 here because it gives a straightforward, widely usable H.264 output and the documented multi-pass average-bitrate workflow. Switching to a GPU encoder changes the available controls. Keep this route intact for the example instead of assuming every encoder exposes the same options.

If it fits but looks bad, change the compromise

A fixed byte ceiling can't preserve unlimited duration and detail. Start with the least damaging change for the recipient's task. I'd remove an irrelevant lead-in before shrinking a tutorial's small text; for an action clip, I'd protect motion before making a large frame-rate reduction.

HandBrake Preview position slider with Live Preview and a duration control
Use a moving scene to check whether the picture holds up at the chosen bitrate. Open full size.
  • Shorten the useful passage. The same allowance spread over fewer seconds permits a higher bitrate. If the destination allows several separate files, split at meaningful boundaries and budget each clip independently.
  • Reduce resolution when the detail can tolerate it. Use Dimensions > Resolution Limit and inspect the frame. Smaller pictures may compress more usefully at a tight bitrate, but slides, labels and distant subjects can become unreadable. The scaling and crop controls also determine which edges survive.
  • Reduce frame rate only when motion allows it. A 30 fps peak limits portions above that rate while leaving lower-rate portions alone. The frame-rate controls explain PFR, VFR and CFR; dropping motion samples has a visible cost for sport or fast camera movement.
  • Try another codec only if the receiver accepts it. An efficient encode that the upload service rejects is a failed delivery. Keep H.264/AAC when that is the required combination.

At the same average bitrate and duration, lowering resolution doesn't automatically lower the nominal stream size. It changes how the available bits are spent. To make the file smaller in average-bitrate mode, lower the bitrate, shorten the duration or reduce the audio allowance. To improve the picture within the same ceiling, reconsider detail, motion and encoder choices.

Check the completed file, then upload it

Inspect the file at the destination you set, after the encode has finished. Use its actual size in bytes, rather than a rounded MB label, allocated disk space or a partly written output. Compare that number with the receiver's stated allowance.

Play the beginning, a demanding middle section and the ending. Confirm the wanted duration, aspect ratio, readable detail, audible language and necessary subtitles. Then open or upload the copy in the receiving app. Being under the byte ceiling doesn't establish codec or track compatibility.

ProblemCheck before another encode
The file exceeds the limitCorrect output file, retained duration, Avg Bitrate selection, audio sum and passthrough. Recalculate with more headroom if those are correct.
The file got larger than the sourceThe output's chosen rate may exceed the original compressed rate. Neither a preset name nor a container change promises a smaller result.
It fits but text or motion is damagedShorter duration or a larger permitted allowance may preserve more useful content than further shrinking resolution or frame rate.
A later queued file misses the targetEvery duration and retained audio set needs its own budget. Check that queued job's saved settings and distinct destination.
The service rejects an under-limit fileCheck its accepted container/codecs, duration, track and attachment conditions; inspect the actual error.

A preview helps assess picture settings, but it doesn't establish the whole file's final size. For several clips, review each job in the HandBrake queue; editing removes a job until you add it again. Keep the original until the checked delivery copy is accepted. If encoding fails before that point, use the Activity Log troubleshooting guide to identify the failure.

Filed under Compress video