/** * title-overlay.ts — music-video TITLE overlays (the "titles like you see in * music videos" layer): a faded lower-third early in the song and/or a centred * end card that holds to EOF. Works on ANY ffmpeg build and ANY script * (Devanagari/Arabic) because the text is rasterized by Pillow + RAQM rather than * ffmpeg `drawtext` (no libfreetype needed, complex scripts shaped correctly). * * Two halves mirror {@link ./assemble/text-card}: the PURE {@link buildTitleCards} * turns parsed options + probed video dims/duration into the card SPECS (text → * PNG) and their composite TIMINGS — fully unit-testable, no I/O. The thin * {@link runTitleOverlay} probes the input, renders each spec to a PNG, then burns * them on with {@link buildTitleCompositeArgs}. `--dry-run` returns the plan * without rendering or spawning. */ import { type TextCardSpec, type TitleCard } from './assemble/text-card.js'; /** Defaults tuned for a cinematic music-video look. */ export declare const TITLE_DEFAULTS: { readonly titleColor: "#f5f0e6"; readonly subColor: "#cbb89a"; readonly accentColor: "#d4622a"; readonly titleFont: "didot"; readonly bodyFont: "avenir"; readonly lowerThirdStartSec: 4; readonly lowerThirdEndSec: 11; readonly fadeSec: 0.6; readonly endCardSec: 4.5; }; export interface TitleOverlayOptions { /** Lower-third lines (first = title-weight, rest = body). Empty = no lower third. */ lowerThird?: string[]; lowerThirdStartSec?: number; lowerThirdEndSec?: number; /** End-card lines (centred). Empty = no end card. */ endCard?: string[]; /** How long before EOF the end card starts; it holds to the end with no fade-out. */ endCardSec?: number; /** Font alias or absolute path for the first/title line. */ titleFont?: string; /** Font alias or absolute path for body/subtitle lines. */ bodyFont?: string; titleColor?: string; subColor?: string; accentColor?: string; /** Drop the ember accent rule on the lower third. */ noAccent?: boolean; } export interface TitleCardsPlan { specs: TextCardSpec[]; /** Composite timings, parallel to `specs` (pngPath filled at render time). */ timings: Array>; } /** * Build the title-card specs + composite timings for a `width`×`height` video of * `durationSec`. PURE — no I/O. Sizes type relative to the frame height so a 720p * and a 1080p master read the same. Throws if neither a lower third nor an end * card is requested. */ export declare function buildTitleCards(opts: TitleOverlayOptions, width: number, height: number, durationSec: number): TitleCardsPlan; export interface RunTitleOverlayResult { output: string; width: number; height: number; durationSec: number; cards: Array<{ kind: 'lower-third' | 'end-card'; lines: string[]; startSec: number; endSec: number; }>; dryRun: boolean; } export interface RunTitleOverlayOptions extends TitleOverlayOptions { input: string; output: string; dryRun?: boolean; python?: string; ffmpegBin?: string; } /** * Probe the input, render the title PNGs (Pillow + RAQM), and burn them on. On * `dryRun`, returns the planned cards without rendering or spawning. Throws a * clear error if Pillow/RAQM is unavailable on a real run (the renderer dep). */ export declare function runTitleOverlay(opts: RunTitleOverlayOptions): Promise; //# sourceMappingURL=title-overlay.d.ts.map