How MP4 to MP3 Extraction Runs in Your Browser
The heavy machinery here is FFmpeg compiled to WebAssembly (the @ffmpeg/core 0.12.6 build, driven by @ffmpeg/ffmpeg 0.12.10). FFmpeg is the same open-source multimedia framework that powers countless server-side converters — but in this page it executes as a WASM module inside your browser tab. The module brings its own virtual filesystem, an Emscripten MEMFS instance, so input and output files exist only in the module's linear memory rather than on disk.
The workflow is a straight FFmpeg command line. Your video is read as a Uint8Array and placed on the virtual filesystem with writeFile(); then exec(['-i', inputName, '-vn', '-ab', '192k', '-ar', '44100', '-f', 'mp3', 'output.mp3']) demuxes the container, decodes the audio track, discards the video stream entirely, and re-encodes audio with the MP3 encoder (libmp3lame) at 192 kbps and 44.1 kHz. The resulting output.mp3 is read back with readFile(), wrapped in a Blob with the audio/mpeg MIME type, and offered for download.
Two constraints shape the experience. First, memory: the input file, the decoded PCM audio, and the encoded output all coexist inside the WASM heap, so very large videos can exhaust browser RAM — this is why conversions of long 4K files occasionally fail on low-memory devices. Second, threading: the default core is a single-threaded build, so encoding runs on one core and large files take proportionally longer. Both are inherent to running FFmpeg client-side, and both are the price of the guarantee that your video never leaves your machine — no upload queue, no server-side encode farm, no copy of your footage anywhere but your own RAM.