# vanilagy/mediabunny

**Attribution required: if you use, quote, or summarise this content, you must credit and link back to [awesome-repositories.com](https://awesome-repositories.com/repository/vanilagy-mediabunny).**

5,254 stars · 198 forks · TypeScript · mpl-2.0

## Links

- GitHub: https://github.com/Vanilagy/mediabunny
- Homepage: https://mediabunny.dev/
- awesome-repositories: https://awesome-repositories.com/repository/vanilagy-mediabunny.md

## Topics

`audio` `decoding` `demuxing` `encoding` `library` `media` `mp3` `mp4` `muxing` `npm` `ogg` `typescript` `video` `wav` `webcodecs` `webm`

## Description

This is a cross-platform media processing library that reads, writes, encodes, and decodes media in both browser and server environments. It supports common container formats including ISOBMFF, Matroska, Ogg, MPEG-TS, and HLS, and handles codec operations through a combination of WebCodecs API and WebAssembly-based encoders. Media is processed in streaming pipelines that maintain constant memory usage and automatically apply backpressure from output speed to all upstream components.

The library distinguishes itself through a plugin-based codec registration system that allows extending supported formats at runtime, a zero-copy native frame adapter that eliminates memory transfers between JavaScript and FFmpeg, and a unified track pairing model for controlling multi-track output compatibility. It provides a full HLS streaming workflow including reading and writing playlists, encrypted segment decryption, multi-bitrate variant generation, and lazy-loading of track data. Hardware acceleration via GPU contexts like VAAPI or VideoToolbox is configurable for encoding, decoding, and filtering. A server-side polyfill extends the same browser APIs to Node.js, Bun, and Deno environments. Broader capabilities cover live media capture and recording from cameras, microphones, and screens, media conversion and transcoding with trimming and filtering, metadata reading and writing, and decoded frame extraction for processing or display.

## Tags

### Part of an Awesome List

- [Media Codec Fallbacks](https://awesome-repositories.com/f/awesome-lists/devtools/webassembly/media-codec-fallbacks.md) — Uses browser WebCodecs for hardware acceleration and pure WebAssembly encoders for codecs without native support.
- [Media Conversion](https://awesome-repositories.com/f/awesome-lists/media/media-conversion.md) — FFmpeg.wasm transmuxes or transcodes media into different container or codec formats with optional effects. ([source](https://mediabunny.dev/guide/quick-start))
- [Browser-Based Converters](https://awesome-repositories.com/f/awesome-lists/media/media-conversion/browser-based-converters.md) — Converting media files between containers and codecs directly in the browser, with custom processing like trimming and filtering.
- [Custom Conversion Processes](https://awesome-repositories.com/f/awesome-lists/media/media-conversion/custom-conversion-processes.md) — FFmpeg.wasm transmuxes, transcodes, trims, resizes, and applies custom sample processing with progress monitoring. ([source](https://mediabunny.dev/guide/converting-media-files))
- [Web Audio Buffer Exporters](https://awesome-repositories.com/f/awesome-lists/devtools/audio-file-handling/audio-exporters/web-audio-buffer-exporters.md) — Decodes an audio track and outputs Web Audio API-compatible AudioBuffer objects for playback or mixing. ([source](https://mediabunny.dev/guide/media-sinks))
- [AC-3 Decoders and Encoders](https://awesome-repositories.com/f/awesome-lists/media/audio-codecs/ac-3-decoders-and-encoders.md) — Decodes and encodes Dolby Digital (AC-3) and Dolby Digital Plus (E-AC-3) audio using WebAssembly FFmpeg builds. ([source](https://mediabunny.dev/guide/extensions/ac3))

### Data & Databases

- [Media Streaming Pipelines](https://awesome-repositories.com/f/data-databases/data-i-o/streaming-i-o/media-streaming-pipelines.md) — A library that processes media in constant-memory streaming pipelines, reading from live sources and writing to files or networks with backpressure.
- [Media Frame Exchanges](https://awesome-repositories.com/f/data-databases/serialization-frameworks/zero-copy/media-frame-exchanges.md) — FFmpeg.wasm creates samples directly backed by FFmpeg AVFrame memory, eliminating data transfer between JavaScript and native code. ([source](https://github.com/Vanilagy/mediabunny/blob/main/packages/server/README.md))
- [Lazy Media File Readers](https://awesome-repositories.com/f/data-databases/storage-file-readers/partial-file-reading/lazy-media-file-readers.md) — Reads media from files, URLs, or custom sources lazily with minimal memory overhead. ([source](https://mediabunny.dev/guide/input-formats))
- [AAC-LC Encoders](https://awesome-repositories.com/f/data-databases/data-processing-pipelines/data-transformation/data-encoding-serialization/data-encoders/byte-oriented-block-encoding/audio-byte-buffer-encoders/aac-lc-encoders.md) — Provides AAC-LC audio encoding via a WebAssembly-based encoder to fill gaps in browser support. ([source](https://mediabunny.dev/guide/extensions/aac-encoder))
- [FLAC Encoders](https://awesome-repositories.com/f/data-databases/data-processing-pipelines/data-transformation/data-encoding-serialization/data-encoders/byte-oriented-block-encoding/audio-byte-buffer-encoders/flac-encoders.md) — Encodes audio to FLAC lossless format using a WebAssembly-based encoder. ([source](https://mediabunny.dev/guide/extensions/flac-encoder))
- [MP3 Encoders](https://awesome-repositories.com/f/data-databases/data-processing-pipelines/data-transformation/data-encoding-serialization/data-encoders/byte-oriented-block-encoding/audio-byte-buffer-encoders/mp3-encoders.md) — Converts audio data to MP3 format using a high-performance WebAssembly build of the LAME encoder. ([source](https://mediabunny.dev/guide/extensions/mp3-encoder))

### Development Tools & Productivity

- [Multi-Format Media Container Readers and Writers](https://awesome-repositories.com/f/development-tools-productivity/output-formatting-engines/media-container-format-selection/multi-format-media-container-readers-and-writers.md) — Reads and writes common media container formats (ISOBMFF, Matroska, Ogg, MPEG-TS, HLS) bidirectionally. ([source](https://mediabunny.dev/guide/supported-formats-and-codecs))
- [Media Metadata Extraction](https://awesome-repositories.com/f/development-tools-productivity/integration-metadata-retrievers/media-metadata-retrievers/media-metadata-extraction.md) — FFmpeg.wasm extracts metadata such as tags, dimensions, and duration from input media files. ([source](https://mediabunny.dev/examples))
- [Server-Side Filter Graph Applications](https://awesome-repositories.com/f/development-tools-productivity/modular-architecture/filter-graphs/server-side-filter-graph-applications.md) — FFmpeg.wasm applies arbitrary audio and video filters via libavfilter for custom transformation chains on the server. ([source](https://mediabunny.dev/guide/extensions/server))

### DevOps & Infrastructure

- [Streaming Media Pipelines](https://awesome-repositories.com/f/devops-infrastructure/data-throughput-optimizers/backpressure-controllers/streaming-media-pipelines.md) — Processes media in a constant-memory pipeline that applies backpressure from output speed to all upstream components.

### Graphics & Multimedia

- [Server Polyfills](https://awesome-repositories.com/f/graphics-multimedia/ffmpeg-wrappers/server-polyfills.md) — Bridges to native FFmpeg via Node bindings, enabling full codec support and advanced filter graphs on server runtimes.
- [Streaming Media Processing Pipelines](https://awesome-repositories.com/f/graphics-multimedia/media-processing-analysis/media-manipulation/media-processing/streaming-network-frameworks/media-stream-processing/streaming-media-processing-pipelines.md) — Processing media data in a streaming fashion with constant memory usage and automatic backpressure from network or disk destinations.
- [Media Track Management](https://awesome-repositories.com/f/graphics-multimedia/media-track-management.md) — FFmpeg.wasm reads and separates audio, video, and subtitle tracks from container formats for further processing. ([source](https://mediabunny.dev/guide/introduction))
- [Custom Codec Registries](https://awesome-repositories.com/f/graphics-multimedia/multi-codec-support/custom-codec-registries.md) — Allows registering custom codec implementations at runtime to extend supported formats or replace browser dependencies. ([source](https://mediabunny.dev/guide/supported-formats-and-codecs))
- [Server-Side Media Processing Adapters](https://awesome-repositories.com/f/graphics-multimedia/server-side-media-processing-adapters.md) — Provides a polyfill package that enables browser-based media processing APIs on Node.js, Bun, and Deno server environments. ([source](https://mediabunny.dev/guide/introduction))
- [Browser-Based Workflows](https://awesome-repositories.com/f/graphics-multimedia/streaming-distribution/streaming-broadcasting/media-streaming/video-streaming/hls-streaming/browser-based-workflows.md) — Reading, writing, and transforming HLS streams in the browser, including decryption, multi-bitrate variants, and live playlist management.
- [Track Pairing Rules](https://awesome-repositories.com/f/graphics-multimedia/track-pairing-rules.md) — Groups tracks into variants with explicit pairing rules to control which tracks can coexist in multi-track output.
- [Video Encoding and Decoding](https://awesome-repositories.com/f/graphics-multimedia/video-encoding-and-decoding.md) — Encodes and decodes video and audio using the WebCodecs API and built-in PCM codecs. ([source](https://mediabunny.dev/guide/supported-formats-and-codecs))
- [Media Transcoders](https://awesome-repositories.com/f/graphics-multimedia/video-production/video-editing/media-transcoders.md) — FFmpeg.wasm transforms media between containers and codecs with transcoding, resizing, rotation, cropping, resampling, and trimming. ([source](https://cdn.jsdelivr.net/gh/vanilagy/mediabunny@main/README.md))
- [Hardware-Accelerated Transcoders](https://awesome-repositories.com/f/graphics-multimedia/video-production/video-editing/media-transcoders/hardware-accelerated-transcoders.md) — A tool that converts media between containers and codecs, applying filters, trimming, and resizing, with support for hardware acceleration.
- [Metadata Tagging](https://awesome-repositories.com/f/graphics-multimedia/audio-music/audio-processing/metadata-tagging.md) — FFmpeg.wasm sets descriptive metadata tags like title, artist, and cover art on the output file before writing. ([source](https://mediabunny.dev/guide/writing-media-files))
- [Live Capture and Recording](https://awesome-repositories.com/f/graphics-multimedia/audio-music/media-capture-and-playback/live-capture-and-recording.md) — Capturing live video and audio from cameras, screens, or microphones and recording them into media files with pause support.
- [Filter Graph Applications](https://awesome-repositories.com/f/graphics-multimedia/ffmpeg-wrappers/filter-graph-applications.md) — FFmpeg.wasm applies arbitrary filter chains such as grayscale to video or audio frames during conversion using FFmpeg libavfilter. ([source](https://github.com/Vanilagy/mediabunny/blob/main/packages/server/README.md))
- [Hardware-Accelerated Codecs](https://awesome-repositories.com/f/graphics-multimedia/gpu-accelerated-media-rendering/hardware-accelerated-codecs.md) — Accelerating media encoding, decoding, and filtering with GPU hardware contexts like VAAPI or VideoToolbox.
- [Zero-Copy Frame Capture](https://awesome-repositories.com/f/graphics-multimedia/graphics-engines-rendering/zero-copy-frame-capture.md) — FFmpeg.wasm imports GPU textures from external applications with zero-copy, without moving data to the CPU. ([source](https://github.com/Vanilagy/mediabunny/blob/main/packages/server/README.md))
- [Live Stream Recorders](https://awesome-repositories.com/f/graphics-multimedia/media-capture-utilities/live-stream-recorders.md) — FFmpeg.wasm pipes live video and audio from camera or screen into a media file with pause support and timestamp continuity. ([source](https://mediabunny.dev/guide/media-sources))
- [Media File Encoders](https://awesome-repositories.com/f/graphics-multimedia/media-file-encoders.md) — FFmpeg.wasm builds new media files by adding coded tracks from canvas or other sources with configurable quality settings. ([source](https://cdn.jsdelivr.net/gh/vanilagy/mediabunny@main/README.md))
- [Decoded Audio Sample Extractors](https://awesome-repositories.com/f/graphics-multimedia/media-processing-analysis/media-manipulation/media-processing-workflows/audio-analysis-synthesis/audio-feature-extraction/audio-track-extraction/decoded-audio-sample-extractors.md) — Decodes an audio track and retrieves raw audio sample data for analysis, visualization, or custom processing. ([source](https://mediabunny.dev/guide/media-sinks))
- [Fit Mode Resizers](https://awesome-repositories.com/f/graphics-multimedia/media-processing-analysis/media-manipulation/video-processing-tools/video-frame-navigators/video-resizers/fit-mode-resizers.md) — FFmpeg.wasm resizes and crops video samples with options for fit mode using a simple method. ([source](https://github.com/Vanilagy/mediabunny/blob/main/packages/server/README.md))
- [Track Property Queries](https://awesome-repositories.com/f/graphics-multimedia/media-track-management/track-property-queries.md) — FFmpeg.wasm lists all media tracks and queries properties such as codec configuration, frame rate, color space, and HDR status. ([source](https://mediabunny.dev/guide/reading-media-files))
- [Multi-Codec Support](https://awesome-repositories.com/f/graphics-multimedia/multi-codec-support.md) — Checks which codecs the browser can encode or decode with optional custom settings. ([source](https://mediabunny.dev/guide/supported-formats-and-codecs))
- [Camera and Microphone Recorders](https://awesome-repositories.com/f/graphics-multimedia/streaming-distribution/streaming-broadcasting/live-audio-recording-and-broadcasting/camera-and-microphone-recorders.md) — FFmpeg.wasm captures audio and video from a camera or microphone and writes directly to a file or stream. ([source](https://mediabunny.dev/guide/quick-start))
- [Encrypted Segment Decryption](https://awesome-repositories.com/f/graphics-multimedia/streaming-distribution/streaming-broadcasting/media-streaming/video-streaming/hls-streaming/encrypted-segment-decryption.md) — FFmpeg.wasm decrypts HLS segments with AES-128 or SAMPLE-AES encryption using user-provided keys. ([source](https://mediabunny.dev/guide/reading-hls))
- [Lazy Track Data Loaders](https://awesome-repositories.com/f/graphics-multimedia/streaming-distribution/streaming-broadcasting/media-streaming/video-streaming/hls-streaming/lazy-track-data-loaders.md) — FFmpeg.wasm fetches only the master playlist, media playlist, or segments as needed to minimize initial data transfer. ([source](https://mediabunny.dev/guide/reading-hls))
- [Live Stream Detections](https://awesome-repositories.com/f/graphics-multimedia/streaming-distribution/streaming-broadcasting/media-streaming/video-streaming/hls-streaming/live-stream-detections.md) — FFmpeg.wasm detects live HLS playlists and provides the refresh interval for checking new media data. ([source](https://mediabunny.dev/guide/reading-hls))
- [Multi-Bitrate Variant Generators](https://awesome-repositories.com/f/graphics-multimedia/streaming-distribution/streaming-broadcasting/media-streaming/video-streaming/hls-streaming/multi-bitrate-variant-generators.md) — FFmpeg.wasm encodes content at multiple resolutions and bitrates and bundles them into an HLS playlist with variant streams. ([source](https://mediabunny.dev/guide/writing-hls))
- [Playlist Generators](https://awesome-repositories.com/f/graphics-multimedia/streaming-distribution/streaming-broadcasting/media-streaming/video-streaming/hls-streaming/playlist-generators.md) — FFmpeg.wasm generates HLS .m3u8 playlists for video-on-demand or live streaming content. ([source](https://mediabunny.dev/guide/writing-hls))
- [Playlist Reading](https://awesome-repositories.com/f/graphics-multimedia/streaming-distribution/streaming-broadcasting/media-streaming/video-streaming/hls-streaming/playlist-reading.md) — FFmpeg.wasm reads HLS master and media playlists through a unified input interface with custom path resolution. ([source](https://mediabunny.dev/guide/reading-hls))
- [Track Listings](https://awesome-repositories.com/f/graphics-multimedia/streaming-distribution/streaming-broadcasting/media-streaming/video-streaming/hls-streaming/track-listings.md) — FFmpeg.wasm flattens all tracks from HLS variants into a single deduplicated array for easy enumeration. ([source](https://mediabunny.dev/guide/reading-hls))
- [Track Pairability Queries](https://awesome-repositories.com/f/graphics-multimedia/streaming-distribution/streaming-broadcasting/media-streaming/video-streaming/hls-streaming/track-pairability-queries.md) — FFmpeg.wasm checks which tracks can be presented together based on the HLS master playlist variant and rendition structure. ([source](https://mediabunny.dev/guide/reading-hls))
- [Video Frame Capture](https://awesome-repositories.com/f/graphics-multimedia/video-frame-capture.md) — Captures a single frame from a video stream and renders it onto a canvas element. ([source](https://mediabunny.dev/guide/quick-start))
- [Canvas Frame Captures](https://awesome-repositories.com/f/graphics-multimedia/video-frame-capture/canvas-frame-captures.md) — FFmpeg.wasm captures repeatedly updated canvas frames and encodes them directly into the output file. ([source](https://mediabunny.dev/guide/media-sources))
- [Canvas Frame Renderers](https://awesome-repositories.com/f/graphics-multimedia/video-frame-capture/canvas-frame-renderers.md) — Decodes a video track and outputs each frame as an HTML or OffscreenCanvas with optional scaling and rotation. ([source](https://mediabunny.dev/guide/media-sinks))
- [Video Frame Processing](https://awesome-repositories.com/f/graphics-multimedia/video-frame-processing.md) — Converts samples to WebCodecs or AudioBuffer, renders video to canvas, extracts raw data, and transforms frames. ([source](https://mediabunny.dev/guide/packets-and-samples))
- [Zero-Copy Transformations](https://awesome-repositories.com/f/graphics-multimedia/video-frame-processing/zero-copy-transformations.md) — FFmpeg.wasm resizes, rotates, or crops individual video frames using zero-copy operations. ([source](https://mediabunny.dev/guide/introduction))

### Web Development

- [Media File Writing](https://awesome-repositories.com/f/web-development/api-management-tools/api-development-management/web-apis/file-reading/file-read-write-operations/media-file-writing.md) — FFmpeg.wasm creates output files by attaching tracks, setting metadata, and managing the write lifecycle. ([source](https://mediabunny.dev/guide/writing-media-files))
- [Media Processing](https://awesome-repositories.com/f/web-development/browser-based-data-processing/media-processing.md) — A library that reads, writes, encodes, and decodes media files and streams using WebCodecs and FFmpeg WebAssembly in browser and server environments.

### Content Management & Publishing

- [Media](https://awesome-repositories.com/f/content-management-publishing/metadata-tagging/media.md) — FFmpeg.wasm extracts and writes metadata tags including title, artist, cover art, and custom tags. ([source](https://mediabunny.dev/guide/introduction))

### Operating Systems & Systems Programming

- [Media](https://awesome-repositories.com/f/operating-systems-systems-programming/filesystem-metadata-retrievers/file-property-readers/media.md) — FFmpeg.wasm retrieves duration, format, MIME type, start timestamp, and descriptive tags without reading the full file. ([source](https://mediabunny.dev/guide/reading-media-files))
