Why video compression takes so long
What the encoder is actually doing to every frame, why it runs on one thread here, and the things that genuinely make it faster.
In short
Compression decodes, transforms and re-encodes every frame — thousands of them — and in the browser it runs single-threaded. Minutes, not seconds, is normal. Trimming first is the only large speed-up.
Trimming a clip finishes in seconds. Compressing the same clip takes minutes. The difference is not arbitrary — they are doing very different amounts of work.
What compression has to do
Every frame has to be decoded from the source, transformed, and encoded again. A two-minute clip at 30fps is 3,600 frames, and each one involves motion estimation — searching the previous frames for matching blocks — which is the single most expensive operation in video encoding. That search is why the encoder is slow, and also why it is good.
Tools that only touch part of the file are fast for the same reason. Muting a video copies the picture through untouched and drops the audio track; nothing is decoded, so it takes seconds regardless of length.
Why it is single-threaded here
FFmpeg's multi-threaded WebAssembly build needs SharedArrayBuffer, which requires a security header that would block other things the page needs. Dexta uses the single-thread build instead, so the encode gets one CPU core rather than all of them. It is a real cost, and it is the trade that keeps everything else on the page working.
What actually makes it faster
| Action | Effect |
|---|---|
| Trim first | Directly proportional — half the length is half the time |
| Cap the resolution | Fewer pixels per frame to encode |
| Keep the tab in the foreground | Browsers throttle background tabs, which can stall an encode |
| Use a laptop rather than a phone | More CPU headroom and far more memory |
| Close other heavy tabs | The encode is competing for the same core |
Mistakes worth avoiding
- Switching tabs and assuming it is still running at full speed. It probably is not.
- Compressing the full clip when you only need thirty seconds of it.
- Starting a long encode on a phone that is low on memory — it may run out and reload the page.
Tools used in this guide
Related guides
How video compression works
Why a minute of video is not 60 still photographs, what an encoder actually throws away, and why the same setting behaves differently on two clips.
3 min readvideoHow to reduce video file size
The four levers, in the order that actually saves the most, and how far to push each before it starts to show.
2 min read