Background
For video sources, the current export drops the video track entirely — the output is a mono WAV. That makes the redaction and gap-removal features much less useful on video content. Mediabunny can read and write real video containers (MP4, WebM, MKV) via WebCodecs, so we can produce a video file with the cuts applied.
Proposed change
When the source media has a video track, the export modal exposes video output options:
- MP4 (H.264/AAC, broad compatibility).
- WebM (VP9/Opus, smaller, open).
The export pipeline:
- Read source frames (audio + video) via mediabunny's
Input.
- For each section in
audioDataArray, copy frames whose timestamps fall within the section.
- Write to a mediabunny
Output in the chosen container/codec.
- Audio and video tracks remain in sync.
Acceptance criteria
Open questions / risks
- Pure remux (no re-encode) is fast but only frame-accurate at keyframes. Re-encoding the boundary GOP gives accurate cuts but is slower and may lose quality. Default behavior needs to be decided.
- Some codec/container combinations may not be supported by every browser. Need to pick safe defaults and surface limitations.
Out of scope
- Bitrate / codec advanced controls (separate issue).
Background
For video sources, the current export drops the video track entirely — the output is a mono WAV. That makes the redaction and gap-removal features much less useful on video content. Mediabunny can read and write real video containers (MP4, WebM, MKV) via WebCodecs, so we can produce a video file with the cuts applied.
Proposed change
When the source media has a video track, the export modal exposes video output options:
The export pipeline:
Input.audioDataArray, copy frames whose timestamps fall within the section.Outputin the chosen container/codec.Acceptance criteria
Open questions / risks
Out of scope