wasmpeg

FFmpeg for the browser, built for the decode → display loop.

npm install wasmpeg
example.js
import wasmpeg from 'wasmpeg';

await wasmpeg.load();

// Decode directly to an RGBA Uint8ClampedArray
const rgba = await wasmpeg.scale(file, 1280, 720);

// Or parse container metadata without decoding
const info = await wasmpeg.probe(file);
console.log(info.duration, info.video.fpsNum / info.video.fpsDen);

Built for speed

Skips the Emscripten filesystem for core workflows. Demux and decode directly from memory, straight to a typed array.

FATE verified

Tested against FFmpeg's own regression suite. 86.9% FATE coverage, 93.3% byte-for-byte exactness.

One package

Zero-config. Universal build runs identically on Node, browsers, and workers. No separate Core packages to juggle.

WebGPU accelerated

Includes an experimental hardware-accelerated pipeline. Falls back silently to WebAssembly CPU if the device lacks support.