feat(browser-export): 100% client-side MP4/WebM export via WebCodecs (mediabunny)#1905
Open
HackingCorp wants to merge 1 commit into
Open
feat(browser-export): 100% client-side MP4/WebM export via WebCodecs (mediabunny)#1905HackingCorp wants to merge 1 commit into
HackingCorp wants to merge 1 commit into
Conversation
…(mediabunny) New @hyperframes/browser-export package (discussion in heygen-com#1661): deterministic quantized GSAP seeks (producer parity contract), SVG foreignObject rasterization (html-to-image), OfflineAudioContext mix of data-start/data-duration audio clips, WebCodecs encoding via mediabunny (avc+aac MP4, vp9+opus WebM). Browser-only tsup build (platform: "browser" compile-time guarantee), 26 unit tests on the pure logic, docs page + build-order registration.
HackingCorp
added a commit
to HackingCorp/ltc-motion
that referenced
this pull request
Jul 3, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Implements the browser-side export path discussed in #1661: a new
@hyperframes/browser-exportpackage that renders a live composition to MP4/WebM entirely in the browser — no server, no FFmpeg, no headless Chrome. It complements@hyperframes/producer(which remains the reference for deterministic, pixel-perfect renders); the target is browser-based editors, template SaaS frontends, and quick exports delivered straight to the user's Downloads folder.Pairs naturally with
@hyperframes/lint/browser(#1749/#1773) for a fully client-side validate → render loop.How it works
[data-composition-id]or#root), read dimensions, resolve duration from the master GSAP timeline inwindow.__timelines(oroptions.duration).<audio>/<video>clip metadata (data-start,data-duration/data-end,data-media-start,data-volume— the producer's contract), decode and mix offline withOfflineAudioContext.Math.round(t·fps)/fps, the producer's parity contract), await<video>layer seeks, rasterize the root to a canvas via SVGforeignObject(html-to-image, fonts embedded once).avc+aacin MP4,vp9+opusin WebM), finalized into a downloadableBlob. Abortable viaAbortSignal, per-phaseonProgress.Package shape
platform: "browser"build — the same compile-time node-free guarantee as@hyperframes/lint/browser.mediabunny(already used by studio's mediaProbe) +html-to-image.<video>frame alignment with a 500 ms guard, main-thread rendering.Testing
🤖 Generated with Claude Code
https://claude.ai/code/session_018TXJXMe4QmSBnmYoR3brtk