Skip to content

StageFlow v1.1.0 — In-Browser WebCodecs MP4 Export & Studio Polish

Choose a tag to compare

@taruma taruma released this 14 Nov 03:34
· 8 commits to main since this release
f2d99e8

StageFlow v1.1.0 brings zero-install, deterministic in-browser MP4 video export powered by WebCodecs and mp4-muxer — allowing directors, educators, and choreographers to render clean Stage Cam POV film gates and 16:9 Observer Diorama schematics directly from the web studio without needing Node.js, Playwright, or FFmpeg.

This release also introduces the stageflow-score-creator workspace skill for guided YAML authoring and resolves a subtle split-pane telemetry bug affecting Observer Camera focal length readouts.


What's New in v1.1.0

🎬 In-Browser Deterministic MP4 Export (File ▾ → Export Video (.mp4)...)

  • Two Selectable Export Cameras:
    • Stage Cam POV: Clean film gate render at gateScale = 1.0 matching your score's aspect_ratio (16:9, 1.85:1, 2.39:1, 4:3, 9:16) with zero viewfinder borders and inherited thin-lens WebGL2 DoF bokeh blur (On / Off).
    • Observer Diorama (16:9): Macroscopic blueprint view locking output to 16:9 (1920×1080 / 1280×720) with visible Stage Camera chassis, tripod/dolly tracks, rectangular gate frustums, focus plane frames, DoF brackets, and 3D trajectory curves. Supports both Scripted Observer and Current Viewport Angle.
  • WebCodecs + mp4-muxer Client-Side Pipeline:
    • Dedicated offscreen WebGL <Canvas frameloop="never" dpr={1}> mounted strictly while an export is actively encoding.
    • Progressive H.264 profile negotiation (avc1.640028 → avc1.640033 → avc1.4d002a → avc1.42001f), encodeQueueSize backpressure control, immediate VideoFrame.close() memory cleanup, live progress telemetry, thumbnail preview, and clean cancellation.
    • Configurable 1080p / 720p resolution, 60 fps / 24 fps cadence, Entire Scene / Current Shot range, and Light / Warm / Dark stage palettes.
    • Pure Layer 1 export resolution, timing, aspect-ratio, and filename utilities covered by unit tests in tests/unit/exportMath.test.ts.

🧭 Workspace Authoring Tooling (stageflow-score-creator Skill)

  • Added .agents/skills/stageflow-score-creator/SKILL.md for AI-assisted YAML score authoring and pedagogical choreography explanation.
  • Enforces strict documentation-only grounding (YAML_AUTHORING_GUIDE.md, STAGEFLOW_SCRIPT_SPECIFICATION.md, SCORE_CATALOG.md) and clean in-chat YAML output without repository pollution.

Bug Fixes

  • Preserved Un-Adapted Observer Focal Length in Split-Pane Layouts (ObserverCameraRig.tsx):
    • Fixed a bug where narrow split-workspace layouts (where adaptive diorama FOV widens vertical FOV to preserve horizontal stage framing) leaked distorted equivalent focal lengths (e.g., 17mm–21mm instead of 35mm) into the [OBS] Telemetry Capsule and copied YAML snippets during free orbit or preset snaps.
    • ObserverCameraRig now preserves the exact un-adapted optical focal length (lastAppliedFocalLengthMmRef) rather than reverse-converting the canvas-adapted camera FOV.

Quality & Verification

  • Unit Test Suite: 236 deterministic tests passing across 20 Vitest suites.
  • Static Checks: oxlint (0 warnings / 0 errors) and strict TypeScript tsc -b build clean.

Upgrade & Usage Notes

  • Browser Requirements for In-Browser MP4 Export: WebCodecs (VideoEncoder) is supported in modern Chromium-based browsers (Chrome, Edge) over HTTPS or localhost. For headless CLI batch rendering (libx264, VP9, ProRes .mov, GIF, or PNG sequences), npm run record and npm run record:batch remain available — see Viewport Recorder Guide.
  • Backward Compatibility: All v1.0.0 YAML choreography scores remain 100% compatible without changes.

Full Changelog & Documentation