Skip to content

RUNE-1011: Story Rune Export Video Source Proposed

Updated2026-08-23

Summary

The legacy export-source adapter path is gone. Story export drives StoryPlayback directly and hands frames to IMediaEncoder through StoryRenderTrack, Story's IVideoTrack adapter over baked playback.

Architecture

StoryPlayback is the low-level seek + render adapter over a baked StoryScene/StoryBakedTimeline. It owns the RuneContext, owns the render surface only for offscreen playback it creates itself, can also bind to a caller-owned surface, submits baked snapshots, updates dynamic source-video sprite frames through StoryVideoRuntime, and renders requested story times. Export orchestration chooses frame times, seeks playback, renders, and packages each frame as a VideoSample backed by Rune.Image. Backends MAY still use StoryPlayback.ReadPixels internally when a CPU encode path is required.

Current Boundary

  • RuneStory.Bake(engine, StoryBakeOptions?) produces the baked StoryScene and StoryBakedTimeline; playback does not execute actions or bake.
  • StoryScene and StoryBakedTimeline own baked snapshot lifetime, and StoryExportRequest.Engine MUST be the same engine used during bake so snapshot ResourceSlots remain valid.
  • StoryPlayback.RenderFrame(time) updates live source-video textures through StoryVideoRuntime immediately before engine.RenderFrame.
  • StoryExporter creates StoryRenderTrack and optional AudioBufferTrack, then hands them to the caller-provided IMediaEncoder.
  • story frame, cue export, preview, and live preview reuse the same baked StoryPlayback seek/render core with different orchestration.

Boundaries

The Story layer bakes scene snapshots and renders them on demand. It does not own container assembly or backend-specific transport details beyond producing timestamped frames for the media pipeline.

Rationale

The unified StoryPlayback model removes the older export-source duplication. Export and preview share one seek-and-render core; only orchestration and frame consumers differ.

Document provenance

Author
@devkanro
Created
2026-05-10
Audited at
2026-08-24 @ ce1dbcb4b5e0161eab69faeb97507a50808b69eb
Dependencies
RUNE-1001, RUNE-1010, RUNE-2001

Rune Project brings Rune Story authoring together with the Rune Engine rendering foundation.