/** * Text-overlay builders — lower-thirds + title cards as ASS files. * * Why ASS and not ffmpeg drawtext: stock Homebrew ffmpeg ships WITHOUT * libfreetype, so drawtext returns "Unknown filter". The libass-backed * `subtitles` filter IS present in every build. We piggy-back on the same * burn_subtitles tool used for captions. * * ASS animation primitives we use (verified against zhw2590582/ArtPlayer, * Cyberbeing/xy-VSFilter, MPC-HC's RTS.cpp): * {\move(x1,y1,x2,y2,t1,t2)} — slide a tag from (x1,y1) to (x2,y2) between * ms t1 and t2. Coordinates are PlayRes pixels. * {\fad(in,out)} — fade in over `in` ms, fade out over `out` ms. * {\pos(x,y)} — absolute position override. * {\an} — alignment (numpad layout). * {\fs} — font size override. * {\b1} — bold. * {\c&Hbbggrr&} — primary color override (BGR hex). * {\3c&Hbbggrr&} — outline color. * {\bord} — outline thickness. * {\blur} — gaussian blur. * * Output: a complete ASS file ready for `burn_subtitles` or NLE import. */ export type LowerThirdPosition = "bottom-left" | "bottom-center" | "bottom-right" | "top-left" | "top-center" | "top-right"; export type LowerThirdAnimation = "slide-left" | "slide-right" | "fade" | "none"; export interface LowerThird { /** Big text — name / topic. Required. */ primaryText: string; /** Small text — title / role / source. Optional. */ secondaryText?: string; /** When the lower-third appears, in seconds. */ startSec: number; /** How long it stays on screen, in seconds. */ durationSec: number; fontName?: string; /** Hex RRGGBB. Default white. */ primaryColor?: string; /** Outline / accent color. Default black. */ accentColor?: string; position?: LowerThirdPosition; animation?: LowerThirdAnimation; /** Distance from the canvas edge in pixels. Default 80. */ marginPx?: number; } export type TitleCardAnimation = "fade-in-out" | "zoom-in" | "type-on" | "none"; export interface TitleCard { text: string; startSec: number; durationSec: number; fontName?: string; fontSize?: number; /** Hex RRGGBB. Default white. */ color?: string; /** Numpad alignment (1=bot-left, 2=bot-center, ..., 5=middle, 9=top-right). */ alignment?: 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9; animation?: TitleCardAnimation; } export interface CanvasOpts { width: number; height: number; } /** * Build an ASS file containing one or more lower-thirds. * * Each lower-third becomes ONE ASS dialogue line whose text starts with * the `{\move(...)\fad(...)}` override block. The ASS engine handles all * tween math. */ export declare function buildLowerThirdAss(items: LowerThird[], canvas: CanvasOpts): string; /** * Build an ASS file containing one or more title cards. Centred big-type * cards with optional zoom-in / fade animations. */ export declare function buildTitleCardAss(items: TitleCard[], canvas: CanvasOpts): string; //# sourceMappingURL=text-overlay.d.ts.map