Skip to content

Install ALink Tools

Free browser tools for images, PDFs, media, text and web checks. Most tools process files locally on your device.

  1. Tap the Share button in the Safari toolbar.
  2. Scroll down and tap Add to Home Screen.
  3. Tap Add. ALink Tools then opens from your Home Screen like an app.

Compress Video to Target Size

Choose a video and a target size. This page estimates a bitrate, re-encodes the clip in this tab, and downloads an MP4. The result may be slightly under or over the target.

Runs in your browserRuns in your browserNothing is uploadedMP4 output
1

Add a video file

Target size

The file stays in this tab. The final size is estimated from a bitrate budget and may not match the target exactly.

Processing uses unmodified mediabunny 1.66.4 (MPL-2.0) and the browser WebCodecs encoder.Open source notices

2

Choose a target size

How to use Compress to Size

  1. Add a videoChoose one video of at most 512 MB and at most 30 minutes. Typical formats include MP4, MOV, and WebM. Other types work only if this browser can decode them.
  2. Set the targetPick 8 MB, 10 MB, 15 MB, 25 MB, 50 MB, or a custom size between 0.25 MB and 512 MB. You can drop the soundtrack to leave more of the budget for the picture.
  3. Download an MP4The page re-encodes in this tab and offers an MP4 download. If the first pass is still over the target, it retries at a lower bitrate, up to three attempts.

Limits and how it works

  • One file at a time, at most 512 MB, and between 0.25 seconds and 30 minutes long.
  • The target must be between 0.25 MB and 512 MB. Very small targets on long clips may be impossible.
  • Output is MP4. AVC is preferred; otherwise VP9 in MP4. The size is estimated and may not match exactly.
  • This browser must support WebCodecs. Input formats depend on what it can decode.
  • Very large files can run out of memory, especially on phones.

How the target size is estimated

The video bitrate is estimated from a byte budget: video_bps ≈ (target_bytes × 8 × (1 − 0.04) × 0.92 / duration) − audio_bps. Audio, when kept, is 96 kbps AAC. The 4% term is an allowance for MP4 container overhead, and the 0.92 factor leaves a safety margin. If the first file is still over the target, the bitrate is scaled by (target / result) × 0.95 and the clip is encoded again, up to three attempts. Resolution may also be reduced when the budget is too small for the original frame size. This is an estimate, not a guarantee, because browser encoders do not hit a bitrate exactly.

Encoding uses unmodified mediabunny 1.66.4 (Mozilla Public License 2.0), already used by Compress Video, together with this browser’s WebCodecs encoder. AVC (H.264) is preferred; if the browser cannot encode AVC, the file is written with VP9 in an MP4. When a native AAC encoder is missing, the bundled FFmpeg native AAC encoder (LGPL-2.1-or-later, no GPL parts) is used. The notice and corresponding source are at /notices/mediabunny-1.66.4.txt. Library source files are not modified. For quality presets instead of a target size, use Compress Video.

Frequently asked questions

Is the file uploaded?

No. Probing, bitrate planning, and encoding all run in this tab.

Will the download be exactly 25 MB if I choose 25 MB?

Not always. The tool aims to stay at or under the target, but encoder output varies. If the file is still over after retries, the smallest result is still offered, and the page says so.

What if the video is already smaller than the target?

It is left as is and is not re-encoded. Re-encoding a smaller file would not be useful and could reduce quality.

How is this different from Compress Video?

Compress Video offers low, medium, and high quality presets. This page aims at a chosen file size such as 8 MB or 25 MB.

Related tools

All tools