educational-video-creator

Compare original and translation side by side

🇺🇸

Original

English
🇨🇳

Translation

Chinese

Educational Video Creator

教育类视频制作工具

Create professional educational videos with Kurzgesagt/回形针 visual style using Remotion.
使用Remotion制作Kurzgesagt/回形针视觉风格的专业教育类视频。

Prerequisites

前置条件

This skill requires remotion-best-practices for Remotion technical implementation.
Check and install (MUST complete before Phase 1):
bash
undefined
本技能需要remotion-best-practices来完成Remotion的技术实现。
检查并安装(必须在第一阶段前完成):
bash
undefined

Check if already installed, install if not

检查是否已安装,未安装则进行安装

npx skills list 2>/dev/null | grep remotion-best-practices || npx skills add https://github.com/remotion-dev/skills --skill remotion-best-practices

Once installed, **read the remotion-best-practices skill** to load Remotion API details into context. This is essential — without it, Phase 4 code will have incorrect Remotion API usage.

**External dependencies (needed for Phase 4.5 audio generation):**
```bash
npx skills list 2>/dev/null | grep remotion-best-practices || npx skills add https://github.com/remotion-dev/skills --skill remotion-best-practices

安装完成后,**阅读remotion-best-practices技能文档**,将Remotion API的详细信息加载到上下文环境中。这一步至关重要——没有它,第四阶段的代码会出现Remotion API使用错误。

**外部依赖(第四阶段5小节音频生成需要):**
```bash

ffmpeg (provides ffprobe for audio duration measurement)

ffmpeg(提供ffprobe用于音频时长测量)

brew install ffmpeg # macOS
brew install ffmpeg # macOS系统

apt install ffmpeg # Linux

apt install ffmpeg # Linux系统

edge-tts (Python TTS engine for narration generation)

edge-tts(用于生成旁白的Python文本转语音引擎)

pip install edge-tts
undefined
pip install edge-tts
undefined

Project Setup

项目搭建

This skill creates videos in a dedicated
remotion_video
subdirectory within the current workspace.
First-time setup (recommended — non-interactive):
bash
undefined
本技能会在当前工作区的专用
remotion_video
子目录中创建视频项目。
首次搭建推荐(非交互式):
bash
undefined

Create video project directory

创建视频项目目录

mkdir -p remotion_video cd remotion_video
mkdir -p remotion_video cd remotion_video

Initialize without interactive prompts

无交互式提示初始化项目

npm init -y npm install remotion @remotion/cli @remotion/google-fonts @remotion/transitions react react-dom npm install -D typescript @types/react
npm init -y npm install remotion @remotion/cli @remotion/google-fonts @remotion/transitions react react-dom npm install -D typescript @types/react

Create minimal project structure

创建基础项目结构

mkdir -p src public/audio/narration

Then create the required entry files:
- `src/Root.tsx` — Main composition registry
- `src/index.ts` — Remotion entry point with `registerRoot(Root)`
- `remotion.config.ts` — Remotion configuration
- `tsconfig.json` — TypeScript config

**Alternative (interactive — may block in automated environments):**
```bash
mkdir -p remotion_video && cd remotion_video
npx create-video@latest --blank
npm install
Note:
npx create-video
may prompt for project name, package manager, etc. In CLI/automation contexts, use the non-interactive method above to avoid blocking.
Existing project:
bash
cd remotion_video
npm install  # Ensure dependencies are installed
Project structure:
your-workspace/
├── remotion_video/           # Video project root
│   ├── src/
│   │   ├── Root.tsx          # Main composition registry
│   │   └── YourVideo/        # Video-specific components
│   │       ├── index.tsx
│   │       ├── scenes/
│   │       └── components/
│   ├── public/               # Static assets
│   └── package.json
└── ... (other workspace files)
mkdir -p src public/audio/narration

然后创建所需的入口文件:
- `src/Root.tsx` — 主合成组件注册表
- `src/index.ts` — 包含`registerRoot(Root)`的Remotion入口文件
- `remotion.config.ts` — Remotion配置文件
- `tsconfig.json` — TypeScript配置文件

**替代方案(交互式——在自动化环境中可能会阻塞):**
```bash
mkdir -p remotion_video && cd remotion_video
npx create-video@latest --blank
npm install
注意
npx create-video
可能会提示输入项目名称、包管理器等信息。在命令行/自动化环境中,请使用上述非交互式方法以避免阻塞。
已有项目:
bash
cd remotion_video
npm install  # 确保依赖已安装
项目结构:
your-workspace/
├── remotion_video/           # 视频项目根目录
│   ├── src/
│   │   ├── Root.tsx          # 主合成组件注册表
│   │   └── YourVideo/        # 视频专属组件目录
│   │       ├── index.tsx
│   │       ├── scenes/
│   │       └── components/
│   ├── public/               # 静态资源目录
│   └── package.json
└── ... (其他工作区文件)

Quick Start

快速开始

  1. Setup project → create
    remotion_video
    directory if needed
  2. Gather requirements → confirm topic, audience, duration
  3. Write script → complete narrative with story arc and pacing
  4. Create storyboard → break script into visual scenes with animation specs
  5. Design visuals → apply style guide, create SVG components
  6. Implement animations → code scenes in Remotion
  7. Quality assurance → auto-check, auto-fix, auto-start preview
  1. 搭建项目 → 若需要则创建
    remotion_video
    目录
  2. 收集需求 → 确认主题、受众、时长
  3. 编写脚本 → 完成包含故事线和节奏的完整叙事脚本
  4. 制作分镜脚本 → 将脚本拆解为带有动画规格的视觉场景
  5. 设计视觉元素 → 应用风格指南,创建SVG组件
  6. 实现动画 → 在Remotion中编写场景代码
  7. 质量保证 → 自动检查、自动修复、自动启动预览

⚠️ Context Recovery Protocol

⚠️ 上下文恢复协议

Every conversation turn may follow a context loss (compaction, new session). Before doing ANY work:
  1. Check if
    remotion_video/PROGRESS.md
    exists
    • If YES → Read it completely to determine current phase and last completed step
    • If NO → This is a new project, proceed to Phase 1
  2. Read supporting files referenced in PROGRESS.md (only if that phase is marked complete):
    • remotion_video/script.md
      (if Phase 1.5+ completed)
    • remotion_video/storyboard.md
      (if Phase 2+ completed)
    • src/<Composition>/constants.ts
      (if Phase 3+ completed — contains COLORS, SCENES, NARRATION, AUDIO_SEGMENTS)
  3. Verify files listed in "Files Created" section actually exist on disk
  4. Resume from the first unchecked item in the current phase
Skipping this protocol causes repeated work or file corruption. Always run it first.
每次对话轮次都可能出现上下文丢失(压缩、新会话)的情况。在进行任何工作之前:
  1. 检查
    remotion_video/PROGRESS.md
    是否存在
    • 若存在 → 完整阅读该文件,确定当前阶段和最后完成的步骤
    • 若不存在 → 这是新项目,进入第一阶段
  2. 阅读PROGRESS.md中引用的支持文件(仅当对应阶段已标记完成时):
    • remotion_video/script.md
      (若已完成1.5阶段及以上)
    • remotion_video/storyboard.md
      (若已完成2阶段及以上)
    • src/<Composition>/constants.ts
      (若已完成3阶段及以上——包含COLORS、SCENES、NARRATION、AUDIO_SEGMENTS)
  3. 验证“已创建文件”部分列出的文件是否实际存在于磁盘上
  4. 继续当前阶段中第一个未勾选的任务
跳过此协议会导致重复工作或文件损坏。请务必首先执行该协议。

Progress Tracking — Mandatory Protocol

进度跟踪——强制协议

⚠️ This protocol is NON-NEGOTIABLE. Skipping updates causes context loss and repeated work.
Maintain
remotion_video/PROGRESS.md
using progress-template.md. Create it at Phase 1 start. Log decisions in the Decisions table and add every created file to "Files Created".
⚠️ 本协议为强制性要求。跳过更新会导致上下文丢失和重复工作。
使用progress-template.md维护
remotion_video/PROGRESS.md
文件。在第一阶段开始时创建该文件。在决策表中记录决策,并将每个创建的文件添加到“已创建文件”部分。

Checkpoint Rule

检查点规则

Every time you complete a checkbox item in PROGRESS.md, you MUST immediately:
  1. Mark the item
    [x]
    and add brief notes
  2. Update the "Current State" section (Current Phase + Current Step)
  3. Then — and only then — proceed to the next item
Do NOT batch multiple items. One item done → one update → next item.
每次完成PROGRESS.md中的一个勾选框项后,必须立即:
  1. 将该项标记为
    [x]
    并添加简短说明
  2. 更新“当前状态”部分(当前阶段 + 当前步骤)
  3. 然后——只有完成上述步骤后——再进行下一项任务
请勿批量更新多个项。完成一项→更新一次→进行下一项。

Phase Transition Gate

阶段转换门槛

Before starting any new Phase, you MUST:
  1. Read
    PROGRESS.md
    and verify ALL items in the previous phase are
    [x]
  2. Update "Current Phase" to the new phase
  3. If any previous item is unchecked, complete it first
在开始任何新阶段之前,必须:
  1. 阅读
    PROGRESS.md
    并确认上一阶段的所有项均已标记为
    [x]
  2. 将“当前阶段”更新为新阶段
  3. 若上一阶段有未勾选的项,请先完成该项

Workflow

工作流程

Phase 1: Requirements Gathering

第一阶段:需求收集

⚠️ First: Complete the Prerequisites section (install remotion-best-practices skill and read it). Then create
remotion_video/PROGRESS.md
from progress-template.md and fill in Project Info.
Before starting, confirm these essential details with the user:
  • Topic: What concept/subject to explain?
  • Audience: Who is watching? (children/adults, beginners/experts)
  • Language: Chinese/English/other?
  • Duration: Short (1-3min), Medium (3-5min), or Long (5-10min)?
  • Key points: What must the viewer learn?
For detailed question templates, see requirements-guide.md.
⚠️ 首先:完成前置条件部分(安装remotion-best-practices技能并阅读其文档)。然后从progress-template.md创建
remotion_video/PROGRESS.md
并填写项目信息。
开始之前,与用户确认以下关键细节:
  • 主题:要讲解什么概念/主题?
  • 受众:观看人群是?(儿童/成人,初学者/专家)
  • 语言:中文/英文/其他?
  • 时长:短(1-3分钟)、中(3-5分钟)还是长(5-10分钟)?
  • 核心要点:观众必须学到什么?
详细的问题模板请参考requirements-guide.md

Phase 1.5: Script Writing

1.5阶段:脚本编写

⚠️ Checkpoint Rule active: After completing EACH checkbox item for this phase, immediately update
PROGRESS.md
. Do not batch updates.
Write a complete narrative script before designing the storyboard. This phase focuses purely on storytelling — what to say and how to say it well — without worrying about visual specs, frame numbers, or animation parameters.
IMPORTANT: Write the FULL narration text — every word that will be spoken. Do NOT write summaries, bullet points, or placeholders. The script is the final spoken content.
The script must include:
  1. Core message — one-line summary, learning objectives
  2. Narrative strategy — apply techniques from script-and-narration.md:
    • Entry angle (question / scenario / challenge / story)
    • Core metaphor that runs through the entire video
    • Knowledge scaffolding order (what depends on what)
    • Emotional curve (curiosity → understanding → wonder → satisfaction)
  3. Full narration text — complete word-for-word script for every chapter:
    • Include emphasis markers (bold for stress, italic for softer tone)
    • Mark pauses with
      [.]
      (short),
      [..]
      (medium),
      [...]
      (long),
      [PAUSE]
      or
      [BEAT]
      (dramatic) — see script-and-narration.md Part 3 for duration semantics
    • Add visual intents after each chapter (1-2 sentences describing what viewers should see — enough for Phase 2 to design scenes, but no animation specs)
  4. Pacing notes — where to speed up, slow down, and pause
  5. Self-review — run through the checklist in script-and-narration.md before presenting to user
Quality gate: Present the complete script to the user for approval. Do NOT proceed to Phase 2 until the user explicitly approves the narrative.
Why script first:
  • Separates "what to tell" from "how to show" — two different creative activities
  • LLM produces better narratives when not simultaneously calculating frame ranges
  • Pure text is cheap to iterate; storyboard with animation specs is expensive to revise
  • Users can easily review "is the story good?" without wading through technical details
Output: Save the approved script as
remotion_video/script.md
See script-and-narration.md for video structure templates, narrative techniques, writing techniques, and TTS notes.
⚠️ 检查点规则生效:完成本阶段的每个勾选框项后,立即更新
PROGRESS.md
。请勿批量更新。
在设计分镜脚本之前,先编写完整的叙事脚本。本阶段专注于故事讲述——说什么以及如何说好——无需考虑视觉规格、帧数或动画参数。
重要提示:编写完整的旁白文本——每一句会被说出的内容。请勿编写摘要、项目符号或占位符。脚本是最终的口语内容。
脚本必须包含:
  1. 核心信息——一句话总结、学习目标
  2. 叙事策略——应用script-and-narration.md中的技巧:
    • 切入角度(问题/场景/挑战/故事)
    • 贯穿整个视频的核心隐喻
    • 知识搭建顺序(内容之间的依赖关系)
    • 情感曲线(好奇心→理解→惊叹→满足)
  3. 完整旁白文本——每个章节的逐字完整脚本:
    • 包含强调标记(粗体表示重读,斜体表示柔和语气)
    • [.]
      (短停顿)、
      [..]
      (中等停顿)、
      [...]
      (长停顿)、
      [PAUSE]
      [BEAT]
      (戏剧性停顿)标记停顿——请参考script-and-narration.md第三部分的时长语义
    • 在每个章节后添加视觉意图(1-2句话描述观众应该看到的内容——足够供第二阶段设计场景,但无需动画规格)
  4. 节奏说明——哪里加速、减速和停顿
  5. 自我审查——在提交给用户之前,按照script-and-narration.md中的清单进行检查
质量门槛:将完整脚本提交给用户审批。在用户明确批准叙事内容之前,请勿进入第二阶段。
先写脚本的原因:
  • 将“说什么”与“怎么展示”分开——这是两种不同的创意活动
  • 当不需要同时计算帧范围时,大语言模型能生成更好的叙事内容
  • 纯文本的迭代成本低;带有动画规格的分镜脚本修改成本高
  • 用户可以轻松审查“故事是否精彩”,无需处理技术细节
输出:将批准后的脚本保存为
remotion_video/script.md
视频结构模板、叙事技巧、写作技巧和TTS说明请参考script-and-narration.md

Phase 2: Storyboard Design

第二阶段:分镜脚本设计

⚠️ Checkpoint Rule active: After completing EACH checkbox item for this phase, immediately update
PROGRESS.md
. Do not batch updates.
Convert the approved script into a production-ready storyboard. The script provides what to say; the storyboard defines how to show it.
Input: Completed script (approved in Phase 1.5)
Tasks:
  1. Break script chapters into visual scenes (5-15 scenes)
  2. Assign narration text from the script to each scene
  3. Design visual layers for each scene (background / midground / foreground / UI)
  4. Add frame-level animation specifications (spring, easing, timing)
  5. Define visual-narration sync points
  6. Plan the asset inventory (SVG components, colors, typography)
The cognitive load is much lower than creating everything from scratch — the narrative is already decided, so you only need to focus on visual execution.
Output: Save the completed storyboard as
remotion_video/storyboard.md
for design traceability and iteration reference.
See storyboard-template.md for templates. See script-and-narration.md Part 4 for subtitle formatting and TTS notes.
⚠️ 检查点规则生效:完成本阶段的每个勾选框项后,立即更新
PROGRESS.md
。请勿批量更新。
将批准后的脚本转换为可用于生产的分镜脚本。脚本提供说什么;分镜脚本定义怎么展示
输入:已完成且获批的脚本(1.5阶段)
任务:
  1. 将脚本章节拆解为视觉场景(5-15个场景)
  2. 为每个场景分配脚本中的旁白文本
  3. 为每个场景设计视觉层级(背景/中景/前景/UI)
  4. 添加帧级动画规格(弹性动画、缓动效果、时长)
  5. 定义视觉与旁白的同步点
  6. 规划资源清单(SVG组件、颜色、排版)
这样的认知负荷比从头开始创建所有内容低得多——叙事内容已经确定,只需专注于视觉执行。
输出:将完成的分镜脚本保存为
remotion_video/storyboard.md
,用于设计追溯和迭代参考。
模板请参考storyboard-template.md。 字幕格式和TTS说明请参考script-and-narration.md第四部分。

Phase 3: Visual Design

第三阶段:视觉设计

⚠️ Checkpoint Rule active: After completing EACH checkbox item for this phase, immediately update
PROGRESS.md
. Do not batch updates.
Apply the Kurzgesagt/回形针 style. Concrete steps:
  1. Choose color palette — Select from design-tokens.ts Section 1 or create a custom palette matching the topic
  2. Create
    constants.ts
    — Define
    COLORS
    ,
    TYPOGRAPHY
    ,
    SCENES
    ,
    NARRATION
    , and estimated
    AUDIO_SEGMENTS
    following design-tokens.ts Section 3
  3. Set up fonts — Use Remotion's
    loadFont()
    from
    @remotion/google-fonts
    (see design-tokens.ts Section 2 for reference)
  4. Create shared SVG components — Build reusable visual elements (icons, illustrations, decorative elements) following svg-components.md
  5. Design scene layouts — Plan visual layers (background / midground / foreground / UI) per scene following visual-principles.md
Style principles:
  • Flat design with subtle gradients
  • Bold, saturated color palette
  • Geometric shapes with rounded corners (rx/ry)
  • Clean sans-serif typography
See style-guide.md for complete visual standards. See visual-principles.md for composition and layout.
⚠️ 检查点规则生效:完成本阶段的每个勾选框项后,立即更新
PROGRESS.md
。请勿批量更新。
应用Kurzgesagt/回形针风格。具体步骤:
  1. 选择调色板——从design-tokens.ts第一部分选择,或创建与主题匹配的自定义调色板
  2. 创建
    constants.ts
    ——按照design-tokens.ts第三部分的定义,设置
    COLORS
    TYPOGRAPHY
    SCENES
    NARRATION
    和预估的
    AUDIO_SEGMENTS
  3. 设置字体——使用Remotion的
    @remotion/google-fonts
    中的
    loadFont()
    (参考design-tokens.ts第二部分)
  4. 创建共享SVG组件——按照svg-components.md构建可复用的视觉元素(图标、插画、装饰元素)
  5. 设计场景布局——按照visual-principles.md规划每个场景的视觉层级(背景/中景/前景/UI)
风格原则:
  • 扁平化设计搭配细微渐变
  • 大胆、饱和度高的调色板
  • 带有圆角的几何形状(rx/ry)
  • 简洁的无衬线字体
完整的视觉标准请参考style-guide.md。 构图和布局请参考visual-principles.md

Phase 4: Animation Production

第四阶段:动画制作

⚠️ Checkpoint Rule active: After completing EACH checkbox item for this phase, immediately update
PROGRESS.md
. Do not batch updates. Log key file paths in "Files Created".
Implement scenes using Remotion:
  1. Create SVG components for visual elements
  2. Use
    useCurrentFrame()
    for all animations
  3. Apply appropriate easing (spring for natural motion)
  4. Add scene transitions
Subtitle & narration rules (critical for Phase 4.5 compatibility):
  • All narration text must be stored in the
    NARRATION
    object in
    constants.ts
    — never hardcode text directly in scene TSX files
  • Create an estimated
    AUDIO_SEGMENTS
    in
    constants.ts
    with approximate timing. Phase 4.5 will overwrite it with real audio-based timing
  • Subtitle components must reference
    AUDIO_SEGMENTS.sceneKey
    — never use inline segment arrays with hardcoded frame numbers
  • AUDIO_SEGMENTS
    中的
    startFrame
    /
    endFrame
    必须使用场景本地帧号(每个场景从
    SCENE_PAD
    =15 开始),不是全局帧号。因为 AudioLayer 和 SubtitleSequence 都在场景的
    <Sequence>
    内部运行,
    useCurrentFrame()
    返回的是本地帧号。如果使用全局帧号,后续场景的字幕会延迟或完全不显示
  • This ensures
    rebuild-timeline.ts --write
    in Phase 4.5 can update timing without modifying any scene files
Visual-narration alignment rules (prevents animation-subtitle desync):
  • 每个与旁白内容对应的视觉元素(图标出现、箭头展开、图表绘制等),其
    startFrame
    必须从
    AUDIO_SEGMENTS
    对应段的
    startFrame
    派生
    ,不能凭"视觉节奏"硬编码
  • 正确模式:
    const liftArrowStart = AUDIO_SEGMENTS.forces[0].startFrame;
    (升力箭头在旁白说"升力"时出现)
  • 错误模式:
    const liftArrowStart = 30;
    (凭感觉写的帧数,和旁白无关)
  • 纯装饰性动画(背景粒子、环境氛围)不受此约束,可以自由定时
  • Phase 4 使用估算 AUDIO_SEGMENTS;Phase 4.5 rebuild-timeline 更新真实时间后,因为代码引用的是变量而非硬编码数字,视觉动画会自动同步
  • 参考 animation-guide.md "Narration-Synced Animation" 章节的实现模式
Element sizing rules (prevents "Thumbnail Syndrome" — tiny elements on a large canvas):
  • 参考 visual-principles.md "Content Area Utilization" 确保内容填充画布(核心内容 ≥ 安全区 60%)
  • 组件默认尺寸参考 svg-components.md(图标 ≥96px,流程节点 ≥160px 高,标签 ≥40px)
  • 图表/流程图应占据内容区域大部分面积,避免在 1920×1080 画布上缩成缩略图
Background rules (prevents transparent/checkerboard frames during transitions):
  • The main composition must have a persistent
    <AbsoluteFill>
    background layer (using
    COLORS.background
    ) that sits behind all scenes and never participates in transitions
  • Each scene component must also have its own solid background as the first child element
  • During
    fade()
    transitions, both scenes have reduced opacity — without a persistent background, transparent frames appear as a checkerboard pattern in preview and black in renders
  • See animation-guide.md "Preventing Transparent Frames" for the implementation pattern
Visual richness rules (prevents PPT-like output):
  • 每个场景必须有至少一个 非文字的视觉主体元素(SVG 插画、图表、动画图形等)。纯文字标签 + 方块不是合格的视觉内容
  • 流程图/因果链必须用 图标或插画 配合文字,不能只用纯色方块装文字。参考 svg-components.md "Illustrated Flow Node" 模式
  • 每个场景应有 环境氛围层(粒子、光晕、纹理等),参考 style-guide.md Ambient Effects 章节
  • SVG 插画应体现 Kurzgesagt 风格:圆角几何形状(rx/ry)、扁平化但有层次(多 path 叠加)、柔和渐变(linearGradient/radialGradient)、适当描边
  • 参考 visual-principles.md "Show, Don't Tell" 原则:能用图示表达的概念不要用文字方块
  • 参考 scene-template.tsx 中 ForceDiagramScene 的 SVG 飞机插画作为具象插画的最低质量标准
Color rules (critical for Phase 5 style-scan compliance):
  • All colors must be referenced via the
    COLORS
    object from
    constants.ts
    (e.g.,
    COLORS.accent.rose
    ) — never write hex values directly in TSX files
  • The only exception is
    rgba()
    for opacity variations (e.g.,
    rgba(0, 0, 0, 0.7)
    for subtitle backgrounds)
  • This prevents the common issue where style-scan reports dozens of "color not in approved palette" warnings
See design-tokens.ts Section 3 for the complete constants.ts structure (COLORS, SCENES, NARRATION, AUDIO_SEGMENTS, font loading). See svg-components.md for component patterns. See animation-guide.md for timing and easing.
⚠️ 检查点规则生效:完成本阶段的每个勾选框项后,立即更新
PROGRESS.md
。在“已创建文件”中记录关键文件路径。
使用Remotion实现场景:
  1. 为视觉元素创建SVG组件
  2. 使用
    useCurrentFrame()
    实现所有动画
  3. 应用合适的缓动效果(弹性动画实现自然运动)
  4. 添加场景过渡效果
字幕与旁白规则(对4.5阶段兼容性至关重要):
  • 所有旁白文本必须存储在
    constants.ts
    NARRATION
    对象中——切勿直接在场景TSX文件中硬编码文本
  • constants.ts
    中创建预估的
    AUDIO_SEGMENTS
    和大致时长。4.5阶段会根据实际音频时长覆盖该内容
  • 字幕组件必须引用
    AUDIO_SEGMENTS.sceneKey
    ——切勿使用带有硬编码帧数的内联片段数组
  • AUDIO_SEGMENTS
    中的
    startFrame
    /
    endFrame
    必须使用场景本地帧号(每个场景从
    SCENE_PAD
    =15开始),不是全局帧号。因为AudioLayer和SubtitleSequence都在场景的
    <Sequence>
    内部运行,
    useCurrentFrame()
    返回的是本地帧号。如果使用全局帧号,后续场景的字幕会延迟或完全不显示
  • 这确保4.5阶段的
    rebuild-timeline.ts --write
    可以在不修改任何场景文件的情况下更新时长
视觉与旁白对齐规则(防止动画与字幕不同步):
  • 每个与旁白内容对应的视觉元素(图标出现、箭头展开、图表绘制等),其
    startFrame
    必须从
    AUDIO_SEGMENTS
    对应片段的
    startFrame
    派生
    ,不能凭“视觉节奏”硬编码
  • 正确模式:
    const liftArrowStart = AUDIO_SEGMENTS.forces[0].startFrame;
    (升力箭头在旁白说“升力”时出现)
  • 错误模式:
    const liftArrowStart = 30;
    (凭感觉写的帧数,与旁白无关)
  • 纯装饰性动画(背景粒子、环境氛围)不受此约束,可以自由定时
  • 第四阶段使用预估的AUDIO_SEGMENTS;4.5阶段rebuild-timeline更新真实时长后,由于代码引用的是变量而非硬编码数字,视觉动画会自动同步
  • 实现模式请参考animation-guide.md中的“旁白同步动画”章节
元素尺寸规则(防止“缩略图综合征”——大画布上的微小元素):
  • 参考visual-principles.md中的“内容区域利用率”确保内容填充画布(核心内容≥安全区60%)
  • 组件默认尺寸参考svg-components.md(图标≥96px,流程节点≥160px高,标签≥40px)
  • 图表/流程图应占据内容区域的大部分面积,避免在1920×1080画布上缩成缩略图
背景规则(防止过渡期间出现透明/棋盘格帧):
  • 主合成组件必须有一个持久的
    <AbsoluteFill>
    背景层(使用
    COLORS.background
    ),位于所有场景之后,且不参与过渡
  • 每个场景组件必须也有自己的纯色背景作为第一个子元素
  • fade()
    过渡期间,两个场景的透明度都会降低——如果没有持久背景,预览中会出现透明棋盘格帧,渲染时会变成黑色
  • 实现模式请参考animation-guide.md中的“防止透明帧”章节
视觉丰富度规则(防止类似PPT的输出):
  • 每个场景必须至少有一个非文字的视觉主体元素(SVG插画、图表、动画图形等)。纯文字标签+方块不是合格的视觉内容
  • 流程图/因果链必须用图标或插画配合文字,不能只用纯色方块装文字。参考svg-components.md中的“插画式流程节点”模式
  • 每个场景应有环境氛围层(粒子、光晕、纹理等),参考style-guide.md中的环境效果章节
  • SVG插画应体现Kurzgesagt风格:圆角几何形状(rx/ry)、扁平化但有层次(多path叠加)、柔和渐变(linearGradient/radialGradient)、适当描边
  • 参考visual-principles.md中的“可视化表达,而非文字说明”原则:能用图示表达的概念不要用文字方块
  • 具象插画的最低质量标准请参考scene-template.tsx中的ForceDiagramScene的SVG飞机插画
颜色规则(对第五阶段风格扫描合规性至关重要):
  • 所有颜色必须通过
    constants.ts
    COLORS
    对象引用(例如
    COLORS.accent.rose
    )——切勿在TSX文件中直接写入十六进制值
  • 唯一例外是
    rgba()
    用于调整透明度(例如
    rgba(0, 0, 0, 0.7)
    用于字幕背景)
  • 这可以避免风格扫描报告大量“颜色不在批准调色板中”的警告
完整的constants.ts结构(COLORS、SCENES、NARRATION、AUDIO_SEGMENTS、字体加载)请参考design-tokens.ts第三部分。 组件模式请参考svg-components.md。 时长与缓动效果请参考animation-guide.md

Phase 4.5: Audio Generation

4.5阶段:音频生成

⚠️ Checkpoint Rule active: After completing EACH checkbox item for this phase, immediately update
PROGRESS.md
. Do not batch updates.
完成动画编码后,生成视频音频并同步时间线:
  1. 生成 TTS 音频 — 用
    generate-tts.ts
    从 NARRATION 提取文本生成 mp3
  2. 重建时间线 — 用
    rebuild-timeline.ts --write
    根据实际音频时长更新 constants.ts
  3. 调整动画关键帧 — 按
    newDuration / oldDuration
    比例缩放
  4. 添加背景音乐 — 免版税 BGM 到
    public/audio/bgm.mp3
  5. 创建 AudioLayer — 播放旁白 + BGM 的组件
  6. 集成并验证 — AudioLayer 必须在 TransitionSeries 外部
详细步骤、命令参数、AudioLayer 模板见 audio-guide.md
⚠️ 检查点规则生效:完成本阶段的每个勾选框项后,立即更新
PROGRESS.md
。请勿批量更新。
完成动画编码后,生成视频音频并同步时间线:
  1. 生成TTS音频——使用
    generate-tts.ts
    从NARRATION中提取文本生成mp3
  2. 重建时间线——使用
    rebuild-timeline.ts --write
    根据实际音频时长更新constants.ts
  3. 调整动画关键帧——按
    newDuration / oldDuration
    比例缩放
  4. 添加背景音乐——将免版税BGM添加到
    public/audio/bgm.mp3
  5. 创建AudioLayer——播放旁白+背景音乐的组件
  6. 集成并验证——AudioLayer必须在TransitionSeries外部
详细步骤、命令参数、AudioLayer模板请参考audio-guide.md

Phase 5: Quality Assurance

第五阶段:质量保证

⚠️ Checkpoint Rule active: After completing EACH checkbox item for this phase, immediately update
PROGRESS.md
. Do not batch updates.
完成编码后,执行自动质量检查流程:
  1. 代码扫描 → 检查样式合规性(字号、颜色、安全区域等)
  2. 截图审查 → 渲染关键帧,视觉检查
  3. 自动修复 → 根据检查报告修复问题,循环直到通过
  4. 启动项目 → 所有检查通过后,自动启动 Remotion 预览
详细检查步骤和规则见 quality-checklist.md
⚠️ 检查点规则生效:完成本阶段的每个勾选框项后,立即更新
PROGRESS.md
。请勿批量更新。
完成编码后,执行自动质量检查流程:
  1. 代码扫描→检查样式合规性(字号、颜色、安全区等)
  2. 截图审查→渲染关键帧,进行视觉检查
  3. 自动修复→根据检查报告修复问题,循环直到通过
  4. 启动项目→所有检查通过后,自动启动Remotion预览
详细检查步骤和规则请参考quality-checklist.md

Phase 6: Final Export

第六阶段:最终导出

After preview looks correct, render the final video:
bash
cd remotion_video
npx remotion render src/index.ts <CompositionName> out/video.mp4
Options:
  • --codec h264
    (default) or
    --codec h265
    for smaller file size
  • --quality 80
    to
    100
    (default: 80)
  • --scale 1
    (1080p) — use
    --scale 2
    for 4K if source assets support it
  • Add
    --log verbose
    if debugging render issues
The output file will be at
remotion_video/out/video.mp4
.
预览确认无误后,渲染最终视频:
bash
cd remotion_video
npx remotion render src/index.ts <CompositionName> out/video.mp4
选项:
  • --codec h264
    (默认)或
    --codec h265
    以获得更小的文件体积
  • --quality 80
    100
    (默认值:80)
  • --scale 1
    (1080p)——如果源资源支持,使用
    --scale 2
    导出4K视频
  • 调试渲染问题时添加
    --log verbose
输出文件将位于
remotion_video/out/video.mp4

Video Structure

视频结构

Standard educational video structure:
1. Hook (5-10s)      - Attention-grabbing question or statement
2. Intro (10-20s)    - Topic introduction
3. Content (main)    - Core explanation, broken into segments
4. Summary (10-20s)  - Key takeaways
5. Outro (5-10s)     - Call to action or closing
See script-and-narration.md Part 1 for detailed structure templates.
标准教育类视频结构:
1. 钩子(5-10秒)      - 吸引注意力的问题或陈述
2. 介绍(10-20秒)    - 主题介绍
3. 内容(主体)    - 核心讲解,拆分为多个片段
4. 总结(10-20秒)  - 核心要点回顾
5. 结尾(5-10秒)     - 行动号召或结束语
详细结构模板请参考script-and-narration.md第一部分。

Key Principles

核心原则

Content Clarity

内容清晰

  • One concept per scene
  • Build complexity gradually
  • Use visual metaphors for abstract ideas
  • 每个场景一个概念
  • 逐步构建复杂度
  • 用视觉隐喻表达抽象概念

Visual Simplicity

视觉简洁

  • Minimal elements on screen
  • Clear visual hierarchy
  • Consistent style throughout
  • 屏幕上元素最小化
  • 清晰的视觉层级
  • 全程风格一致

Animation Purpose

动画目的性

  • Every animation serves understanding
  • Avoid decorative motion
  • Sync with narration pace
  • 每个动画都服务于理解
  • 避免装饰性运动
  • 与旁白节奏同步

Reference Files

参考文件

FileWhen to Use
requirements-guide.mdStarting a new video project (Phase 1)
script-and-narration.mdVideo structure, script writing, narration, subtitle/TTS (Phase 1.5 + 2)
storyboard-template.mdConverting script into visual scenes (Phase 2)
style-guide.mdDesigning visual elements (Phase 3 + 4)
visual-principles.mdLayout and composition decisions (Phase 3 + 4)
animation-guide.mdImplementing animations (Phase 4)
svg-components.mdCreating reusable components (Phase 4)
audio-guide.mdTTS 生成、时间线重建、AudioLayer 集成详细步骤 (Phase 4.5)
quality-checklist.mdQuality assurance + style check rules (Phase 5)
design-tokens.tsColor palettes, typography presets, constants.ts template (Phase 3)
progress-template.md执行进度跟踪模板 (全流程)
scene-template.tsx场景组件模板 (Phase 4)
subtitle-sequence-template.tsx字幕序列组件模板 (Phase 4)
common-icons.tsx通用 SVG 图标组件 (Phase 4)
generate-tts.ts字幕提取 + TTS 音频生成脚本 (Phase 4.5)
rebuild-timeline.ts音频时长测量 + 时间线重建脚本 (Phase 4.5)
style-scan.ts代码样式扫描脚本 (Phase 5)
render-keyframes.ts关键帧批量截图脚本 (Phase 5)
shared.ts脚本共享函数(内部依赖,无需直接调用)
文件使用场景
requirements-guide.md启动新视频项目(第一阶段)
script-and-narration.md视频结构、脚本编写、旁白、字幕/TTS(1.5 + 2阶段)
storyboard-template.md将脚本转换为视觉场景(第二阶段)
style-guide.md设计视觉元素(3 + 4阶段)
visual-principles.md布局与构图决策(3 + 4阶段)
animation-guide.md实现动画(第四阶段)
svg-components.md创建可复用组件(第四阶段)
audio-guide.mdTTS生成、时间线重建、AudioLayer集成详细步骤(4.5阶段)
quality-checklist.md质量保证+风格检查规则(第五阶段)
design-tokens.ts调色板、排版预设、constants.ts模板(第三阶段)
progress-template.md执行进度跟踪模板(全流程)
scene-template.tsx场景组件模板(第四阶段)
subtitle-sequence-template.tsx字幕序列组件模板(第四阶段)
common-icons.tsx通用SVG图标组件(第四阶段)
generate-tts.ts字幕提取+TTS音频生成脚本(4.5阶段)
rebuild-timeline.ts音频时长测量+时间线重建脚本(4.5阶段)
style-scan.ts代码样式扫描脚本(第五阶段)
render-keyframes.ts关键帧批量截图脚本(第五阶段)
shared.ts脚本共享函数(内部依赖,无需直接调用)