# Vanilagy/mediabunny

Pure TypeScript media toolkit for reading, writing, and converting video and audio files, directly in the browser.

Repository: https://github.com/Vanilagy/mediabunny
Canonical: https://ross.abutalabs.com/products/mediabunny
Homepage: https://mediabunny.dev/
Language: TypeScript
License: MPL-2.0
License Family: copyleft
Topics: audio, decoding, demuxing, encoding, media, mp3, mp4, muxing, ogg, video, wav, webcodecs, webm, typescript, library, npm
Last push: 2026-08-26T11:51:48+00:00

## Health v2 (maintenance only)
Score: 85/100 (v2, computed 2026-09-03T02:39:23.370411+00:00)
- activity 99, release rhythm 87, longevity 52
- inputs: {"age_days": 731, "days_push": 7, "days_rel": 7, "gap_med": 1, "n_releases_24m": 162}
- flags: none
- formula: round(0.45*activity + 0.35*rhythm + 0.20*longevity); archived -> min(score, 10)

## Adoption (not part of the score)
Stars 7017, forks 293 (observed 2026-08-28T04:09:52.814930+00:00)

## What it is
Mediabunny is a pure TypeScript, zero-dependency library for reading, writing, and converting video and audio files (MP4, WebM, MP3, WAV, OGG, HLS) directly in the browser, built on the WebCodecs API. It provides lazy, frame-accurate reading, fine-grained muxing/demuxing control, and a high-level conversion API for transcoding, trimming, resizing, and more.

## Use cases
- convert video files to mp4 or webm in the browser
- extract metadata like duration and resolution from a media file
- read individual video frames from an mp4 with frame-accurate timing
- trim or compress a video client-side without uploading to a server
- mux canvas recordings into a video file
- resize, crop, or rotate video in a web app
- resample or downmix audio tracks in the browser
- build a browser-based video editor

## When to choose
- you need client-side media processing without a server or FFmpeg
- you want fine-grained control over muxing, demuxing, and track timing
- bundle size matters and you want tree-shakable, zero-dependency code
- you need to handle large files efficiently via lazy reading or streaming output

## When to avoid
- you need server-side or native media processing outside the browser
- you require codecs or container formats not supported by WebCodecs
- you need a full-featured CLI like FFmpeg with its broad codec ecosystem

## Facets
- artifact type: library
- maturity: active
- function: video-processing, audio-processing, serialization
- domain: media, web-development
- platform: browser, cross-platform
- tags: webcodecs, muxing, demuxing, transcoding, mp4, webm, typescript, zero-dependency, tree-shakable, ffmpeg-alternative, video, audio, web-server, nodejs

## Member repositories
- Vanilagy/mediabunny (main) score 85

## Provenance
- Observed fields: from GitHub, fetched 2026-08-28T04:09:52.814930+00:00.
- Health v2: computed from the inputs above; adoption is never an input.
- Inferred fields (summary, facets, guidance): AI-extracted, prompt v1, taxonomy v1, on 2026-08-29T17:40:41.805135+00:00, confidence not recorded.
  - readme: https://github.com/Vanilagy/mediabunny (fetched 2026-08-28T04:09:52.814930+00:00, sha 3d9216cda1a3)
  - homepage: https://mediabunny.dev/ (fetched 2026-08-29T08:36:48.163700+00:00, sha df725eccc9df)
  - site_page: https://mediabunny.dev/guide/reading-media-files (fetched 2026-08-29T08:36:48.166859+00:00, sha a628c7653c7b)
  - site_page: https://mediabunny.dev/guide/writing-media-files (fetched 2026-08-29T08:36:48.169676+00:00, sha 28aab122e084)
  - site_page: https://mediabunny.dev/guide/converting-media-files (fetched 2026-08-29T08:36:48.171986+00:00, sha ad42565983d8)
- Data as of 2026-08-30T08:39:29.467469+00:00.
