Background
The current WAV export uses a hand-rolled 16-bit PCM writer in js/audio-cut.js and produces large files. For sharing and archiving, MP3 or Opus is typically 10× smaller at acceptable quality. Mediabunny is a browser-side WebCodecs-based media library that supports encoding into MP3, Opus, AAC, FLAC, etc. — and reading/writing real containers (MP4, WebM, Ogg).
Proposed change
Extend the export modal with format options:
- WAV — current behavior, universal fallback.
- MP3 — via mediabunny.
- Opus — via mediabunny.
Sensible defaults: MP3 at 192 kbps, Opus at 96 kbps.
Acceptance criteria
Tradeoffs
- WebCodecs is well-supported in Chrome/Edge, OK in Safari 16.4+, limited in Firefox.
- Mediabunny adds bundle size (~roughly 100KB gzipped).
Out of scope
- Video export (separate issue).
- Bitrate / codec advanced controls (separate issue).
Background
The current WAV export uses a hand-rolled 16-bit PCM writer in
js/audio-cut.jsand produces large files. For sharing and archiving, MP3 or Opus is typically 10× smaller at acceptable quality. Mediabunny is a browser-side WebCodecs-based media library that supports encoding into MP3, Opus, AAC, FLAC, etc. — and reading/writing real containers (MP4, WebM, Ogg).Proposed change
Extend the export modal with format options:
Sensible defaults: MP3 at 192 kbps, Opus at 96 kbps.
Acceptance criteria
Tradeoffs
Out of scope