# liyupi/ai-promo-video-maker architecture

> Architecture diagram of the GitHub repository liyupi/ai-promo-video-maker, generated by GitDiagram from its file tree, README and a sample of source files (last updated 2026-10-10). It is an AI-made overview: check details against the source.

- Interactive diagram: https://gitdiagram.com/liyupi/ai-promo-video-maker
- Repository: https://github.com/liyupi/ai-promo-video-maker

## Overview

这是一个由 AI 编程助手执行的产品宣传片制作工作流，配有 Remotion 工程模板和辅助脚本；不是独立的视频编辑器。用户提出需求后，AI 调研产品并询问确认风格与规格，再制作素材、截图、配乐和旁白，编排场景，校验后渲染交付；意见反馈可触发必要环节的返工。图中保留了 README 记录的主要制作与交付能力。核心渲染和网页播放关系有源码依据；调研、制作和校验阶段的连接依据 README，未采样的实现不作推断。

Main entry points: [`AGENTS.md`](https://github.com/liyupi/ai-promo-video-maker/blob/main/AGENTS.md) (AI 助手), [`template/src/Promo.tsx`](https://github.com/liyupi/ai-promo-video-maker/blob/main/template/src/Promo.tsx) (宣传片合成), [`template/web/App.tsx`](https://github.com/liyupi/ai-promo-video-maker/blob/main/template/web/App.tsx) (网页播放页), [`template/src/scenes/Example.tsx`](https://github.com/liyupi/ai-promo-video-maker/blob/main/template/src/scenes/Example.tsx) (场景画面)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_workflow["AI 制作流程"]
  node_agent["AI 助手<br/>[AGENTS.md]"]
  node_research["产品调研"]
  node_brief["需求与风格确认<br/>[需求问询.md]"]
end

subgraph group_assets["素材与音频"]
  node_capture["网页截图<br/>[snapshot.py]"]
  node_image["图片素材处理<br/>[images.py]"]
  node_music["配乐与卡点<br/>[音乐与卡点.md]"]
  node_voice["配音与转写<br/>[elevenlabs.py]"]
  node_mix["音频混音<br/>[mix.py]"]
  node_audiolib["音频处理库<br/>[audiolib.py]"]
end

subgraph group_video["视频编排"]
  node_promo["宣传片合成<br/>[Promo.tsx]"]
  node_scene["场景画面<br/>[Example.tsx]"]
  node_timing["时间与动画<br/>[anim.ts]"]
  node_theme["主题与字体<br/>[theme.ts]"]
  node_browserframe["网页截图画框<br/>[BrowserFrame.tsx]"]
  node_root["渲染组合注册<br/>[Root.tsx]"]
  node_assetslist["素材清单<br/>[assets.ts]"]
end

subgraph group_quality["校验与交付"]
  node_assetcheck["素材校验<br/>[check_assets.py]"]
  node_videocheck["成片校验<br/>[check_video.py]"]
  node_render["4K 渲染交付"]
end

subgraph group_player["网页播放"]
  node_webapp["网页播放页<br/>[App.tsx]"]
  node_webconfig["品牌播放配置<br/>[config.ts]"]
end

node_user(("产品作者"))
node_elevenlabs["ElevenLabs"]

node_user -->|"提出需求"| node_agent
node_agent -->|"调研产品"| node_research
node_agent -->|"询问确认"| node_brief
node_user -->|"确认需求"| node_brief
node_agent -->|"获取截图"| node_capture
node_agent -->|"处理素材"| node_image
node_agent -->|"安排配乐"| node_music
node_agent -->|"生成旁白"| node_voice
node_voice -->|"调用 API"| node_elevenlabs
node_mix -->|"调用处理"| node_audiolib
node_agent -->|"混合音轨"| node_mix
node_agent -->|"制作场景"| node_promo
node_root -->|"注册合成"| node_promo
node_promo -->|"渲染场景"| node_scene
node_promo -->|"读取动画"| node_timing
node_promo -->|"读取主题"| node_theme
node_scene -->|"读取动画"| node_timing
node_scene -->|"读取样式"| node_theme
node_agent -->|"检查素材"| node_assetcheck
node_agent -->|"审查成片"| node_videocheck
node_agent -->|"渲染交付"| node_render
node_webapp -->|"播放合成"| node_promo
node_webapp -->|"预取素材"| node_assetslist
node_webapp -->|"读取配置"| node_webconfig

click node_agent "https://github.com/liyupi/ai-promo-video-maker/blob/main/AGENTS.md"
click node_research "https://github.com/liyupi/ai-promo-video-maker/tree/main/references"
click node_brief "https://github.com/liyupi/ai-promo-video-maker/blob/main/references/%E9%9C%80%E6%B1%82%E9%97%AE%E8%AF%A2.md"
click node_capture "https://github.com/liyupi/ai-promo-video-maker/blob/main/template/scripts/snapshot.py"
click node_image "https://github.com/liyupi/ai-promo-video-maker/blob/main/template/scripts/images.py"
click node_music "https://github.com/liyupi/ai-promo-video-maker/blob/main/references/%E9%9F%B3%E4%B9%90%E4%B8%8E%E5%8D%A1%E7%82%B9.md"
click node_voice "https://github.com/liyupi/ai-promo-video-maker/blob/main/template/scripts/elevenlabs.py"
click node_mix "https://github.com/liyupi/ai-promo-video-maker/blob/main/template/scripts/mix.py"
click node_audiolib "https://github.com/liyupi/ai-promo-video-maker/blob/main/template/scripts/audiolib.py"
click node_promo "https://github.com/liyupi/ai-promo-video-maker/blob/main/template/src/Promo.tsx"
click node_scene "https://github.com/liyupi/ai-promo-video-maker/blob/main/template/src/scenes/Example.tsx"
click node_timing "https://github.com/liyupi/ai-promo-video-maker/blob/main/template/src/lib/anim.ts"
click node_theme "https://github.com/liyupi/ai-promo-video-maker/blob/main/template/src/lib/theme.ts"
click node_browserframe "https://github.com/liyupi/ai-promo-video-maker/blob/main/template/src/components/BrowserFrame.tsx"
click node_root "https://github.com/liyupi/ai-promo-video-maker/blob/main/template/src/Root.tsx"
click node_assetslist "https://github.com/liyupi/ai-promo-video-maker/blob/main/template/src/assets.ts"
click node_assetcheck "https://github.com/liyupi/ai-promo-video-maker/blob/main/template/scripts/check_assets.py"
click node_videocheck "https://github.com/liyupi/ai-promo-video-maker/blob/main/template/scripts/check_video.py"
click node_render "https://github.com/liyupi/ai-promo-video-maker/tree/main/template"
click node_webapp "https://github.com/liyupi/ai-promo-video-maker/blob/main/template/web/App.tsx"
click node_webconfig "https://github.com/liyupi/ai-promo-video-maker/blob/main/template/web/config.ts"

classDef toneNeutral fill:#f8fafc,stroke:#334155,stroke-width:1.5px,color:#0f172a
classDef toneBlue fill:#dbeafe,stroke:#2563eb,stroke-width:1.5px,color:#172554
classDef toneAmber fill:#fef3c7,stroke:#d97706,stroke-width:1.5px,color:#78350f
classDef toneMint fill:#dcfce7,stroke:#16a34a,stroke-width:1.5px,color:#14532d
classDef toneRose fill:#ffe4e6,stroke:#e11d48,stroke-width:1.5px,color:#881337
classDef toneIndigo fill:#e0e7ff,stroke:#4f46e5,stroke-width:1.5px,color:#312e81
classDef toneTeal fill:#ccfbf1,stroke:#0f766e,stroke-width:1.5px,color:#134e4a
class node_agent,node_research,node_brief toneBlue
class node_capture,node_image,node_music,node_voice,node_mix,node_audiolib toneAmber
class node_promo,node_scene,node_timing,node_theme,node_browserframe,node_root,node_assetslist toneMint
class node_assetcheck,node_videocheck,node_render toneRose
class node_webapp,node_webconfig,node_user,node_elevenlabs toneIndigo
```

## Components

### AI 制作流程

- [AI 助手](https://github.com/liyupi/ai-promo-video-maker/blob/main/AGENTS.md): `AGENTS.md`
- [产品调研](https://github.com/liyupi/ai-promo-video-maker/tree/main/references): `references`
- [需求与风格确认](https://github.com/liyupi/ai-promo-video-maker/blob/main/references/%E9%9C%80%E6%B1%82%E9%97%AE%E8%AF%A2.md): `references/需求问询.md`

### 素材与音频

- [网页截图](https://github.com/liyupi/ai-promo-video-maker/blob/main/template/scripts/snapshot.py): `template/scripts/snapshot.py`
- [图片素材处理](https://github.com/liyupi/ai-promo-video-maker/blob/main/template/scripts/images.py): `template/scripts/images.py`
- [配乐与卡点](https://github.com/liyupi/ai-promo-video-maker/blob/main/references/%E9%9F%B3%E4%B9%90%E4%B8%8E%E5%8D%A1%E7%82%B9.md): `references/音乐与卡点.md`
- [配音与转写](https://github.com/liyupi/ai-promo-video-maker/blob/main/template/scripts/elevenlabs.py): `template/scripts/elevenlabs.py`
- [音频混音](https://github.com/liyupi/ai-promo-video-maker/blob/main/template/scripts/mix.py): `template/scripts/mix.py`
- [音频处理库](https://github.com/liyupi/ai-promo-video-maker/blob/main/template/scripts/audiolib.py): `template/scripts/audiolib.py`

### 视频编排

- [宣传片合成](https://github.com/liyupi/ai-promo-video-maker/blob/main/template/src/Promo.tsx): `template/src/Promo.tsx`
- [场景画面](https://github.com/liyupi/ai-promo-video-maker/blob/main/template/src/scenes/Example.tsx): `template/src/scenes/Example.tsx`
- [时间与动画](https://github.com/liyupi/ai-promo-video-maker/blob/main/template/src/lib/anim.ts): `template/src/lib/anim.ts`
- [主题与字体](https://github.com/liyupi/ai-promo-video-maker/blob/main/template/src/lib/theme.ts): `template/src/lib/theme.ts`
- [网页截图画框](https://github.com/liyupi/ai-promo-video-maker/blob/main/template/src/components/BrowserFrame.tsx): `template/src/components/BrowserFrame.tsx`
- [渲染组合注册](https://github.com/liyupi/ai-promo-video-maker/blob/main/template/src/Root.tsx): `template/src/Root.tsx`
- [素材清单](https://github.com/liyupi/ai-promo-video-maker/blob/main/template/src/assets.ts): `template/src/assets.ts`

### 校验与交付

- [素材校验](https://github.com/liyupi/ai-promo-video-maker/blob/main/template/scripts/check_assets.py): `template/scripts/check_assets.py`
- [成片校验](https://github.com/liyupi/ai-promo-video-maker/blob/main/template/scripts/check_video.py): `template/scripts/check_video.py`
- [4K 渲染交付](https://github.com/liyupi/ai-promo-video-maker/tree/main/template): `template`

### 网页播放

- [网页播放页](https://github.com/liyupi/ai-promo-video-maker/blob/main/template/web/App.tsx): `template/web/App.tsx`
- [品牌播放配置](https://github.com/liyupi/ai-promo-video-maker/blob/main/template/web/config.ts): `template/web/config.ts`

### Other components

- **产品作者**
- **ElevenLabs**

## Connections

- 产品作者 → AI 助手: 提出需求 (evidence: `README.md`)
- AI 助手 → 产品调研: 调研产品 (evidence: `README.md`)
- AI 助手 → 需求与风格确认: 询问确认 (evidence: `README.md`)
- 产品作者 → 需求与风格确认: 确认需求 (evidence: `README.md`)
- AI 助手 → 网页截图: 获取截图 (evidence: `README.md`)
- AI 助手 → 图片素材处理: 处理素材 (evidence: `README.md`)
- AI 助手 → 配乐与卡点: 安排配乐 (evidence: `README.md`)
- AI 助手 → 配音与转写: 生成旁白 (evidence: `README.md`)
- 配音与转写 → ElevenLabs: 调用 API (evidence: `template/scripts/elevenlabs.py`)
- 音频混音 → 音频处理库: 调用处理 (evidence: `template/scripts/mix.py`)
- AI 助手 → 音频混音: 混合音轨 (evidence: `README.md`)
- AI 助手 → 宣传片合成: 制作场景 (evidence: `README.md`)
- 渲染组合注册 → 宣传片合成: 注册合成 (evidence: `template/src/Root.tsx`)
- 宣传片合成 → 场景画面: 渲染场景 (evidence: `template/src/Promo.tsx`)
- 宣传片合成 → 时间与动画: 读取动画 (evidence: `template/src/Promo.tsx`)
- 宣传片合成 → 主题与字体: 读取主题 (evidence: `template/src/Promo.tsx`)
- 场景画面 → 时间与动画: 读取动画 (evidence: `template/src/scenes/Example.tsx`)
- 场景画面 → 主题与字体: 读取样式 (evidence: `template/src/scenes/Example.tsx`)
- AI 助手 → 素材校验: 检查素材 (evidence: `README.md`)
- AI 助手 → 成片校验: 审查成片 (evidence: `README.md`)
- AI 助手 → 4K 渲染交付: 渲染交付 (evidence: `README.md`)
- 网页播放页 → 宣传片合成: 播放合成 (evidence: `template/web/App.tsx`)
- 网页播放页 → 素材清单: 预取素材 (evidence: `template/web/App.tsx`)
- 网页播放页 → 品牌播放配置: 读取配置 (evidence: `template/web/App.tsx`)
