/** * The first cut nobody had to author. * * `bitmagic trailer make` on a fresh recording has an analysis (scored highlight windows with * contact sheets) and a target length, and must produce a watchable trailer with no shots file — * so the agent has something to react to and tune, rather than a blank page. This module turns * the analysis into a `ShotsFile` that follows the craft rules the make-trailer skill paid for: * * - shots run 1.5–3 s and VARY in length (a fixed pattern, so no two neighbours match); * - the body is chronological — a first cut should tell the session's story, not shuffle it; * - a forced window (`score`, `lap`, `goal`, `match-end`) is always in, and a match-end is * pinned last so the end card dims over the finish; * - every shot starts a little BEFORE its peak event, so the action lands inside the shot * instead of on its first frame; * - speed is 1.0 everywhere — slow motion reads as a low framerate on gameplay footage; * - text is an end card only. * * When the analysis is thin (few events logged) the remaining slots are filled with evenly spaced * shots across the recording, so every recording yields a trailer — a boring cut beats no cut, and * the sheets let the agent replace shots in the next turn. */ import type { Analysis } from './timeline-types.js'; import type { BeatAnalysis } from './music-beats.js'; import type { ShotsFile } from './beat-cut.js'; /** Seconds per body shot, cycled. All inside the craft doc's 1.5–3 s band, never two alike in a row. */ export declare const SHOT_LENGTH_PATTERN_SEC: readonly number[]; export declare const END_CARD_SEC = 2.5; /** How far before the peak event a shot begins, as a fraction of its length. */ export declare const LEAD_IN_FRACTION = 0.6; /** Nothing in the first second: the game is still fading in from its menu. */ export declare const SKIP_LEADING_SEC = 1; export declare const MIN_BEATS_PER_SHOT = 2; export declare const MAX_BEATS_PER_SHOT = 8; export interface AutoShotsInput { analysis: Analysis; recordingName: string; /** Whole trailer including the end card, in seconds. */ targetSeconds: number; /** When present, shot lengths become whole beats and the end card too. */ beats: BeatAnalysis | null; title: string; sub?: string; /** Draw the HUD replay over every shot (the render's --ui). */ ui?: boolean; /** Frames the recorder failed to save (timeline.recording.missingFrames). Shots avoid them. */ missingFrames?: readonly number[]; } /** A shot may carry at most this share of missing frames before it reads as a freeze. */ export declare const MAX_MISSING_FRACTION = 0.1; export declare function buildAutoShots(input: AutoShotsInput): ShotsFile;