Mediabunny adds server-side video and audio processing via NodeAV
@mediabunny/server is a new package that polyfills browser-environment media processing features for server-side environments like Node.js, Bun, or Deno, enabling full Mediabunny functionality on the server. The package facilitates server-side video and audio processing, including encoding/decoding for codecs like H.264, HEVC, VP9, and AV1, as well as video frame transformations, using NodeAV as a thin wrapper around FFmpeg's C API. It aims to integrate media processing natively with TypeScript, reducing the need for external CLI calls and offering features like automatic hardware acceleration, multithreading, and zero-copy decode/encode paths.
Key Takeaways
- `@mediabunny/server` polyfills browser media APIs for Node, Bun, and Deno using NodeAV.
- The package adds video codecs including AVC (H.264), HEVC (H.265), VP8, VP9, and AV1.
- Audio support includes AAC, MP3, Vorbis, Opus, FLAC, AC-3, and E-AC-3, with AAC in AAC and ADTS formats.
- Built-in features include resize, rotate, crop, automatic hardware acceleration, multithreading, and zero-copy decode/encode paths.
- The docs show a Node.js upload-compression example that streams input to disk with O(1) memory usage.
Why It Matters
This gives Mediabunny users a server-side path for media encoding, decoding, and frame transforms without falling back to FFmpeg CLI calls. The ecosystem angle is the tighter TypeScript integration: NodeAV sits under the package as an N-API wrapper around FFmpeg’s C API, while the server package adds hardware acceleration, multithreading, and zero-copy paths. The concrete signal to watch is adoption of `registerMediabunnyServer()` in Node, Bun, Deno, or Electron workflows, especially where the docs’ streaming compression example and `toAvFrame()`/`AvFrameVideoSampleResource` hooks fit existing pipelines.
Read full article at mediabunny.dev
