Replace static FFmpeg post-processing with Remotion-powered browser rendering: - Animated word-by-word subtitles (pop, karaoke, glow styles) with real-time preview - Hook overlays with entrance animations (spring, fade, slide-up) - Video effects layer (zoom, brightness, contrast, saturate) - Browser-side rendering via @remotion/web-renderer (WebCodecs) - Editable transcript text in subtitle modal - Layers accumulate across operations (subtitles + hook rendered together) - Gemini EffectsConfig endpoint for structured JSON instead of fragile FFmpeg strings - Render service (Node.js) as alternative server-side renderer - New API endpoints: /api/clip/transcript, /api/effects/generate, /api/render Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
33 lines
1 KiB
TypeScript
33 lines
1 KiB
TypeScript
import { staticFile } from "remotion";
|
|
|
|
/**
|
|
* CSS @font-face declaration for NotoSerif-Bold (bundled locally).
|
|
* Use in components via: <style>{notoSerifFontFace}</style>
|
|
*/
|
|
export const NOTO_SERIF_FONT_FAMILY = "NotoSerif-Bold";
|
|
|
|
export const notoSerifFontFace = `
|
|
@font-face {
|
|
font-family: '${NOTO_SERIF_FONT_FAMILY}';
|
|
src: url('${staticFile("fonts/NotoSerif-Bold.ttf")}') format('truetype');
|
|
font-weight: 700;
|
|
font-style: normal;
|
|
}
|
|
`;
|
|
|
|
/**
|
|
* Map of subtitle font families to their CSS-safe names.
|
|
* These match the options available in SubtitleModal.jsx.
|
|
*/
|
|
export const SUBTITLE_FONTS: Record<string, string> = {
|
|
Verdana: "Verdana, Geneva, sans-serif",
|
|
Arial: "Arial, Helvetica, sans-serif",
|
|
Impact: "Impact, Haettenschweiler, sans-serif",
|
|
Helvetica: "Helvetica, Arial, sans-serif",
|
|
Georgia: "Georgia, 'Times New Roman', serif",
|
|
"Courier New": "'Courier New', Courier, monospace",
|
|
};
|
|
|
|
export function getFontStack(fontFamily: string): string {
|
|
return SUBTITLE_FONTS[fontFamily] ?? fontFamily;
|
|
}
|