🎥 Make videos programmatically with React
`@remotion/skills`: Add video layout guidance (#7386)
Igor Samokhovetsdcf4f1cfb974
diff --git a/packages/skills-evals/scenarios.ts b/packages/skills-evals/scenarios.tsindex 480d865e2a..8983b27c0d 100644--- a/packages/skills-evals/scenarios.ts+++ b/packages/skills-evals/scenarios.ts@@ -5,4 +5,72 @@ export type SkillEvalScenario = {timeoutMs?: number;};-export const scenarios: SkillEvalScenario[] = [];+export const scenarios: SkillEvalScenario[] = [+ {+ id: 'vertical-promo-text-layout-proportions',+ model: 'openai-codex/gpt-5.5',+ prompt: `Make a simple short vertical promo video for a new productivity app called FlowPilot.++It's an app that helps people plan their week faster and automatically adjust their schedule when plans change. The video should feel like a clean product launch ad for Instagram or TikTok.++Please include these phrases in the video:+- "Plan your week in minutes"+- "AI-powered schedules that adapt when life changes"+- "Smart priorities"+- "Calendar sync"+- "Focus blocks"+- "Try FlowPilot today"++Use a few animated shapes, simple app-style cards, and smooth transitions. Keep it around 10 seconds long.`,+ timeoutMs: 20 * 60 * 1000,+ },+ {+ id: 'landscape-promo-text-layout-proportions',+ model: 'openai-codex/gpt-5.5',+ prompt: `Make a simple short landscape promo video for a new productivity app called FlowPilot.++It's an app that helps small teams plan projects, assign tasks, and see what needs attention next. The video should feel like a clean website hero animation or YouTube pre-roll.++Please include these phrases in the video:+- "Bring the whole team into focus"+- "Plan projects faster"+- "Assign tasks clearly"+- "See what needs attention"+- "Start with FlowPilot"++Use a few animated shapes, simple app-style cards, and smooth transitions. Keep it around 10 seconds long.`,+ timeoutMs: 20 * 60 * 1000,+ },+ {+ id: 'map-trip-la-ny-paris-3d',+ model: 'openai-codex/gpt-5.5',+ prompt: `Use Remotion best practices. Make a new composition with a map.++Start focused on Los Angeles, then zoom out while staying visually focused on LA. Once the zoom-out is done, animate a route line from LA to New York and make the camera follow the line as it travels.++Add another stop to the trip: Paris. Continue the route from New York to Paris, then animate the Eiffel Tower and show it in 3D.`,+ timeoutMs: 20 * 60 * 1000,+ },+ {+ id: 'bar-line-chart-revenue-conversion',+ model: 'openai-codex/gpt-5.5',+ prompt: `Create a 1920x1080 dark-themed (#1A1A2E) composition called 'BarLineChart' with a combination chart showing monthly sales data.++Use bars for revenue ($8K, $12K, $15K, $11K, $18K, $22K for Jan-Jun) that grow upward from the baseline. Overlay a blue (#0B84F3) line tracking conversion rate (2.1%, 2.8%, 3.2%, 2.9%, 3.8%, 4.2%) that draws progressively with a glowing effect.++Bars should animate sequentially with slight overlap while the line follows behind. Include axis labels and a pulsing dot marker at the line tip. Use smooth spring-based timing over 120 frames at 30fps. Use the remotion-best-practices skill.`,+ timeoutMs: 20 * 60 * 1000,+ },+ {+ id: 'youtube-subscribe-lower-third',+ model: 'openai-codex/gpt-5.5',+ prompt: `Use Remotion best practices. This is our YouTube channel: https://www.youtube.com/@remotion_dev.++Use curl to scrape YouTube and find the channel avatar and subscriber count. Multiple subscriber counts may appear on the page, so identify the correct one for the channel.++Make a white lower third that slides in from the bottom center. Show the channel name, subscriber count, and avatar. Display a typical fixed-width black YouTube subscribe button that changes from "Subscribe" to "Subscribed".++Use an ease-out animation for pressing in the button, then a spring animation with a slight bounce once the button is released. Fade out the lower third. Render it as a transparent ProRes video.`,+ timeoutMs: 20 * 60 * 1000,+ },+];diff --git a/packages/skills-evals/src/run-count.ts b/packages/skills-evals/src/run-count.tsindex 35532a62ef..81c24db9f6 100644--- a/packages/skills-evals/src/run-count.ts+++ b/packages/skills-evals/src/run-count.ts@@ -1,4 +1,5 @@-export const maxParallelSkillEvalRuns = 4;+export const maxSkillEvalRunCount = 4;+export const maxParallelSkillEvalRuns = 8;export const validateSkillEvalRunCount = (runCount: number | undefined,@@ -11,10 +12,10 @@ export const validateSkillEvalRunCount = (if (!Number.isInteger(runCount) ||runCount < 1 ||- runCount > maxParallelSkillEvalRuns+ runCount > maxSkillEvalRunCount) {throw new Error(- `${name} must be an integer between 1 and ${maxParallelSkillEvalRuns}.`,+ `${name} must be an integer between 1 and ${maxSkillEvalRunCount}.`,);}diff --git a/packages/skills/skills/remotion/SKILL.md b/packages/skills/skills/remotion/SKILL.mdindex 829e1fdba3..9c20c154f6 100644--- a/packages/skills/skills/remotion/SKILL.md+++ b/packages/skills/skills/remotion/SKILL.md@@ -21,6 +21,8 @@ Replace `my-video` with a suitable project name.## Designing a video+Before designing visual scenes, layouts, promos, motion graphics, or text-heavy videos, load [rules/video-layout.md](rules/video-layout.md) for video-first layout and text sizing guidance.+Animate properties using `useCurrentFrame()` and `interpolate()`. Use Easing to customize the timing of the animation.```tsxdiff --git a/packages/skills/skills/remotion/rules/video-layout.md b/packages/skills/skills/remotion/rules/video-layout.mdnew file mode 100644index 0000000000..2ac116f6cb--- /dev/null+++ b/packages/skills/skills/remotion/rules/video-layout.md@@ -0,0 +1,68 @@+---+name: video-layout+description: Video-first layout, composition, and text sizing guidance for Remotion.+metadata:+ tags: layout, composition, typography, text, motion graphics, promo+---++# Video layout++Videos are watched differently than web pages are read. Design for quick understanding from the full frame, not for a dense UI that rewards close inspection.++## Start from the frame++- Decide what the viewer should notice first in each scene. Build the frame around that one thing.+- Keep important content inside a generous safe area. For 1080px-wide videos, keep key text at least 80px from the sides and 100px from the top and bottom.+- Prefer centered, stacked, or strongly aligned layouts. Avoid scattered dashboard-like layouts.+- Use empty space intentionally. A video frame with one strong message is usually better than a frame full of widgets.+- Do not place objects side by side just because there is room. If two elements compete, show them one after another or make one clearly secondary.++## Default scene structure++For promos, explainers, and motion graphics, a good default scene is:++- One main text message+- One supporting visual, such as an icon, product card, shape, or screenshot-style mockup+- One or two background accents++Avoid defaulting to many cards, badges, borders, pills, or tiny labels. Those are web UI patterns and often make videos feel cluttered.++## Prevent overlap by construction++- Do not manually position every readable element with independent `top`, `left`, `right`, or `bottom` values.+- Put readable content in normal layout containers using `flex`, `grid`, `gap`, `justifyContent`, and `alignItems`.+- Use absolute positioning mainly for backgrounds, decorative shapes, glows, particles, and elements that are meant to layer behind the content.+- Reserve a slot for each major element in the scene. For example, a vertical promo scene can use a centered column with `gap` for headline, card, and CTA.+- Animate elements from their reserved slot using `opacity`, `transform`, and `scale`; do not animate them into a space occupied by another element.+- If an element enters from offscreen or from another part of the frame, its final resting position must still belong to a layout slot.+- When text length is unknown or user-provided, assume it may wrap. Give the text block enough width and vertical room instead of placing another object immediately under it.++## Text in video++- Text must be readable at video-viewing distance. If unsure, make it larger, not smaller.+- Treat small text as decorative unless the user explicitly needs it to be read.+- For 1080px-wide compositions, use these rough minimums:+ - Main headline: 84px+ - Important supporting text: 44px+ - Labels or short callouts: 32px+- Scale those values with the composition width. For example, a 1920px-wide composition needs larger text than a 1080px-wide composition.+- Keep line lengths short. Break long ideas into multiple scenes instead of shrinking the font.+- Use strong contrast between text and background. Add a subtle backing shape or simplify the background if the text is hard to read.+- Do not stack many text blocks in the same area. Give each message its own moment or clearly separated region.++## Solve crowding with time++- Let time solve layout problems. Instead of showing every feature at once, reveal them one after another.+- If a frame feels crowded, remove an element, enlarge the focal element, or move the secondary element to another scene.+- Favor centered or strongly aligned compositions over scattered UI layouts.+- Use background shapes, gradients, and cards to support the message, not to create visual noise.+- Keep the visual system consistent across scenes: repeated spacing, repeated alignment, and a small set of shapes/colors.++## Pre-render check++Before rendering, inspect a representative frame at normal size:++- Can the main message be read quickly?+- Is there one obvious focal point?+- Are any objects touching, overlapping, or awkwardly sitting next to each other?+- Would the frame still make sense if seen for less than one second?