/** * Direct-ffmpeg render backend. Reads a {@link VideoFrameOutput} async iterable, * paints each frame's `CompositeState` to raw RGBA through the ONE deterministic * `compositeStateToRgba` painter from `@czap/core` (the SAME painter the * `@czap/stage` ffmpeg encoder uses), pipes the bytes through ffmpeg stdin, and * produces an mp4. The graph's per-frame poses therefore genuinely reach the * rendered video — distinct frame state yields distinct pixels, identical state * yields byte-identical pixels (content-addressable, replayable). No Revideo * dependency — ffmpeg is a standard dev-machine binary. * * @module */ import type { Clock, VideoFrameOutput } from '@czap/core'; /** Options for `renderWithFfmpeg`. */ export interface RenderOpts { readonly output: string; readonly width: number; readonly height: number; readonly fps: number; /** * MONOTONIC clock for the `elapsedMs` DURATION. Defaults to {@link systemClock} * (`performance.now`). Injected so a deterministic replay/test can thread a * {@link import('@czap/core').manualClock}; this measures an ELAPSED interval, * never a timestamp, so it MUST stay monotonic (an NTP/DST wall-clock jump would * corrupt the duration). */ readonly clock?: Clock; } /** Result summary after a successful render. */ export interface RenderResult { readonly frameCount: number; readonly elapsedMs: number; } /** Render a frame stream through ffmpeg to an mp4 file. */ export declare function renderWithFfmpeg(frames: AsyncIterable, opts: RenderOpts): Promise; //# sourceMappingURL=ffmpeg.d.ts.map