Skip to content
ClipperUtils

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
JobInputClipperUtils (WebCodecs)FFmpeg WASMSpeedup
Compress to ¼ sizea 20 s 1080p30 H.264 clip (21 MB)4.86 s→ 5.0 MB24.7 smulti-thread → 5.2 MB5.1×
Exact trim (middle half)a 20 s 1080p30 H.264 clip (21 MB)1.82 s→ 7.8 MB18.5 smulti-thread → 7.0 MB10.1×
Crop to 9:16a 20 s 1080p30 H.264 clip (21 MB)4.25 s→ 5.5 MB14.8 smulti-thread → 3.5 MB3.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 MB14.4 smulti-thread → 5.0 MB5.6×
GIF (5 s, 480 px, 12 fps)a 20 s 1080p30 H.264 clip (21 MB)0.53 s→ 798 KB1.76 smulti-thread → 2.2 MB3.3×
Extract audio to MP3a 20 s 1080p30 H.264 clip (21 MB)0.14 s→ 803 KB0.20 smulti-thread → 482 KB1.5×
Compress to ¼ sizea 30 s 720p30 H.264 clip (20 MB)5.49 s→ 4.6 MB22.0 smulti-thread → 4.7 MB4.0×
Exact trim (middle half)a 30 s 720p30 H.264 clip (20 MB)1.44 s→ 5.5 MB18.0 smulti-thread → 6.6 MB12.4×
Crop to 9:16a 30 s 720p30 H.264 clip (20 MB)4.88 s→ 4.2 MB12.7 smulti-thread → 3.4 MB2.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 MB19.3 smulti-thread → 7.4 MB8.6×
GIF (5 s, 480 px, 12 fps)a 30 s 720p30 H.264 clip (20 MB)0.47 s→ 827 KB0.98 smulti-thread → 2.1 MB2.1×
Extract audio to MP3a 30 s 720p30 H.264 clip (20 MB)0.19 s→ 1.2 MB0.23 smulti-thread → 722 KB1.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
TaskGPU (WebGPU)CPU (WASM)
Transcribe 60 s English (Whisper tiny)2.92 s 20.6× realtime2.76 s 21.7× realtime
Transcribe 60 s English (Whisper base)4.35 s 13.8× realtime4.76 s 12.6× realtime
Transcribe 60 s English (Whisper small)7.50 s 8× realtime13.7 s 4.4× realtime
Separate vocals, 60 s stereo (HTDemucs)14.2 s 4.2× realtime41.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

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/.