/** * ASS (Advanced SubStation Alpha) writer. * * SRT only has text + timing. ASS supports: * - Font name + size * - Primary / outline / shadow color (hex BGRA) * - Position (canvas-relative — needed for vertical-format burned captions) * - Bold / italic / underline / strikeout * - Margins * * For TikTok / Reels / Shorts burned-in captions, this is the format you want. * ffmpeg's `subtitles` filter renders ASS directly into a video stream: * ffmpeg -i in.mp4 -vf "subtitles=captions.ass" -c:a copy out.mp4 * * Resolve also imports ASS as a subtitle track and lets the user style it * further on the timeline. * * Time format is "H:MM:SS.cc" (centiseconds), NOT "HH:MM:SS,mmm" like SRT. */ export interface AssCue { /** Start in seconds. */ start: number; /** End in seconds. */ end: number; /** Text. Newlines become \\N in ASS. */ text: string; /** Optional override style name (must exist in `styles`). Default "Default". */ style?: string; } export interface AssStyle { /** Style name; referenced by AssCue.style. "Default" is required. */ name: string; fontName?: string; fontSize?: number; /** Primary color in hex RRGGBB or RRGGBBAA (alpha first byte in ASS). */ primaryColor?: string; /** Outline color in hex RRGGBB or RRGGBBAA. */ outlineColor?: string; /** Shadow color in hex RRGGBB or RRGGBBAA. */ shadowColor?: string; bold?: boolean; italic?: boolean; underline?: boolean; /** 1-9 numpad layout. 2=bottom-center (default), 5=center, 8=top-center. */ alignment?: 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9; /** Outline thickness. Default 2. Critical for legibility on busy backgrounds. */ outline?: number; /** Shadow distance. Default 0. */ shadow?: number; /** Bottom margin in pixels (alignment 1-3) / top margin (7-9). Default 60. */ marginV?: number; marginL?: number; marginR?: number; } export interface AssOptions { title?: string; /** Canvas resolution. Default 1920x1080. For vertical burn use 1080x1920. */ playResX?: number; playResY?: number; styles: AssStyle[]; cues: AssCue[]; } /** * Build an ASS file. The `styles` array MUST include one named "Default". * Cues without an explicit `style` field reference "Default". */ export declare function buildAss(opts: AssOptions): string; /** Format seconds as "H:MM:SS.cc" — ASS uses centiseconds, not ms. */ export declare function formatAssTime(sec: number): string; /** * Convert hex RRGGBB or RRGGBBAA into ASS &HAABBGGRR& format. * ASS uses BGR byte order with the alpha BYTE FIRST (00 = opaque). */ export declare function assColor(hex: string): string; //# sourceMappingURL=ass.d.ts.map