Most "online video editors" are upload forms: your file goes to a server, gets processed, and comes back with a watermark or a paywall. We wanted the opposite: an editor where the video never leaves the device. Clipalio is the result. Here is what we learned building it.
The stack
- Astro for the static site (every tool page is plain HTML plus ~2 KB of JS until you pick a file).
- WebCodecs via the mediabunny library for demuxing, decoding, encoding and muxing. This is the core: it gives hardware H.264/AAC where the browser has it.
- ffmpeg.wasm only as a fallback for formats WebCodecs cannot handle.
- Cloudflare Pages for hosting. There is no media server at all.
Lesson 1: Everything heavy must be lazy
A video tool that ships 30 MB of WASM on page load is unusable on a phone. Each tool has a tiny loader; the engine module loads after a file is chosen, and AI models load only when the user presses a button that states the download size ("Download model (80 MB) and create subtitles"). Models are kept in the Cache API, so the second run is instant.
Lesson 2: Whisper in a Worker is good enough for real subtitles
We run Whisper through transformers.js in a Web Worker. Measured on an Apple M-series laptop with a 152-second Spanish clip:
| Model / device | Speed | Word error rate |
|---|---|---|
| tiny, CPU | 7.1x real time | 15% |
| base, CPU | 4.4x | 3% |
| base, WebGPU fp16 | 6.7x | 4% |
"base" is the default. Two tricks mattered more than the model size: cutting audio into 30-second windows at the quietest point (otherwise words are split), and skipping silent windows, because Whisper invents text for silence. We also do our own language detection, since the library assumes English when no language is given.
Lesson 3: Audio sync bugs hide in priming samples
For the volume tool we measure BS.1770 loudness (it matches ffmpeg's ebur128 within 0.1 LU) and apply a limiter. Our first limiter used a running sample counter, and peaks still clipped. The reason: AAC priming samples shift the timeline. Positioning the limiter curve by sample timestamps instead of a counter fixed it. The same class of bug appeared with RNNoise, which answers one 10 ms frame late; we drop the first output frame and delay the dry signal by one frame, and measured lag went to −1 sample.
Lesson 4: Copy what you don't touch
If a tool changes only audio, the video packets are copied untouched (we check the MD5 of the video track in tests). It is faster, and it is lossless.
Lesson 5: Be honest about browser limits
Safari has gaps in encoders, Firefox in some capture options, phones in memory. Instead of failing silently, each tool shows a short note chosen by user agent and falls back (for example, to WebM) when an encoder is missing.
Testing
Every tool has a Playwright test that runs real files through headless Chromium with fake camera and microphone devices, and checks the output with ffprobe: duration, codecs, loudness, frame PSNR against ffmpeg. That is what lets a small team ship ~30 tools without a QA department.
Try it
The editor and all tools are free, without an account or watermark: clipalio.com. Feedback on speed and failures on your hardware is very welcome.
