gizmobench

Video Compressor

This compressor does the whole job in your browser tab with the video encoders your browser already has, so the file never leaves your machine. You type the size you need in megabytes, and before anything is encoded the page shows the arithmetic: 96 per cent of the target in bits, divided by the length, less the audio, is the bitrate the picture gets. It asks your browser whether it can decode this file, and whether it can encode the chosen format at that exact size and bitrate, before it starts. It refuses a target the sound alone would fill, or one that would leave the picture less than 0.01 bits per pixel per frame, and names a smaller width, a lower frame rate or a target that fits instead. When the work ends it reads the new file back and checks its format, codecs and picture size against the plan, so the file you download is labelled with what it really is, and its size and length are measured rather than predicted. You can reduce the width, cap the frame rate, re-encode, keep or drop the sound, write MP4 (H.264 and AAC) or WebM (VP9 or VP8, with Opus), cancel at any point, and play the original and the result side by side.

Open a video to compress

· or drop one anywhere on the stage

Never uploadedNo accountUp to 250 MBUp to 10 minutes
MB
Width
Frame rate
Audio
Format
Download

Ready. Choose a video, or drop one on the stage.

  • 1920 x 1080 to width 960aspect ratio kept, both sides even
    960 x 540
  • Ten-second source at 30 fpsthe finished file is read back
    kept within one frame (33.3 ms), or the result says by how much it missed
  • 40 s clip into 50,000 Ba 10 kbps target, under the 128 kbps audio
    refused before encoding, the audio alone needs 640,000 B

The target is split before anything is encoded: 96 per cent of it, in bits, divided by the length, less the audio, is the bitrate the picture gets, so the file aims 4 per cent under the target to leave room for the container. Width sets the output width, and the height follows the original shape, rounded to an even number because the encoders need one. A frame rate cap only ever lowers the rate. Keep copies the original sound without re-encoding it where the format can hold it (AAC or MP3 in an MP4, Opus or Vorbis in a WebM) and it starts at the zero point of the file; otherwise the message says why and asks for a bitrate. When the work ends, the file is read back: its container, codecs and picture size must match the plan or it is not offered, and its size and length are measured, not predicted.

Accuracy. Which codecs can be read and written depends on your browser, and an unsupported file or encoder is refused before any encoding starts, never written under the wrong label. The target sets the bitrate, so the file lands near it rather than on it, and the finished size and duration are measured on the real file. Videos up to 250 MB and 10 minutes are compressed on your device and never uploaded.
The encoding is done by your browser, and the file handling by one open source library served from this site. Containers are read and written by Mediabunny 1.55.7 under the MPL-2.0 (licence text, the exact package, source), bundled unmodified. Compressed video and sound are decoded and encoded by the WebCodecs codecs built into your browser, which is why the formats on offer depend on it.

Common questions

How do I compress a video to a specific size, like 25 MB or 8 MB?
Open the video, type the size into Target or press 25 MB, 10 MB or 8 MB, and press Compress. The page works the bitrate out before encoding: it takes 96 per cent of the target, turns it into bits, divides by the length of the clip and takes off the audio, and the rest goes to the picture. For a 40 second clip and a 10 MB target that is 1,920 kbps in total, and 1,792 kbps for the picture after 128 kbps of audio. An encoder lands near the rate it is given rather than on it, so the finished size is measured and printed against the target, and if it comes out over, an Aim lower button scales the target down by the amount it missed. Sizes here are decimal: 1 MB is 1,000,000 bytes, so a 10 MB target sits below a limit that means 10 MiB, which is 10,485,760 bytes.
Is my video uploaded anywhere?
No. The file is read in this tab, the video is decoded and encoded by the WebCodecs codecs built into your browser, and the new file is assembled here and handed to the browser's download. Nothing is sent to a server and no account is needed. The page remembers only its own settings in this browser, the target, width, frame rate, audio and format, and the Start over button at the top of the page forgets them. The video itself is never stored.
Which video files can it compress?
MP4, MOV, WebM, MKV and MPEG-TS files up to 250 MB and 10 minutes long, as long as your browser can decode the video inside them. The container is recognised from the file's first bytes rather than its name, so an AVI, FLV, WMV or MPEG program stream is refused straight away with a message saying what it is, and a sound-only file is pointed to the Audio Converter. The codec inside is then checked with your browser before anything else happens. H.264 and VP9 decode in current versions of the major browsers, while whether HEVC, which many phones record, can be decoded depends on the browser and the computer; if yours cannot, the page says so and names the codec.
Why does it say my browser cannot write this format?
The encoding is done by your browser, and browsers differ in which encoders they ship. An MP4 here always carries H.264 video, and AAC when the sound is re-encoded, because that is the combination nearly every player opens; a WebM carries VP9, or VP8 where VP9 is missing, and Opus. Before the Compress button is enabled, the page asks your browser whether it can encode that codec at the exact size and bitrate you chose. If the answer is no, the message names the missing encoder and what to pick instead: the other format, a smaller width, Keep for the original sound where that is possible, or No audio. It never quietly writes a different codec under the name you chose, and nothing is sent anywhere else to do the encoding.
Why was my target refused?
Some targets cannot work, and the page stops before encoding rather than hand you a bad file. The first kind is a target the sound alone would fill: 128 kbps of audio over 40 seconds needs 640,000 bytes, so a 50,000 byte target is refused and the message names a target that fits. The second leaves the picture less than 0.01 bits per pixel per frame, which for 960 x 540 at 30 fps is 156 kbps, and below that the picture breaks into blocks. That message names a smaller width or a lower frame rate that would fit, where one does, and the smallest target that would. A target at or above the size of the file is refused too, because it would not compress anything.
Will my phone video stay the right way up?
Yes. A phone often stores a portrait video on its side, with a note in the file saying which way to turn it. The page reads that note, and Width means the width as the video is shown, so a portrait clip 1080 pixels wide offers 960 and smaller. In an MP4 kept at its original width the note is carried over; when the width changes, or when the output is a WebM, which does not carry the note, the turn is applied to the frames themselves. Either way the video plays upright, and the finished file's displayed size is read back and checked against the plan.
Can I stop a compression partway through?
Yes. Cancel stops the conversion, closes the encoders, throws away what had been written and lets go of the file, and no download appears: a cancel that lands just as the last frame finishes still discards the result. The video stays open with your settings as they were, so you can change the width or the target and start again without choosing the file a second time.
How much quality will I lose?
That depends on how many bits each frame gets, and the page shows that number before you start. Halving the width takes three quarters of the pixels out, so the same target gives each remaining pixel four times the bits, which usually looks better than a full-size picture starved of bitrate. Capping 60 fps footage at 30 halves the number of frames, for the same kind of gain. When the work ends, the original and the result sit side by side with their own players, and Same frame in both pauses them on the same moment so you can compare the detail before you download.
Why is there a 250 MB and 10 minute limit on a tool that runs on my own computer?
Because the finished file is assembled in this tab's memory before it is handed to your download, and a long encode ties up the tab while your own processor does the work. The two bounds are there so the tab does not run out of memory partway through, not to sell anything: there is nothing to buy here. For a longer video, cut it into parts and compress them one at a time.

Which codecs can be read and written depends on your browser, and an unsupported file or encoder is refused before any encoding starts, never written under the wrong label. The target sets the bitrate, so the file lands near it rather than on it, and the finished size and duration are measured on the real file. Videos up to 250 MB and 10 minutes are compressed on your device and never uploaded.