Converting Video and Audio Formats in the Browser With FFmpeg.wasm (No Upload, No Server)
Most "online converter" tools still work the same way they did in 2010: you upload your file to a server, something runs ffmpeg on it, and you download the result. That means your file leaves your device, the server need
Most "online converter" tools still work the same way they did in 2010: you upload your file to a server, something runs ffmpeg on it, and you download the result. That means your file leaves your device, the server needs storage and bandwidth, and you're waiting on an upload + processing + download round trip for something your own CPU could do in the time it takes to click a button.
FFmpeg compiled to WebAssembly changes that. The actual ffmpeg C codebase runs inside the browser tab, in a worker thread, operating on bytes that never leave the machine. No upload, no server cost, no "file deleted after 1 hour" disclaimer because there was never a file on a server to delete.
What this actually looks like in practice
I've been building a set of free browser-based tools (dailysolution.org) and the media conversion ones were the most interesting to get right: audio format conversion (M4A to WAV, AAC to MP3, MOV to MP3) and video format conversion (MKV to MP4, MOV to GIF) all running on ffmpeg.wasm.
A few things that are genuinely harder than the "upload to a server" version:
- Memory limits. The wasm build runs in the browser's memory sandbox, so a 2GB video file is a real constraint, not just a slow upload. You have to decide upfront what file sizes you'll actually support well.
-
Thread availability. The multi-threaded ffmpeg.wasm build needs
SharedArrayBuffer, which needs cross-origin isolation headers (COOP/COEP) set correctly, or you silently fall back to the single-threaded build and conversions take noticeably longer. - Codec coverage. The wasm build doesn't ship every codec the native ffmpeg binary supports by default; you pick a build target (core, core-mt, or a custom build) based on which formats you actually need, to keep the wasm bundle size down.
- UX during a CPU-bound wait. A 40MB MOV to MP3 conversion can take real wall-clock time on a mid-range laptop. Users need a progress indicator that's actually tied to ffmpeg's own progress events, not a fake spinner, or they'll assume the tab froze.
Why it's worth it anyway
For a free tool, the economics are the real argument: no server-side compute bill that scales with usage, no file storage/cleanup job to maintain, and no "your file is uploaded to our servers" line in the privacy policy, because it's simply true that it isn't.
If you're curious what this looks like end to end, the conversion tools are live and free to use: dailysolution.org/media-converter
Happy to go deeper on the COOP/COEP header setup or the progress-event wiring if anyone's hitting those specifically — they were the two things that actually cost debugging time.
Originally published by Dev.to WebDev. Aggregated on AIWithGhost for educational purposes — full credit and traffic to the original publisher.