Benchmarks
The same files, processed in the same browser on the same machine: our WebCodecs engine against FFmpeg compiled to WebAssembly, which most in-browser video tools use.
Median: 4.0× faster
Processing time per job, WebCodecs vs FFmpeg WebAssembly| Job | Input | ClipperUtils (WebCodecs) | FFmpeg WASM | Speedup |
|---|
| Compress to ¼ size | a 20 s 1080p30 H.264 clip (21 MB) | 4.86 s→ 5.0 MB | 24.7 smulti-thread → 5.2 MB | 5.1× |
| Exact trim (middle half) | a 20 s 1080p30 H.264 clip (21 MB) | 1.82 s→ 7.8 MB | 18.5 smulti-thread → 7.0 MB | 10.1× |
| Crop to 9:16 | a 20 s 1080p30 H.264 clip (21 MB) | 4.25 s→ 5.5 MB | 14.8 smulti-thread → 3.5 MB | 3.5× |
| Convert to WebMWebCodecs encodes VP9 + Opus. FFmpeg WASM encodes VP8 + Vorbis because its VP9 and Opus encoders crash in @ffmpeg/core 0.12.10 (VP8 is the faster codec to encode). | a 20 s 1080p30 H.264 clip (21 MB) | 2.57 s→ 20 MB | 14.4 smulti-thread → 5.0 MB | 5.6× |
| GIF (5 s, 480 px, 12 fps) | a 20 s 1080p30 H.264 clip (21 MB) | 0.53 s→ 798 KB | 1.76 smulti-thread → 2.2 MB | 3.3× |
| Extract audio to MP3 | a 20 s 1080p30 H.264 clip (21 MB) | 0.14 s→ 803 KB | 0.20 smulti-thread → 482 KB | 1.5× |
| Compress to ¼ size | a 30 s 720p30 H.264 clip (20 MB) | 5.49 s→ 4.6 MB | 22.0 smulti-thread → 4.7 MB | 4.0× |
| Exact trim (middle half) | a 30 s 720p30 H.264 clip (20 MB) | 1.44 s→ 5.5 MB | 18.0 smulti-thread → 6.6 MB | 12.4× |
| Crop to 9:16 | a 30 s 720p30 H.264 clip (20 MB) | 4.88 s→ 4.2 MB | 12.7 smulti-thread → 3.4 MB | 2.6× |
| Convert to WebMWebCodecs encodes VP9 + Opus. FFmpeg WASM encodes VP8 + Vorbis because its VP9 and Opus encoders crash in @ffmpeg/core 0.12.10 (VP8 is the faster codec to encode). | a 30 s 720p30 H.264 clip (20 MB) | 2.23 s→ 17 MB | 19.3 smulti-thread → 7.4 MB | 8.6× |
| GIF (5 s, 480 px, 12 fps) | a 30 s 720p30 H.264 clip (20 MB) | 0.47 s→ 827 KB | 0.98 smulti-thread → 2.1 MB | 2.1× |
| Extract audio to MP3 | a 30 s 720p30 H.264 clip (20 MB) | 0.19 s→ 1.2 MB | 0.23 smulti-thread → 722 KB | 1.3× |
On-device AI: GPU vs CPU
Same browser and machine, WebGPU vs the WebAssembly CPU fallback. Warm runs (model already downloaded and compiled). Times exclude the one-time model download. “Realtime” = seconds of audio processed per second.
AI processing time, WebGPU vs CPU| Task | GPU (WebGPU) | CPU (WASM) |
|---|
| Transcribe 60 s English (Whisper tiny) | 2.92 s 20.6× realtime | 2.76 s 21.7× realtime |
| Transcribe 60 s English (Whisper base) | 4.35 s 13.8× realtime | 4.76 s 12.6× realtime |
| Transcribe 60 s English (Whisper small) | 7.50 s 8× realtime | 13.7 s 4.4× realtime |
| Separate vocals, 60 s stereo (HTDemucs) | 14.2 s 4.2× realtime | 41.9 s 1.4× realtime |
On this Apple M4 the multi-threaded CPU path keeps up with the GPU on the smallest Whisper models, which spend most of their time in the token-by-token decoder; the GPU pulls ahead on larger models and on source separation. Model download time (once per browser) is not included.
Method
- Machine: Apple M4, 10 cores, 16 GB RAM, Darwin 27.0.0.
- Browser: Google Chrome 158.0.8127.37 (headless, driven by Playwright).
- Inputs: generated with native ffmpeg: a noisy moving test pattern (deliberately hard to compress, like real camera footage) with stereo audio, H.264 + AAC in MP4.
- Timing: Median of 3 WebCodecs runs vs 1 warm FFmpeg WASM run (core already loaded), single- and multi-threaded; faster FFmpeg variant shown. Times include probing, decoding, encoding and muxing inside the worker. FFmpeg cold load reported separately.
- FFmpeg: @ffmpeg/core 0.12.10 / @ffmpeg/core-mt 0.12.10. One-time download and compile of the core: single-thread 0.05 s, multi-thread 0.09 s (not included in the table; served from localhost, so real-world load is longer).
- Settings: both engines get the same job: same trim points, same crop, same GIF settings, and for “Compress” the same target size. FFmpeg uses x264
veryfast (CRF 23 outside of target-size jobs), libvpx VP8 realtime, LAME; WebCodecs uses the browser’s encoders (hardware where available) at a bitrate-based high-quality setting. Output sizes are shown under each time. - Measured on: Tue, 24 Nov 2026 10:31:03 GMT.
Caveats
Hardware encoders are tuned for speed. At the same bitrate, a slow software x264 preset can look slightly better, which is why the “Compress” rows use a matched target size and resolution. The other rows use each engine’s default quality, so their output sizes differ (shown under each time); we don’t claim identical quality. Speedups depend on your device: phones and laptops with media engines (Apple silicon, recent Intel, AMD and Qualcomm chips) gain the most. GIF and MP3 output have no hardware encoder; there the gain comes from hardware decoding only.
Reproduce it
Clone the repository, run npm install, npm run build and npm run bench. Raw JSON for each run is saved under bench/results/.