v1.2.0 — Mediabunny integration, natural process exit
Added
node-webcodecs/register— installs the WebCodecs classes onglobalThisso browser-first media libraries (e.g. Mediabunny) run unmodified in Nodenode-webcodecs/mediabunny— one-line Mediabunny integration: the globals plus aVideoSampletransformer soConversionresizing works without a canvas (native multithreaded scaling)
Measured against @mediabunny/server (NodeAV) on the same 1080p file: ~7× faster full-file decode (~2,600 vs ~350 fps), bit-identical pixels, 1.5× faster resize transcodes.
Fixed
- Decoder/encoder unusable after
flush()— FFmpeg was left in EOF state; per the WebCodecs spec both now accept new work after a flush. Fixes frame-accurate seeking in Mediabunny (getSamplereturned null). - Processes no longer hang after codec work finishes — the event loop is held only while encodes/decodes/flushes are in flight, so scripts exit naturally
optimizeForLatencywas accepted but ignored; it now restricts the decoder to slice threading with low-delay flags
import 'node-webcodecs/mediabunny';
import { Input, ALL_FORMATS, FilePathSource, VideoSampleSink } from 'mediabunny';
// Mediabunny now decodes at native speed in Node — no browser, no canvas