---
name: remotion-ai-compositor
description: Composite AI-generated video plates (Gemini Omni Flash, Kling 4.0, Runway Gen-4.5, Wan 2.2) with deterministic React typography, Recraft V4.1 SVG brand end-cards, safe-zone 9:16 overlays, and frame-accurate audio ducking inside Remotion.
---
# Remotion AI-Video & Vector End-Card Compositor Protocol
Whenever building or editing Remotion compositions that layer graphics, titles, captions, or end-cards over AI-generated video clips, enforce these exact studio rules:
## 1. Never Animate Fine Print in AI Video—Composite in Remotion
- Treat AI MP4 clips strictly as clean visual plates inside `public/plates/` loaded via `<OffthreadVideo src={staticFile('plates/...')} />` (prefer `<OffthreadVideo>` over `<Video>` for deterministic frame-exact rendering).
- Render all brand logos (inline SVG or Recraft V4.1 `.svg`), pricing numbers, URLs, lower-thirds, and closing CTA slates as crisp vector/DOM elements so there is zero temporal shimmer.
## 2. Deterministic Frame Rate & Duration Math
- Match the Remotion `<Composition fps={24} ...>` strictly to the conformed frame rate of your AI video plates (`24` fps for Gemini Omni Flash, or `30` fps if conformed to 30).
- Kling 4.0 and Runway Gen-4.5 do not publish a frame rate, so read it from the file before setting `fps`: `ffprobe -v error -select_streams v:0 -show_entries stream=r_frame_rate -of csv=p=0 public/plates/shot1.mp4`.
- Drive every animation strictly from `useCurrentFrame()` and `interpolate()` / `spring()`—NEVER use CSS `transition`, CSS `@keyframes`, `setTimeout`, or `Math.random()` (use Remotion `random('seed')`).
## 3. Enforce Cross-Platform 9:16 Safe Zones
When `width === 1080 && height === 1920`, constrain ALL React text, pricing badges, and captions strictly inside:
- Top padding: `>= 220px` (clears TikTok/Reels/Shorts top navigation)
- Right padding: `>= 160px` (clears Like/Comment/Share rail)
- Bottom padding: `>= 480px` (clears handle, description, and Shop CTA deck)
- Subtitle band: `y = 1220px – 1420px`, max 3–4 words per cue.
## 4. Audio Layering & Clean Post Loudness
- Load narration and continuous music beds via `<Audio src={staticFile(...)} volume={(f) => ...} />`, smoothly interpolating music volume down (`0.18`) during speech frames and up (`0.55`) during silent B-roll and the closing end-card.
- Gemini Omni Flash and Kling 4.0 clips always carry their own audio track. Pass `muted` to `<OffthreadVideo>` whenever narration and music come from `<Audio>`, so the plate audio never doubles the mix.
- After rendering via `npx remotion render src/index.ts <CompId> out/master.mp4 --codec=h264 --pixel-format=yuv420p`, run EBU R128 `-14 LUFS` conform (or audit with `video-qc-auditor`) before final delivery.
## 5. Frame-Level Visual Verification
Before finishing, render 2–3 still inspection frames (`npx remotion still src/index.ts <CompId> /tmp/check-hook.png --frame=12` and `--frame=<endcard_frame>`) to verify zero text overlap, clean font loading, and crisp layout alignment.