Developer tools

Compressing video without uploading it anywhere: how the AIMRAN Tools compressor works

What FFmpeg does inside the browser, what CRF and bitrate mean, how the WhatsApp and email presets are calculated, and which settings shrink a video.

Most online video compressors work the same way: you upload the file to their server, they process it and send it back, with size limits, queues and, often, a watermark on the free version. The AIMRAN Tools compressor does something else: it runs FFmpeg inside your browser, compiled to WebAssembly, so the video never leaves your device. There is no upload limit because there is no upload; the only limit is your computer’s or phone’s memory.

This article explains how that is possible, what the settings mean (CRF, bitrate, resolution, fps) and how the WhatsApp and email presets are calculated, so you choose with judgement rather than blindly.

FFmpeg in the browser

FFmpeg is the reference program for converting and compressing video; everyone from YouTube to VLC uses it. The ffmpeg.wasm project compiles it to WebAssembly, a binary format browsers run at near-native speed. When you open the tool, that module is downloaded (a few megabytes, once, then cached) and from then on all the work is done by your CPU.

Practical consequences:

  • Privacy: nobody else sees the video. For personal, client or work recordings, that is the difference that matters.
  • No size or duration limit: the tool used to mention 500 MB as a recommendation, not a block; what rules is the memory available on the device.
  • Speed: depends on your machine. A recent laptop compresses faster than a mid-range phone, and in all cases it is slower than native FFmpeg because WebAssembly does not use GPU hardware acceleration.

What it produces: MP4 with H.264 and AAC

The output is always an MP4 with H.264 video (libx264 encoder, veryfast preset, yuv420p pixel format) and AAC audio, with the file index (moov) at the start so it begins playing before it has fully downloaded. It is the combination every device, browser, messaging app and social network plays. It accepts MP4, MOV, MKV, WEBM and AVI as input.

CRF or bitrate: the two ways to compress

According to the FFmpeg H.264 encoding guide, there are two strategies:

  • CRF (constant quality): you tell the encoder which quality you want and it spends whatever bits each scene needs. The scale runs from 0 (lossless) to 51; 23 is the default, 18 is considered visually almost indistinguishable from the original and from 28 the loss starts to show. Every 6 CRF points roughly double or halve the size. It is the option when quality matters and the final size is secondary.
  • Fixed bitrate: you set how many kilobits per second the video may use, so the final size is predictable (bitrate × duration). It is the option when the video has to fit a specific limit.

The tool offers both. The quick presets use CRF; the size-based presets use bitrate.

The five presets, with their numbers

Preset What it does
High CRF 23, same resolution: standard H.264 quality, moderate saving
Medium CRF 28: clear saving, loss hardly visible on a phone screen
Low CRF 32 and the short side capped at 720 px: maximum saving
WhatsApp 15.5 MB size target and 720p
Email 24 MB size target, for attachments (Gmail accepts up to 25 MB)

The size-based presets do not guess: they calculate the bitrate from the video’s duration, subtracting what the audio will take and a 7 % container margin, and cap it with a maxrate of 1.4× and a bufsize of 2× so peaks do not break the target. If the resulting bitrate falls below 80 kb/s (a video too long for that size), the tool warns that quality would be unacceptable and suggests trimming it first. Before compressing you see the estimated size; in CRF mode it is an approximation (bits-per-pixel model), in bitrate mode it is practically exact.

Advanced mode

If you know what you want, you can adjust:

  • Resolution: 1080p, 720p, 480p or 360p. Reducing resolution is the biggest saving with the least perceived loss when the video will be watched on a phone.
  • CRF from 18 to 40, or bitrate from 200 to 8,000 kb/s.
  • Frames per second: 60, 30, 24 or 15. Going from 60 to 30 saves a lot on screen recordings.
  • Audio: AAC from 64 to 192 kb/s, or remove it entirely for a silent video.

What to choose in each case

Situation Recommended setting
Sending on WhatsApp WhatsApp preset. If it warns the video is too long, trim it or send it as a document
Attaching to an email Email preset
Uploading to your own website Advanced: 720p or 1080p, CRF 26 to 28, 30 fps; for silent background videos, remove the audio
Keeping a light copy Medium (CRF 28)
Long screen recording Advanced: 15 or 24 fps, CRF 28, audio at 64 kb/s if it is only voice
Preserving maximum quality High (CRF 23) or CRF 18 in advanced, accepting a smaller saving

And one general rule: always compress from the original, not from an already compressed video, because every pass accumulates loss.

Conclusion

A compressor running in the browser changes three things: the video does not leave your device, there is no size limit and there is no watermark or paid tier. With CRF you choose quality; with bitrate you choose size; the WhatsApp and email presets do the calculation for you and warn if the video will not fit at acceptable quality. If you are going to publish the result on a website, also reduce the resolution and the frame rate, which is where the big saving is.

Sources and references

  1. AIMRAN Tools: Compress video tools.aimran.es
  2. FFmpeg Wiki: H.264 Video Encoding Guide (CRF, presets) trac.ffmpeg.org
  3. ffmpeg.wasm: FFmpeg compiled to WebAssembly for the browser ffmpegwasm.netlify.app
  4. Gmail Help: attachment size limit support.google.com

Related tools

Herramientas gratuitas de AIMRAN Tools que funcionan en tu navegador, sin registro.

Ver todas las herramientas
  • Compress video

    Compresses MP4, MOV, MKV, WEBM or AVI in the browser with FFmpeg, without uploading the file, no size limit and no watermark. Presets for WhatsApp and email.

Web development

How to convert images to WebP (and when not to)

What WebP is, how much it saves over JPEG and PNG, how to convert images in the browser, the terminal or Node.js, and how to serve them with picture.

4 min read