1. Your file stays on your device
When you choose a file, the browser gives the page a handle to read it locally. ShrinkVid reads it in chunks inside a Web Worker (a background thread), so even multi-gigabyte videos don’t freeze the page and never travel over the network. The site itself is a set of static files served from Cloudflare’s edge; there is no upload endpoint.
2. Video: decode, resize, encode
ShrinkVid uses the open-source Mediabunny library to read MP4, MOV, WebM and MKV containers, then the browser’s WebCodecs API to decode frames, optionally scale them, and encode them again at a new bitrate. Audio is re-encoded to AAC (MP4) or Opus (WebM).
Quality presets are based on bits per pixel
Rather than a fixed bitrate, each preset spends a set number of bits on every pixel of every frame (High 0.11, Medium 0.075, Low 0.045 bits per pixel for H.264; VP9 uses 25% less). The result is capped at 85% of the source bitrate so the output is always smaller. At 30 fps that gives:
| Resolution | High | Medium | Low | Medium, MB per minute |
|---|---|---|---|---|
| 2160p (4K) | 27.4 Mbps | 18.7 Mbps | 11.2 Mbps | ~134 MB |
| 1440p | 12.2 Mbps | 8.3 Mbps | 5.0 Mbps | ~60 MB |
| 1080p | 6.8 Mbps | 4.7 Mbps | 2.8 Mbps | ~34 MB |
| 720p | 3.0 Mbps | 2.1 Mbps | 1.2 Mbps | ~16 MB |
| 480p | 1.4 Mbps | 0.9 Mbps | 0.6 Mbps | ~8 MB |
| 360p | 0.8 Mbps | 0.5 Mbps | 0.3 Mbps | ~5 MB |
For comparison, phones typically record 1080p30 at 15–20 Mbps and 4K30 at 35–50 Mbps, which is why Medium usually saves 60–80%.
Target-size mode
File size ≈ bitrate × duration. ShrinkVid takes your target in MB, keeps a 6% margin for container overhead, subtracts the audio bitrate (64 kbps below 12 MB, otherwise 128 kbps) and divides by the duration to get the video bitrate. With resolution set to Auto, it chooses the largest standard resolution that still gets at least 0.04 bits per pixel, which avoids blocky artefacts.
3. Images: Squoosh-grade codecs
- JPG: MozJPEG with progressive scans and optimised Huffman tables.
- WebP: Google’s libwebp.
- AVIF: libavif (AV1 still images).
- PNG: optional 256-colour quantisation (UPNG) followed by OxiPNG lossless optimisation.
These are the same open-source encoders used by Google’s Squoosh app, compiled to WebAssembly via the jSquash project. Target-KB mode runs a binary search over quality (up to 7 encodes) and only reduces dimensions if the lowest sensible quality is still too large. Re-encoding strips EXIF metadata such as GPS location.
4. Browser support
| Browser | Video | Images |
|---|---|---|
| Chrome / Edge / Opera / Brave 94+ | Yes (hardware H.264) | Yes |
| Safari 16.4+ (macOS, iOS) | Yes | Yes |
| Firefox 130+ | Yes | Yes |
Frequently asked questions
Does ShrinkVid use a server to compress files?
No. The website is static files only. After the page loads, all processing happens in your browser tab, and the files you pick are never sent over the network.
Why is compression faster in Chrome and Edge?
Chromium browsers expose hardware H.264 encoders through WebCodecs on most devices, so encoding runs on the GPU or media engine instead of the CPU.
What video codec does ShrinkVid output?
MP4 output uses H.264 (AVC) video with AAC audio for maximum compatibility. WebM output uses VP9 with Opus audio. If a codec is unavailable in your browser, ShrinkVid falls back to the next best one automatically.