bobo-ai-cli 1.0.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/LICENSE +21 -0
- package/README.md +216 -0
- package/dist/agent.d.ts +9 -0
- package/dist/agent.js +144 -0
- package/dist/agent.js.map +1 -0
- package/dist/config.d.ts +15 -0
- package/dist/config.js +76 -0
- package/dist/config.js.map +1 -0
- package/dist/index.d.ts +2 -0
- package/dist/index.js +366 -0
- package/dist/index.js.map +1 -0
- package/dist/knowledge-commands.d.ts +2 -0
- package/dist/knowledge-commands.js +40 -0
- package/dist/knowledge-commands.js.map +1 -0
- package/dist/knowledge.d.ts +17 -0
- package/dist/knowledge.js +112 -0
- package/dist/knowledge.js.map +1 -0
- package/dist/memory.d.ts +17 -0
- package/dist/memory.js +215 -0
- package/dist/memory.js.map +1 -0
- package/dist/planner.d.ts +22 -0
- package/dist/planner.js +130 -0
- package/dist/planner.js.map +1 -0
- package/dist/project.d.ts +25 -0
- package/dist/project.js +117 -0
- package/dist/project.js.map +1 -0
- package/dist/rules-commands.d.ts +2 -0
- package/dist/rules-commands.js +51 -0
- package/dist/rules-commands.js.map +1 -0
- package/dist/skills.d.ts +28 -0
- package/dist/skills.js +349 -0
- package/dist/skills.js.map +1 -0
- package/dist/structured/loader.d.ts +19 -0
- package/dist/structured/loader.js +147 -0
- package/dist/structured/loader.js.map +1 -0
- package/dist/structured/paths.d.ts +2 -0
- package/dist/structured/paths.js +14 -0
- package/dist/structured/paths.js.map +1 -0
- package/dist/structured/project-scaffold.d.ts +7 -0
- package/dist/structured/project-scaffold.js +60 -0
- package/dist/structured/project-scaffold.js.map +1 -0
- package/dist/structured/render-markdown.d.ts +37 -0
- package/dist/structured/render-markdown.js +47 -0
- package/dist/structured/render-markdown.js.map +1 -0
- package/dist/structured/render-table.d.ts +1 -0
- package/dist/structured/render-table.js +15 -0
- package/dist/structured/render-table.js.map +1 -0
- package/dist/structured/search.d.ts +10 -0
- package/dist/structured/search.js +104 -0
- package/dist/structured/search.js.map +1 -0
- package/dist/structured/skill-runner.d.ts +15 -0
- package/dist/structured/skill-runner.js +60 -0
- package/dist/structured/skill-runner.js.map +1 -0
- package/dist/structured/types.d.ts +212 -0
- package/dist/structured/types.js +97 -0
- package/dist/structured/types.js.map +1 -0
- package/dist/structured-skills-commands.d.ts +3 -0
- package/dist/structured-skills-commands.js +126 -0
- package/dist/structured-skills-commands.js.map +1 -0
- package/dist/structured-template-commands.d.ts +2 -0
- package/dist/structured-template-commands.js +34 -0
- package/dist/structured-template-commands.js.map +1 -0
- package/dist/tools/index.d.ts +3 -0
- package/dist/tools/index.js +450 -0
- package/dist/tools/index.js.map +1 -0
- package/dist/ui.d.ts +19 -0
- package/dist/ui.js +72 -0
- package/dist/ui.js.map +1 -0
- package/dist/web.d.ts +4 -0
- package/dist/web.js +124 -0
- package/dist/web.js.map +1 -0
- package/knowledge/advanced-patterns.md +70 -0
- package/knowledge/agent-directives.md +74 -0
- package/knowledge/dream.md +36 -0
- package/knowledge/engineering.md +46 -0
- package/knowledge/error-catalog.md +33 -0
- package/knowledge/index.json +170 -0
- package/knowledge/memory/cache-optimization-and-skill-integration.md +102 -0
- package/knowledge/memory/engineering-patterns.md +134 -0
- package/knowledge/memory/feedback_root_structure.md +16 -0
- package/knowledge/memory/project-contexts.md +69 -0
- package/knowledge/memory/tools-and-services.md +85 -0
- package/knowledge/rules/agents.md +62 -0
- package/knowledge/rules/blocking-rules.md +323 -0
- package/knowledge/rules/cache-management.md +379 -0
- package/knowledge/rules/capability-evolution.md +132 -0
- package/knowledge/rules/coding.md +126 -0
- package/knowledge/rules/engineering-workflows.md +225 -0
- package/knowledge/rules/evomap-content-guidelines.md +354 -0
- package/knowledge/rules/evomap-guide.md +224 -0
- package/knowledge/rules/git.md +31 -0
- package/knowledge/rules/hooks.md +106 -0
- package/knowledge/rules/performance.md +101 -0
- package/knowledge/rules/remotion-auto-production.md +1120 -0
- package/knowledge/rules/security.md +46 -0
- package/knowledge/rules/testing.md +32 -0
- package/knowledge/rules/work-mode.md +208 -0
- package/knowledge/rules.md +62 -0
- package/knowledge/skills/Skill_Seekers.md +1722 -0
- package/knowledge/skills/ab-test-setup.md +557 -0
- package/knowledge/skills/agent-sdk-dev.md +238 -0
- package/knowledge/skills/agent-tools.md +136 -0
- package/knowledge/skills/analytics-tracking.md +597 -0
- package/knowledge/skills/artifacts-builder.md +89 -0
- package/knowledge/skills/asana.md +13 -0
- package/knowledge/skills/backend-expert.md +97 -0
- package/knowledge/skills/brand-voice.md +481 -0
- package/knowledge/skills/browser-use.md +419 -0
- package/knowledge/skills/cache-optimization-skill.md +179 -0
- package/knowledge/skills/canvas-design.md +147 -0
- package/knowledge/skills/citation-validator.md +203 -0
- package/knowledge/skills/clangd-lsp.md +52 -0
- package/knowledge/skills/code-review-expert.md +85 -0
- package/knowledge/skills/code-review.md +280 -0
- package/knowledge/skills/code-simplifier.md +13 -0
- package/knowledge/skills/commit-commands.md +258 -0
- package/knowledge/skills/competitor-alternatives.md +795 -0
- package/knowledge/skills/content-atomizer.md +910 -0
- package/knowledge/skills/content-research-writer.md +605 -0
- package/knowledge/skills/context-optimization-suite.md +162 -0
- package/knowledge/skills/context7.md +13 -0
- package/knowledge/skills/copy-editing.md +494 -0
- package/knowledge/skills/copywriting.md +510 -0
- package/knowledge/skills/csharp-lsp.md +40 -0
- package/knowledge/skills/decision-making-framework.md +154 -0
- package/knowledge/skills/developer-growth-analysis.md +335 -0
- package/knowledge/skills/direct-response-copy.md +2336 -0
- package/knowledge/skills/docker-expert.md +229 -0
- package/knowledge/skills/document-skills.md +13 -0
- package/knowledge/skills/documentation-expert.md +126 -0
- package/knowledge/skills/email-sequence.md +1061 -0
- package/knowledge/skills/email-sequences.md +910 -0
- package/knowledge/skills/example-plugin.md +72 -0
- package/knowledge/skills/explanatory-output-style.md +82 -0
- package/knowledge/skills/feature-dev.md +458 -0
- package/knowledge/skills/file-organizer.md +466 -0
- package/knowledge/skills/firebase.disabled.md +13 -0
- package/knowledge/skills/form-cro.md +488 -0
- package/knowledge/skills/free-tool-strategy.md +636 -0
- package/knowledge/skills/frontend-design-offical.md +55 -0
- package/knowledge/skills/frontend-design.md +41 -0
- package/knowledge/skills/frontend-expert.md +93 -0
- package/knowledge/skills/github.md +13 -0
- package/knowledge/skills/gitlab.md +13 -0
- package/knowledge/skills/gopls-lsp.md +32 -0
- package/knowledge/skills/got-controller.md +218 -0
- package/knowledge/skills/greptile.md +72 -0
- package/knowledge/skills/hookify.md +376 -0
- package/knowledge/skills/image-editor.md +189 -0
- package/knowledge/skills/image-enhancer.md +109 -0
- package/knowledge/skills/jdtls-lsp.md +49 -0
- package/knowledge/skills/json-canvas.md +654 -0
- package/knowledge/skills/keyword-research.md +559 -0
- package/knowledge/skills/kotlin-lsp.md +28 -0
- package/knowledge/skills/laravel-boost.md +13 -0
- package/knowledge/skills/launch-strategy.md +394 -0
- package/knowledge/skills/lead-magnet.md +393 -0
- package/knowledge/skills/learning-output-style.md +106 -0
- package/knowledge/skills/linear.md +13 -0
- package/knowledge/skills/lua-lsp.md +47 -0
- package/knowledge/skills/marketing-ideas.md +720 -0
- package/knowledge/skills/marketing-psychology.md +534 -0
- package/knowledge/skills/mcp-builder.md +369 -0
- package/knowledge/skills/meeting-insights-analyzer.md +347 -0
- package/knowledge/skills/memory-evolution-system.md +172 -0
- package/knowledge/skills/multi-lens-thinking.md +407 -0
- package/knowledge/skills/nano-banana-pro.md +116 -0
- package/knowledge/skills/newsletter.md +736 -0
- package/knowledge/skills/notebooklm.md +296 -0
- package/knowledge/skills/obsidian-bases.md +634 -0
- package/knowledge/skills/obsidian-markdown.md +651 -0
- package/knowledge/skills/onboarding-cro.md +494 -0
- package/knowledge/skills/orchestrator.md +681 -0
- package/knowledge/skills/page-cro.md +379 -0
- package/knowledge/skills/paid-ads.md +624 -0
- package/knowledge/skills/paywall-upgrade-cro.md +651 -0
- package/knowledge/skills/php-lsp.md +36 -0
- package/knowledge/skills/planning-with-files.md +193 -0
- package/knowledge/skills/playwright.md +13 -0
- package/knowledge/skills/plugin-dev.md +434 -0
- package/knowledge/skills/popup-cro.md +520 -0
- package/knowledge/skills/positioning-angles.md +330 -0
- package/knowledge/skills/pr-review-toolkit.md +359 -0
- package/knowledge/skills/pricing-strategy.md +777 -0
- package/knowledge/skills/programmatic-seo.md +714 -0
- package/knowledge/skills/pyright-lsp.md +43 -0
- package/knowledge/skills/quality-assurance-framework.md +168 -0
- package/knowledge/skills/question-refiner.md +160 -0
- package/knowledge/skills/ralph-loop.md +205 -0
- package/knowledge/skills/refactoring-expert.md +103 -0
- package/knowledge/skills/referral-program.md +668 -0
- package/knowledge/skills/research-executor.md +164 -0
- package/knowledge/skills/review-with-security.md +12 -0
- package/knowledge/skills/rust-analyzer-lsp.md +50 -0
- package/knowledge/skills/schema-markup.md +647 -0
- package/knowledge/skills/security-audit-expert.md +124 -0
- package/knowledge/skills/security-expert.md +140 -0
- package/knowledge/skills/security-guidance.md +13 -0
- package/knowledge/skills/seedance-prompt.md +139 -0
- package/knowledge/skills/self-evolution.md +1160 -0
- package/knowledge/skills/seo-audit.md +432 -0
- package/knowledge/skills/seo-content.md +787 -0
- package/knowledge/skills/serena.md +13 -0
- package/knowledge/skills/signup-flow-cro.md +409 -0
- package/knowledge/skills/skill-creator.md +220 -0
- package/knowledge/skills/skill-manager.md +226 -0
- package/knowledge/skills/skill-share.md +98 -0
- package/knowledge/skills/slack.md +13 -0
- package/knowledge/skills/social-content.md +878 -0
- package/knowledge/skills/spec-flow-skill.md +124 -0
- package/knowledge/skills/stripe.md +13 -0
- package/knowledge/skills/supabase.md +13 -0
- package/knowledge/skills/swift-lsp.md +40 -0
- package/knowledge/skills/synthesizer.md +236 -0
- package/knowledge/skills/template-skill.md +16 -0
- package/knowledge/skills/testing-expert.md +99 -0
- package/knowledge/skills/theme-factory.md +72 -0
- package/knowledge/skills/tiktok-research.md +208 -0
- package/knowledge/skills/typescript-lsp.md +36 -0
- package/knowledge/skills/ui-ux-pro-max.md +247 -0
- package/knowledge/skills/verify.md +15 -0
- package/knowledge/skills/visual-prompt-engineer.md +102 -0
- package/knowledge/skills/webapp-testing.md +111 -0
- package/knowledge/skills/wide-research.md +191 -0
- package/knowledge/system.md +93 -0
- package/knowledge/task-router.md +37 -0
- package/knowledge/verification.md +38 -0
- package/knowledge/workflows/3d-viz.md +47 -0
- package/knowledge/workflows/data-pipeline.md +47 -0
- package/knowledge/workflows/db-migration.md +51 -0
- package/knowledge/workflows/feature-dev.md +41 -0
- package/knowledge/workflows/tdd-flow.md +52 -0
- package/knowledge/workflows/ui-verify.md +51 -0
- package/package.json +60 -0
|
@@ -0,0 +1,1120 @@
|
|
|
1
|
+
---
|
|
2
|
+
id: "remotion-auto-production"
|
|
3
|
+
title: "Remotion 自动化视频生产规则"
|
|
4
|
+
category: "root"
|
|
5
|
+
tags: ["remotion 自动化视频生产规则", "🎯 工作流程(自动执行)", "📋 自动决策矩阵", "🤖 自动生成流程", "🎨 设计决策规则", "📝 用户输入示例 → 自动处理", "✅ 执行清单(自动检查)", "🚫 用户不需要做的事", "✅ 用户只需要做的事", "🎯 最终输出(自动生成)"]
|
|
6
|
+
source: "E:/Bobo's Coding cache/.claude/rules/remotion-auto-production.md"
|
|
7
|
+
---
|
|
8
|
+
|
|
9
|
+
# Remotion 自动化视频生产规则
|
|
10
|
+
|
|
11
|
+
> **核心原则**: 用户只需描述需求,系统自动匹配风格、生成代码
|
|
12
|
+
|
|
13
|
+
---
|
|
14
|
+
|
|
15
|
+
## 🎯 工作流程(自动执行)
|
|
16
|
+
|
|
17
|
+
```
|
|
18
|
+
用户简单描述需求
|
|
19
|
+
↓
|
|
20
|
+
自动分析场景类型 → 自动匹配设计风格 → 自动填充技术参数 → 直接生成代码
|
|
21
|
+
↓
|
|
22
|
+
输出完整的 Remotion 项目(包含素材生成指令)
|
|
23
|
+
```
|
|
24
|
+
|
|
25
|
+
---
|
|
26
|
+
|
|
27
|
+
## 📋 自动决策矩阵
|
|
28
|
+
|
|
29
|
+
### 场景类型识别(关键词触发)
|
|
30
|
+
|
|
31
|
+
| 用户需求关键词 | 场景类型 | 自动选择的风格 |
|
|
32
|
+
| ----------------------------- | ---------- | ------------------------------- |
|
|
33
|
+
| "产品演示"、"SaaS"、"科技" | 产品演示 | Glassmorphism + Tech Innovation |
|
|
34
|
+
| "社交媒体"、"短视频"、"Reels" | 社交内容 | Synthwave / Cyberpunk |
|
|
35
|
+
| "教程"、"教学"、"如何" | 教育视频 | Clean Modern + Minimalist |
|
|
36
|
+
| "数据"、"报告"、"分析" | 数据可视化 | Business Pro + Charts |
|
|
37
|
+
| "品牌"、"故事"、"宣传" | 品牌视频 | Creative Vibrant / Claymorphism |
|
|
38
|
+
| "游戏"、"酷炫"、"电竞" | 游戏/电竞 | Cyberpunk + Neon |
|
|
39
|
+
| "复古"、"怀旧"、"80年代" | 复古风 | Synthwave + Memphis |
|
|
40
|
+
| "简洁"、"高端"、"极简" | 高端品牌 | Minimalist + Japanese Zen |
|
|
41
|
+
|
|
42
|
+
### 自动配色方案
|
|
43
|
+
|
|
44
|
+
| 风格 | 主色 | 辅助色 | 背景色 | 强调色 |
|
|
45
|
+
| -------------------- | ------- | ------- | ------- | ------- |
|
|
46
|
+
| **Tech Innovation** | #0066ff | #00ffff | #1e1e1e | #FFFFFF |
|
|
47
|
+
| **Synthwave** | #ff006e | #8338ec | #3a86ff | #FFFF00 |
|
|
48
|
+
| **Business Pro** | #1C2833 | #F39C12 | #F4F6F6 | #E74C3C |
|
|
49
|
+
| **Creative Vibrant** | #E76F51 | #2A9D8F | #264653 | #F4A261 |
|
|
50
|
+
| **Cyberpunk** | #00FFFF | #FF00FF | #0A0E27 | #FFFF00 |
|
|
51
|
+
| **Clean Modern** | #2C3E50 | #3498DB | #ECF0F1 | #E74C3C |
|
|
52
|
+
| **Minimalist** | #000000 | #FFFFFF | #F5F5F5 | #FF0000 |
|
|
53
|
+
| **Claymorphism** | #A8DADC | #F1FAEE | #457B9D | #E63946 |
|
|
54
|
+
|
|
55
|
+
### 自动技术栈选择
|
|
56
|
+
|
|
57
|
+
| 场景特征 | 自动启用的技术 |
|
|
58
|
+
| ------------------------------ | ---------------------------------- |
|
|
59
|
+
| 包含"3D"、"立体"、"旋转" | Three.js + React Three Fiber |
|
|
60
|
+
| 包含"粒子"、"特效"、"背景" | Processing Creative Skill |
|
|
61
|
+
| 包含"图表"、"数据"、"增长" | Chart animations + interpolate |
|
|
62
|
+
| 包含"字幕"、"文字"、"说明" | DisplayCaptions (TikTok风格) |
|
|
63
|
+
| 包含"音乐"、"节奏"、"节拍" | Audio visualization + useAudioData |
|
|
64
|
+
| 包含"卡通"、"可爱"、"动画" | Lottie animations |
|
|
65
|
+
| 包含"照片"、"图片"、"素材" | Nano Banana Pro 生成 |
|
|
66
|
+
| **包含"视频"、"动态"、"动画片段"** | **Seedance 2.0 视频生成** ⭐ (新增) |
|
|
67
|
+
| **包含"模板"、"现成"、"快速"** | **Remotion Templates Library** |
|
|
68
|
+
|
|
69
|
+
### 自动模板匹配(新增)
|
|
70
|
+
|
|
71
|
+
> 📚 **完整模板库**: [REMOTION_TEMPLATES_LIBRARY.md](../capabilities/REMOTION_TEMPLATES_LIBRARY.md)
|
|
72
|
+
|
|
73
|
+
当用户需求可以使用现成模板时,自动推荐最合适的模板:
|
|
74
|
+
|
|
75
|
+
| 用户需求关键词 | 推荐模板 | 模板特点 |
|
|
76
|
+
| -------------------------- | -------------------- | ------------------- |
|
|
77
|
+
| "标题"、"开场"、"动态文字" | animated-text | 字符逐个旋转入场 |
|
|
78
|
+
| "弹跳"、"卡片"、"商务" | bounce-text | 渐变卡片弹性入场 |
|
|
79
|
+
| "气泡"、"可爱"、"趣味" | bubble-pop-text | 圆形气泡依次弹出 |
|
|
80
|
+
| "列表"、"功能"、"特性" | animated-list | 列表项滑入+圆形图标 |
|
|
81
|
+
| "翻转"、"卡片"、"切换" | card-flip | 3D卡片360度翻转 |
|
|
82
|
+
| "悬浮"、"强调"、"霓虹" | floating-bubble-text | 浮动+霓虹边框 |
|
|
83
|
+
| "几何"、"科技背景" | geometric-patterns | 几何图形旋转 |
|
|
84
|
+
| "故障"、"赛博朋克" | glitch-text | RGB分离抖动 |
|
|
85
|
+
| "液态"、"波浪"、"流体" | liquid-wave | 流动的液态波浪 |
|
|
86
|
+
| "矩阵"、"黑客"、"科幻" | matrix-rain | 绿色/蓝色字符雨 |
|
|
87
|
+
| "爆炸"、"粒子"、"转场" | particle-explosion | 粒子旋转爆炸 |
|
|
88
|
+
| "脉冲"、"节奏"、"音乐" | pulsing-text | 逐字脉冲闪烁 |
|
|
89
|
+
| "滑动"、"简单"、"字幕" | slide-text | 从右滑入 |
|
|
90
|
+
| "声波"、"音频"、"可视化" | sound-wave | 律动的声波条 |
|
|
91
|
+
| "打字机"、"字幕"、"对话" | typewriter-subtitle | 打字机+闪烁光标 |
|
|
92
|
+
|
|
93
|
+
**模板组合建议**(自动推荐):
|
|
94
|
+
|
|
95
|
+
```typescript
|
|
96
|
+
// 产品介绍视频(30秒)
|
|
97
|
+
scenes = [
|
|
98
|
+
{ template: 'animated-text', duration: 5 }, // 标题
|
|
99
|
+
{ template: 'animated-list', duration: 15 }, // 功能列表
|
|
100
|
+
{ template: 'particle-explosion', duration: 3 }, // 转场
|
|
101
|
+
{ template: 'bounce-text', duration: 7 }, // CTA
|
|
102
|
+
];
|
|
103
|
+
|
|
104
|
+
// 音乐视频(60秒)
|
|
105
|
+
scenes = [
|
|
106
|
+
{ template: 'glitch-text', duration: 5 }, // 标题
|
|
107
|
+
{ template: 'sound-wave', duration: 45 }, // 声波可视化
|
|
108
|
+
{ template: 'pulsing-text', duration: 10 }, // 结尾
|
|
109
|
+
];
|
|
110
|
+
|
|
111
|
+
// 科技背景视频(持续循环)
|
|
112
|
+
layers = [
|
|
113
|
+
{ template: 'geometric-patterns', layer: 'background' },
|
|
114
|
+
{ template: 'matrix-rain', layer: 'overlay', opacity: 0.3 },
|
|
115
|
+
{ template: 'animated-text', layer: 'foreground' },
|
|
116
|
+
];
|
|
117
|
+
```
|
|
118
|
+
|
|
119
|
+
### 自动分辨率选择
|
|
120
|
+
|
|
121
|
+
| 用户提及 | 自动设置 |
|
|
122
|
+
| --------------------------- | --------------------- |
|
|
123
|
+
| "Instagram"、"竖屏"、"手机" | 1080x1920 (9:16) |
|
|
124
|
+
| "YouTube"、"横屏"、"电脑" | 1920x1080 (16:9) |
|
|
125
|
+
| "正方形"、"微信"、"朋友圈" | 1080x1080 (1:1) |
|
|
126
|
+
| "4K"、"高清" | 3840x2160 (16:9) |
|
|
127
|
+
| 未提及 | 1920x1080 (16:9) 默认 |
|
|
128
|
+
|
|
129
|
+
### 自动帧率选择
|
|
130
|
+
|
|
131
|
+
| 场景类型 | 自动设置帧率 |
|
|
132
|
+
| ------------------ | ------------ |
|
|
133
|
+
| 游戏/电竞/酷炫特效 | 60fps |
|
|
134
|
+
| 社交媒体/快节奏 | 30fps |
|
|
135
|
+
| 教育/数据报告 | 30fps |
|
|
136
|
+
| 品牌故事/电影感 | 24fps |
|
|
137
|
+
|
|
138
|
+
---
|
|
139
|
+
|
|
140
|
+
## 🤖 自动生成流程
|
|
141
|
+
|
|
142
|
+
### Step 1: 需求分析(自动)
|
|
143
|
+
|
|
144
|
+
```python
|
|
145
|
+
def analyze_user_request(request: str):
|
|
146
|
+
"""自动分析用户需求"""
|
|
147
|
+
|
|
148
|
+
# 提取关键信息
|
|
149
|
+
scene_type = extract_scene_type(request) # 产品演示/教育/数据等
|
|
150
|
+
duration = extract_duration(request) or 30 # 默认30秒
|
|
151
|
+
resolution = extract_resolution(request) or "1920x1080"
|
|
152
|
+
|
|
153
|
+
# 情感分析
|
|
154
|
+
mood = analyze_mood(request) # 科技感/温暖/专业/酷炫
|
|
155
|
+
|
|
156
|
+
# 自动匹配风格
|
|
157
|
+
design_style = match_design_style(scene_type, mood)
|
|
158
|
+
color_scheme = get_color_scheme(design_style)
|
|
159
|
+
|
|
160
|
+
# 自动选择技术栈
|
|
161
|
+
tech_stack = select_tech_stack(request)
|
|
162
|
+
|
|
163
|
+
return {
|
|
164
|
+
"scene_type": scene_type,
|
|
165
|
+
"duration": duration,
|
|
166
|
+
"resolution": resolution,
|
|
167
|
+
"design_style": design_style,
|
|
168
|
+
"color_scheme": color_scheme,
|
|
169
|
+
"tech_stack": tech_stack
|
|
170
|
+
}
|
|
171
|
+
```
|
|
172
|
+
|
|
173
|
+
### Step 2: 结构化 Prompt 生成(自动)
|
|
174
|
+
|
|
175
|
+
```python
|
|
176
|
+
def generate_structured_prompt(analysis):
|
|
177
|
+
"""根据分析结果自动生成完整的结构化 prompt"""
|
|
178
|
+
|
|
179
|
+
prompt = f"""
|
|
180
|
+
创建 Remotion 视频项目:
|
|
181
|
+
|
|
182
|
+
【基本信息】
|
|
183
|
+
- 标题:{analysis.title}
|
|
184
|
+
- 时长:{analysis.duration}秒
|
|
185
|
+
- 比例:{analysis.aspect_ratio}
|
|
186
|
+
- 用途:{analysis.purpose}
|
|
187
|
+
|
|
188
|
+
【设计风格】(自动匹配)
|
|
189
|
+
- 主风格:{analysis.design_style}
|
|
190
|
+
- 配色方案:
|
|
191
|
+
* 主色:{analysis.colors.primary}
|
|
192
|
+
* 辅助色:{analysis.colors.secondary}
|
|
193
|
+
* 背景色:{analysis.colors.background}
|
|
194
|
+
* 强调色:{analysis.colors.accent}
|
|
195
|
+
- 动画风格:{analysis.animation_style}
|
|
196
|
+
|
|
197
|
+
【场景分镜】(自动设计)
|
|
198
|
+
{auto_generate_scenes(analysis)}
|
|
199
|
+
|
|
200
|
+
【技术需求】(自动启用)
|
|
201
|
+
{auto_select_tech_features(analysis)}
|
|
202
|
+
|
|
203
|
+
【素材需求】(自动生成指令)
|
|
204
|
+
{auto_generate_asset_commands(analysis)}
|
|
205
|
+
|
|
206
|
+
【输出要求】
|
|
207
|
+
- 分辨率:{analysis.resolution}
|
|
208
|
+
- 帧率:{analysis.fps}fps
|
|
209
|
+
- 格式:MP4(高质量)
|
|
210
|
+
"""
|
|
211
|
+
|
|
212
|
+
return prompt
|
|
213
|
+
```
|
|
214
|
+
|
|
215
|
+
### Step 3: 代码生成(自动)
|
|
216
|
+
|
|
217
|
+
**优先级规则**:
|
|
218
|
+
|
|
219
|
+
1. **有现成模板** → 直接使用模板库(最快)
|
|
220
|
+
2. **需要自定义** → 基于模板修改(中等)
|
|
221
|
+
3. **特殊需求** → 从零生成代码(最慢)
|
|
222
|
+
|
|
223
|
+
**方案A:使用模板库**(推荐,速度快)
|
|
224
|
+
|
|
225
|
+
```typescript
|
|
226
|
+
// 1. 克隆模板库(仅首次)
|
|
227
|
+
git clone https://github.com/reactvideoeditor/remotion-templates.git
|
|
228
|
+
|
|
229
|
+
// 2. 复制需要的模板
|
|
230
|
+
cp remotion-templates/templates/animated-text.tsx ./src/components/
|
|
231
|
+
cp remotion-templates/templates/animated-list.tsx ./src/components/
|
|
232
|
+
|
|
233
|
+
// 3. 自定义内容
|
|
234
|
+
const text = "你的标题".split("");
|
|
235
|
+
const items = [
|
|
236
|
+
{ name: "你的功能1", color: "#3b82f6" },
|
|
237
|
+
{ name: "你的功能2", color: "#60a5fa" }
|
|
238
|
+
];
|
|
239
|
+
|
|
240
|
+
// 4. 集成到项目
|
|
241
|
+
<Composition
|
|
242
|
+
id="MyVideo"
|
|
243
|
+
component={CombinedScene}
|
|
244
|
+
durationInFrames={240}
|
|
245
|
+
fps={30}
|
|
246
|
+
width={1920}
|
|
247
|
+
height={1080}
|
|
248
|
+
/>
|
|
249
|
+
```
|
|
250
|
+
|
|
251
|
+
**方案B:从零生成**(特殊需求)
|
|
252
|
+
|
|
253
|
+
```
|
|
254
|
+
/my-video-project
|
|
255
|
+
/src
|
|
256
|
+
/components
|
|
257
|
+
Scene1.tsx # 自动生成
|
|
258
|
+
Scene2.tsx # 自动生成
|
|
259
|
+
Scene3.tsx # 自动生成
|
|
260
|
+
/templates # 新增:模板库
|
|
261
|
+
animated-text.tsx
|
|
262
|
+
animated-list.tsx
|
|
263
|
+
particle-explosion.tsx
|
|
264
|
+
/assets
|
|
265
|
+
# Nano Banana Pro 生成指令
|
|
266
|
+
/utils
|
|
267
|
+
animations.ts # 预设动画函数
|
|
268
|
+
Root.tsx # 主组件
|
|
269
|
+
index.ts # 注册组件
|
|
270
|
+
/public
|
|
271
|
+
# 静态资源
|
|
272
|
+
package.json
|
|
273
|
+
remotion.config.ts
|
|
274
|
+
```
|
|
275
|
+
|
|
276
|
+
**自动决策流程**:
|
|
277
|
+
|
|
278
|
+
```typescript
|
|
279
|
+
function select_generation_strategy(request: string) {
|
|
280
|
+
// 1. 检查是否有完全匹配的模板
|
|
281
|
+
const exact_match = find_exact_template(request);
|
|
282
|
+
if (exact_match) {
|
|
283
|
+
return {
|
|
284
|
+
strategy: 'use_template',
|
|
285
|
+
template: exact_match,
|
|
286
|
+
customization: extract_custom_params(request),
|
|
287
|
+
};
|
|
288
|
+
}
|
|
289
|
+
|
|
290
|
+
// 2. 检查是否可以组合现有模板
|
|
291
|
+
const combinable = find_combinable_templates(request);
|
|
292
|
+
if (combinable.length > 0) {
|
|
293
|
+
return {
|
|
294
|
+
strategy: 'combine_templates',
|
|
295
|
+
templates: combinable,
|
|
296
|
+
sequence: generate_sequence(combinable),
|
|
297
|
+
};
|
|
298
|
+
}
|
|
299
|
+
|
|
300
|
+
// 3. 检查是否可以基于模板修改
|
|
301
|
+
const similar = find_similar_template(request);
|
|
302
|
+
if (similar) {
|
|
303
|
+
return {
|
|
304
|
+
strategy: 'modify_template',
|
|
305
|
+
base_template: similar,
|
|
306
|
+
modifications: extract_modifications(request),
|
|
307
|
+
};
|
|
308
|
+
}
|
|
309
|
+
|
|
310
|
+
// 4. 从零生成
|
|
311
|
+
return {
|
|
312
|
+
strategy: 'generate_from_scratch',
|
|
313
|
+
design_spec: analyze_full_requirements(request),
|
|
314
|
+
};
|
|
315
|
+
}
|
|
316
|
+
```
|
|
317
|
+
|
|
318
|
+
---
|
|
319
|
+
|
|
320
|
+
## 🎨 设计决策规则
|
|
321
|
+
|
|
322
|
+
### 配色自动调整
|
|
323
|
+
|
|
324
|
+
```typescript
|
|
325
|
+
function auto_adjust_colors(scene_type: string, mood: string) {
|
|
326
|
+
// 科技感 → 冷色调(蓝/青/紫)
|
|
327
|
+
if (mood === 'tech' || scene_type === 'product') {
|
|
328
|
+
return {
|
|
329
|
+
primary: '#0066ff',
|
|
330
|
+
secondary: '#00ffff',
|
|
331
|
+
background: '#1e1e1e',
|
|
332
|
+
accent: '#FFFFFF',
|
|
333
|
+
};
|
|
334
|
+
}
|
|
335
|
+
|
|
336
|
+
// 温暖/友好 → 暖色调(橙/黄/粉)
|
|
337
|
+
if (mood === 'warm' || scene_type === 'brand_story') {
|
|
338
|
+
return {
|
|
339
|
+
primary: '#E76F51',
|
|
340
|
+
secondary: '#F4A261',
|
|
341
|
+
background: '#FFFBF7',
|
|
342
|
+
accent: '#2A9D8F',
|
|
343
|
+
};
|
|
344
|
+
}
|
|
345
|
+
|
|
346
|
+
// 专业/商务 → 中性色(灰/蓝/红强调)
|
|
347
|
+
if (mood === 'professional' || scene_type === 'data') {
|
|
348
|
+
return {
|
|
349
|
+
primary: '#2C3E50',
|
|
350
|
+
secondary: '#34495E',
|
|
351
|
+
background: '#ECF0F1',
|
|
352
|
+
accent: '#E74C3C',
|
|
353
|
+
};
|
|
354
|
+
}
|
|
355
|
+
|
|
356
|
+
// 酷炫/游戏 → 霓虹色(品红/青/黄)
|
|
357
|
+
if (mood === 'cool' || scene_type === 'gaming') {
|
|
358
|
+
return {
|
|
359
|
+
primary: '#00FFFF',
|
|
360
|
+
secondary: '#FF00FF',
|
|
361
|
+
background: '#0A0E27',
|
|
362
|
+
accent: '#FFFF00',
|
|
363
|
+
};
|
|
364
|
+
}
|
|
365
|
+
}
|
|
366
|
+
```
|
|
367
|
+
|
|
368
|
+
### 动画节奏自动匹配
|
|
369
|
+
|
|
370
|
+
```typescript
|
|
371
|
+
function auto_animation_timing(scene_type: string, duration: number) {
|
|
372
|
+
const scenes = Math.ceil(duration / 10); // 每10秒一个场景
|
|
373
|
+
|
|
374
|
+
// 产品演示:慢入场 + 中速展示 + 快速结尾
|
|
375
|
+
if (scene_type === 'product') {
|
|
376
|
+
return {
|
|
377
|
+
intro: duration * 0.15, // 15% 用于入场
|
|
378
|
+
main: duration * 0.7, // 70% 用于展示
|
|
379
|
+
outro: duration * 0.15, // 15% 用于结尾
|
|
380
|
+
transition: 15, // 15帧过渡
|
|
381
|
+
};
|
|
382
|
+
}
|
|
383
|
+
|
|
384
|
+
// 社交媒体:快节奏
|
|
385
|
+
if (scene_type === 'social') {
|
|
386
|
+
return {
|
|
387
|
+
intro: duration * 0.1, // 10% 快速入场
|
|
388
|
+
main: duration * 0.7, // 70% 核心内容
|
|
389
|
+
outro: duration * 0.2, // 20% 强化 CTA
|
|
390
|
+
transition: 10, // 10帧快速切换
|
|
391
|
+
};
|
|
392
|
+
}
|
|
393
|
+
|
|
394
|
+
// 教育:均匀节奏
|
|
395
|
+
if (scene_type === 'education') {
|
|
396
|
+
const step_duration = duration / scenes;
|
|
397
|
+
return {
|
|
398
|
+
intro: step_duration,
|
|
399
|
+
main: step_duration * (scenes - 2),
|
|
400
|
+
outro: step_duration,
|
|
401
|
+
transition: 20, // 20帧舒适切换
|
|
402
|
+
};
|
|
403
|
+
}
|
|
404
|
+
}
|
|
405
|
+
```
|
|
406
|
+
|
|
407
|
+
---
|
|
408
|
+
|
|
409
|
+
## 📝 用户输入示例 → 自动处理
|
|
410
|
+
|
|
411
|
+
### 示例 1:极简输入
|
|
412
|
+
|
|
413
|
+
**用户说**:
|
|
414
|
+
|
|
415
|
+
```
|
|
416
|
+
做一个30秒的产品介绍视频,我们的产品是 AI 写作工具
|
|
417
|
+
```
|
|
418
|
+
|
|
419
|
+
**自动处理**:
|
|
420
|
+
|
|
421
|
+
```typescript
|
|
422
|
+
// 自动分析
|
|
423
|
+
scene_type = 'product_demo';
|
|
424
|
+
mood = 'tech';
|
|
425
|
+
duration = 30;
|
|
426
|
+
product_name = 'AI 写作工具';
|
|
427
|
+
|
|
428
|
+
// 自动匹配
|
|
429
|
+
design_style = 'Glassmorphism + Tech Innovation';
|
|
430
|
+
colors = { primary: '#0066ff', secondary: '#00ffff', bg: '#1e1e1e' };
|
|
431
|
+
tech_stack = ['Tailwind', 'Spring animations', 'Particle background'];
|
|
432
|
+
|
|
433
|
+
// 自动生成场景
|
|
434
|
+
scenes = [
|
|
435
|
+
{ name: 'Scene1: Logo入场', duration: 5, animation: 'spring_scale' },
|
|
436
|
+
{ name: 'Scene2: 核心功能', duration: 15, animation: 'slide_in' },
|
|
437
|
+
{ name: 'Scene3: 数据展示', duration: 7, animation: 'number_count' },
|
|
438
|
+
{ name: 'Scene4: CTA', duration: 3, animation: 'pulse' },
|
|
439
|
+
];
|
|
440
|
+
|
|
441
|
+
// 自动生成素材指令
|
|
442
|
+
nano_banana_prompts = [
|
|
443
|
+
'AI writing tool dashboard UI, glassmorphism style, tech blue theme, 4K',
|
|
444
|
+
'Text generation animation visual, futuristic interface, neon accents, 4K',
|
|
445
|
+
'Writing assistant features showcase, clean modern design, 4K',
|
|
446
|
+
];
|
|
447
|
+
|
|
448
|
+
processing_background = 'Particle connections, tech style, blue cyan palette';
|
|
449
|
+
```
|
|
450
|
+
|
|
451
|
+
### 示例 2:带细节的输入
|
|
452
|
+
|
|
453
|
+
**用户说**:
|
|
454
|
+
|
|
455
|
+
```
|
|
456
|
+
创建一个60秒的季度数据报告视频,展示收入增长45%,用户从3万增长到5万,
|
|
457
|
+
要专业商务风格,重点突出增长趋势
|
|
458
|
+
```
|
|
459
|
+
|
|
460
|
+
**自动处理**:
|
|
461
|
+
|
|
462
|
+
```typescript
|
|
463
|
+
// 自动分析
|
|
464
|
+
scene_type = 'data_visualization';
|
|
465
|
+
mood = 'professional';
|
|
466
|
+
duration = 60;
|
|
467
|
+
key_metrics = {
|
|
468
|
+
revenue_growth: '45%',
|
|
469
|
+
user_growth: '30k → 50k',
|
|
470
|
+
};
|
|
471
|
+
|
|
472
|
+
// 自动匹配
|
|
473
|
+
design_style = 'Business Pro + Data Driven';
|
|
474
|
+
colors = { primary: '#2C3E50', secondary: '#E74C3C', bg: '#ECF0F1' };
|
|
475
|
+
tech_stack = ['Charts', 'Number animations', 'Tailwind'];
|
|
476
|
+
|
|
477
|
+
// 自动生成场景
|
|
478
|
+
scenes = [
|
|
479
|
+
{
|
|
480
|
+
name: 'Scene1: 开场',
|
|
481
|
+
duration: 10,
|
|
482
|
+
content: '标题 + 3个关键指标数字递增动画',
|
|
483
|
+
animations: ['number_count_up', 'spring_bounce'],
|
|
484
|
+
},
|
|
485
|
+
{
|
|
486
|
+
name: 'Scene2: 收入图表',
|
|
487
|
+
duration: 15,
|
|
488
|
+
content: '柱状图展示12个月收入',
|
|
489
|
+
animations: ['bar_chart_rise', 'delay_sequence'],
|
|
490
|
+
},
|
|
491
|
+
{
|
|
492
|
+
name: 'Scene3: 用户增长',
|
|
493
|
+
duration: 15,
|
|
494
|
+
content: '折线图展示用户增长趋势',
|
|
495
|
+
animations: ['line_chart_draw', 'smooth_ease'],
|
|
496
|
+
},
|
|
497
|
+
{
|
|
498
|
+
name: 'Scene4: 增长率',
|
|
499
|
+
duration: 12,
|
|
500
|
+
content: '饼图展示增长来源',
|
|
501
|
+
animations: ['pie_chart_reveal', 'rotate'],
|
|
502
|
+
},
|
|
503
|
+
{
|
|
504
|
+
name: 'Scene5: 结论',
|
|
505
|
+
duration: 8,
|
|
506
|
+
content: '总结文字 + Logo',
|
|
507
|
+
animations: ['fade_in', 'text_slide'],
|
|
508
|
+
},
|
|
509
|
+
];
|
|
510
|
+
|
|
511
|
+
// 自动选择字体
|
|
512
|
+
fonts = ['Roboto Medium', 'Inter Regular'];
|
|
513
|
+
```
|
|
514
|
+
|
|
515
|
+
### 示例 3:风格导向的输入
|
|
516
|
+
|
|
517
|
+
**用户说**:
|
|
518
|
+
|
|
519
|
+
```
|
|
520
|
+
做一个15秒的 Instagram 视频,要那种酷炫的赛博朋克风格,
|
|
521
|
+
介绍我们的游戏工作室
|
|
522
|
+
```
|
|
523
|
+
|
|
524
|
+
**自动处理**:
|
|
525
|
+
|
|
526
|
+
```typescript
|
|
527
|
+
// 自动分析
|
|
528
|
+
scene_type = 'social_media';
|
|
529
|
+
mood = 'cool_cyberpunk';
|
|
530
|
+
duration = 15;
|
|
531
|
+
platform = 'Instagram';
|
|
532
|
+
aspect_ratio = '9:16';
|
|
533
|
+
|
|
534
|
+
// 自动匹配
|
|
535
|
+
design_style = 'Cyberpunk + Neon';
|
|
536
|
+
colors = {
|
|
537
|
+
primary: '#00FFFF',
|
|
538
|
+
secondary: '#FF00FF',
|
|
539
|
+
bg: '#0A0E27',
|
|
540
|
+
accent: '#FFFF00',
|
|
541
|
+
};
|
|
542
|
+
tech_stack = ['Three.js', 'Glitch effects', 'Neon borders', 'Processing'];
|
|
543
|
+
|
|
544
|
+
// 自动生成场景
|
|
545
|
+
scenes = [
|
|
546
|
+
{
|
|
547
|
+
name: 'Scene1: Logo爆炸入场',
|
|
548
|
+
duration: 3,
|
|
549
|
+
effects: ['neon_glow', 'glitch_distortion', 'particle_explosion'],
|
|
550
|
+
animations: ['scale_spring', 'rotation_3d'],
|
|
551
|
+
},
|
|
552
|
+
{
|
|
553
|
+
name: 'Scene2: 游戏画面快速切换',
|
|
554
|
+
duration: 8,
|
|
555
|
+
effects: ['scanline_overlay', 'chromatic_aberration'],
|
|
556
|
+
animations: ['rapid_crossfade', 'zoom_pulse'],
|
|
557
|
+
},
|
|
558
|
+
{
|
|
559
|
+
name: 'Scene3: CTA + 社交媒体信息',
|
|
560
|
+
duration: 4,
|
|
561
|
+
effects: ['neon_text', 'hologram_flicker'],
|
|
562
|
+
animations: ['text_glitch_in', 'button_pulse'],
|
|
563
|
+
},
|
|
564
|
+
];
|
|
565
|
+
|
|
566
|
+
// Processing 背景
|
|
567
|
+
processing_effect = 'Neon grid + Matrix rain effect';
|
|
568
|
+
|
|
569
|
+
// 音频自动选择
|
|
570
|
+
audio_style = 'Synthwave electronic (high energy, 140 BPM)';
|
|
571
|
+
```
|
|
572
|
+
|
|
573
|
+
---
|
|
574
|
+
|
|
575
|
+
## ✅ 执行清单(自动检查)
|
|
576
|
+
|
|
577
|
+
每次生成代码前,自动检查:
|
|
578
|
+
|
|
579
|
+
```typescript
|
|
580
|
+
const auto_checklist = {
|
|
581
|
+
design: {
|
|
582
|
+
✓ colors_matched_to_mood: true,
|
|
583
|
+
✓ style_consistent: true,
|
|
584
|
+
✓ accessibility_contrast: true
|
|
585
|
+
},
|
|
586
|
+
technical: {
|
|
587
|
+
✓ resolution_appropriate: true,
|
|
588
|
+
✓ fps_optimized: true,
|
|
589
|
+
✓ tech_stack_complete: true
|
|
590
|
+
},
|
|
591
|
+
performance: {
|
|
592
|
+
✓ assets_preloaded: true,
|
|
593
|
+
✓ animations_optimized: true,
|
|
594
|
+
✓ render_time_estimated: true
|
|
595
|
+
},
|
|
596
|
+
output: {
|
|
597
|
+
✓ complete_project_structure: true,
|
|
598
|
+
✓ asset_generation_commands: true,
|
|
599
|
+
✓ render_instructions: true
|
|
600
|
+
}
|
|
601
|
+
};
|
|
602
|
+
```
|
|
603
|
+
|
|
604
|
+
---
|
|
605
|
+
|
|
606
|
+
## 🚫 用户不需要做的事
|
|
607
|
+
|
|
608
|
+
❌ 手动填写复杂的模板
|
|
609
|
+
❌ 选择设计风格(除非有特殊要求)
|
|
610
|
+
❌ 决定技术栈
|
|
611
|
+
❌ 计算场景时长分配
|
|
612
|
+
❌ 写配色代码
|
|
613
|
+
❌ 选择字体
|
|
614
|
+
❌ 决定动画类型
|
|
615
|
+
❌ 写素材生成 prompt
|
|
616
|
+
|
|
617
|
+
---
|
|
618
|
+
|
|
619
|
+
## ✅ 用户只需要做的事
|
|
620
|
+
|
|
621
|
+
✅ 描述视频的**目的**(产品演示/教育/社交媒体)
|
|
622
|
+
✅ 描述视频的**内容**(展示什么功能/讲什么故事)
|
|
623
|
+
✅ 可选:指定**时长**(不说默认30秒)
|
|
624
|
+
✅ 可选:指定**平台**(YouTube/Instagram/TikTok)
|
|
625
|
+
✅ 可选:特殊**风格偏好**(如果有强烈偏好)
|
|
626
|
+
|
|
627
|
+
---
|
|
628
|
+
|
|
629
|
+
## 🎯 最终输出(自动生成)
|
|
630
|
+
|
|
631
|
+
每次处理完用户需求后,自动输出:
|
|
632
|
+
|
|
633
|
+
1. **📋 分析总结**
|
|
634
|
+
|
|
635
|
+
```
|
|
636
|
+
场景类型:产品演示
|
|
637
|
+
设计风格:Glassmorphism + Tech Innovation
|
|
638
|
+
配色方案:科技蓝 (#0066ff) + 霓虹青 (#00ffff)
|
|
639
|
+
时长:30秒 | 分辨率:1920x1080 | 帧率:60fps
|
|
640
|
+
```
|
|
641
|
+
|
|
642
|
+
2. **🎨 完整的 Remotion 项目代码**
|
|
643
|
+
- Root.tsx
|
|
644
|
+
- Scene 组件(所有场景)
|
|
645
|
+
- 动画工具函数
|
|
646
|
+
- 配置文件
|
|
647
|
+
|
|
648
|
+
3. **🖼️ 素材生成指令**
|
|
649
|
+
|
|
650
|
+
```bash
|
|
651
|
+
# Nano Banana Pro 生成静态图片
|
|
652
|
+
uv run generate_image.py --prompt "..." --resolution 4K
|
|
653
|
+
|
|
654
|
+
# Seedance 2.0 生成动态视频 ⭐ (新增)
|
|
655
|
+
# 使用 seedance-prompt skill 自动生成提示词
|
|
656
|
+
# 详见: .claude/skills/seedance-prompt.md
|
|
657
|
+
|
|
658
|
+
# Processing 生成背景特效
|
|
659
|
+
"Create particle connections background, tech style..."
|
|
660
|
+
```
|
|
661
|
+
|
|
662
|
+
4. **🎬 渲染命令**
|
|
663
|
+
```bash
|
|
664
|
+
npm start # 预览
|
|
665
|
+
npx remotion render src/index.ts MyVideo out/video.mp4 --quality 100
|
|
666
|
+
```
|
|
667
|
+
|
|
668
|
+
---
|
|
669
|
+
|
|
670
|
+
## 🎬 Seedance 2.0 集成指南(新增)
|
|
671
|
+
|
|
672
|
+
> **完整文档**: `.claude/skills/seedance-prompt.md`
|
|
673
|
+
> **项目来源**: [awesome-seedance-2-prompts](https://github.com/YouMind-OpenLab/awesome-seedance-2-prompts)
|
|
674
|
+
> **提示词库**: 180+ 验证过的专业模板
|
|
675
|
+
|
|
676
|
+
### 核心定位
|
|
677
|
+
|
|
678
|
+
```
|
|
679
|
+
素材生成工具选择:
|
|
680
|
+
├─ 静态图像 → Nano Banana Pro(图片、背景)
|
|
681
|
+
├─ 动态视频 → Seedance 2.0 ⭐(视频片段、动画)
|
|
682
|
+
└─ 视频编排 → Remotion(合成、字幕、特效)
|
|
683
|
+
```
|
|
684
|
+
|
|
685
|
+
### 自动触发条件
|
|
686
|
+
|
|
687
|
+
当用户需求包含以下关键词时,自动推荐 Seedance 2.0:
|
|
688
|
+
|
|
689
|
+
| 关键词 | 场景 | 模板类型 |
|
|
690
|
+
|--------|------|----------|
|
|
691
|
+
| "电影级"、"大片"、"cinematic" | 电影场景 | Ultra-Realistic / Photorealistic |
|
|
692
|
+
| "打斗"、"动作"、"action" | 动作序列 | Combat / Transformation |
|
|
693
|
+
| "科幻"、"太空"、"sci-fi" | 科幻场景 | Space Battle / Wormhole |
|
|
694
|
+
| "时尚"、"T台"、"fashion" | 时尚大片 | Haute Couture / Editorial |
|
|
695
|
+
| "恐怖"、"惊悚"、"horror" | 恐怖片段 | Tension Build / Atmosphere |
|
|
696
|
+
| "第一人称"、"POV" | FPV视角 | First-Person Perspective |
|
|
697
|
+
| "动漫"、"二次元"、"anime" | 动漫风格 | Anime Transformation |
|
|
698
|
+
| "视频片段"、"动态素材" | 通用视频 | General Cinematic |
|
|
699
|
+
|
|
700
|
+
### 快速使用流程
|
|
701
|
+
|
|
702
|
+
```
|
|
703
|
+
1. 用户描述需求
|
|
704
|
+
↓
|
|
705
|
+
2. 检测关键词 → 自动加载 seedance-prompt skill
|
|
706
|
+
↓
|
|
707
|
+
3. 智能推荐提示词模板
|
|
708
|
+
↓
|
|
709
|
+
4. 自定义参数(时长、分辨率、风格)
|
|
710
|
+
↓
|
|
711
|
+
5. 生成完整 Seedance 提示词
|
|
712
|
+
↓
|
|
713
|
+
6. 用户使用 Seedance 2.0 生成视频
|
|
714
|
+
↓
|
|
715
|
+
7. 将生成的视频集成到 Remotion 项目
|
|
716
|
+
```
|
|
717
|
+
|
|
718
|
+
### 示例:电影级场景
|
|
719
|
+
|
|
720
|
+
**用户说**: "做一个15秒的电影级场景,老鹰飞越城市"
|
|
721
|
+
|
|
722
|
+
**自动处理**:
|
|
723
|
+
|
|
724
|
+
```markdown
|
|
725
|
+
【识别】
|
|
726
|
+
- 类型: Cinematic(电影级)
|
|
727
|
+
- 元素: 老鹰 + 城市飞行
|
|
728
|
+
- 时长: 15秒
|
|
729
|
+
|
|
730
|
+
【推荐模板】: "Ultra-Realistic Animal Cinematic"
|
|
731
|
+
|
|
732
|
+
【生成提示词】:
|
|
733
|
+
|
|
734
|
+
Ultra-realistic cinematic sequence of a golden eagle launching from a rocky cliff
|
|
735
|
+
at dawn, wings extending with visible feather separation and aerodynamic drag. The
|
|
736
|
+
bird glides forward over a dense urban skyline, banking left to avoid obstacles,
|
|
737
|
+
then lands on a rooftop sign.
|
|
738
|
+
|
|
739
|
+
Camera tracks parallel at mid-distance using a stabilized aerial rig. Background
|
|
740
|
+
reveals morning haze diffusion and directional sunlight from low east angle casting
|
|
741
|
+
elongated shadows across glass facades.
|
|
742
|
+
|
|
743
|
+
Technical specs:
|
|
744
|
+
- Duration: 15 seconds
|
|
745
|
+
- Resolution: 16:9, 1080p
|
|
746
|
+
- Style: ultra-realistic cinematic
|
|
747
|
+
- Lighting: natural morning light
|
|
748
|
+
- Physics: authentic bird anatomy, realistic airflow
|
|
749
|
+
|
|
750
|
+
【集成到 Remotion】:
|
|
751
|
+
|
|
752
|
+
// 1. Seedance 生成视频(15秒)
|
|
753
|
+
const eagleClip = './assets/seedance/eagle-flight.mp4';
|
|
754
|
+
|
|
755
|
+
// 2. Remotion 编排
|
|
756
|
+
<Sequence from={0} durationInFrames={450}>
|
|
757
|
+
<Video src={eagleClip} />
|
|
758
|
+
<Sequence from={390}>
|
|
759
|
+
<AnimatedText text="AMBITION" /> {/* 最后3秒叠加文字 */}
|
|
760
|
+
</Sequence>
|
|
761
|
+
</Sequence>
|
|
762
|
+
```
|
|
763
|
+
|
|
764
|
+
### 示例:科幻场景
|
|
765
|
+
|
|
766
|
+
**用户说**: "生成一个太空战舰穿越虫洞的场景"
|
|
767
|
+
|
|
768
|
+
**自动处理**:
|
|
769
|
+
|
|
770
|
+
```markdown
|
|
771
|
+
【识别】
|
|
772
|
+
- 类型: Sci-Fi(科幻)
|
|
773
|
+
- 元素: 战舰 + 虫洞
|
|
774
|
+
- 默认时长: 10秒
|
|
775
|
+
|
|
776
|
+
【推荐模板】: "Sci-Fi Wormhole Traversal"
|
|
777
|
+
|
|
778
|
+
【生成提示词】:
|
|
779
|
+
|
|
780
|
+
In distant outer space, a massive battleship traverses a wormhole. The ship's hull
|
|
781
|
+
glows with energy as space-time distorts around it. The wormhole's gravitational
|
|
782
|
+
waves ripple across the vessel's surface. Bridge lights flicker as the crew braces
|
|
783
|
+
for dimensional transition.
|
|
784
|
+
|
|
785
|
+
Camera starts with wide shot, follows ship through tunnel with dynamic movement.
|
|
786
|
+
Space-time distortion creates swirling energy patterns. Exit portal appears ahead,
|
|
787
|
+
emanating brilliant light.
|
|
788
|
+
|
|
789
|
+
Technical specs:
|
|
790
|
+
- Duration: 10 seconds
|
|
791
|
+
- Resolution: 16:9, 1080p
|
|
792
|
+
- Style: hyperrealistic sci-fi
|
|
793
|
+
- VFX: wormhole distortion, energy trails, lens flares
|
|
794
|
+
|
|
795
|
+
【集成到 Remotion】:
|
|
796
|
+
|
|
797
|
+
const wormholeClip = './assets/seedance/wormhole.mp4';
|
|
798
|
+
|
|
799
|
+
<Composition>
|
|
800
|
+
<Sequence from={0} durationInFrames={300}>
|
|
801
|
+
<Video src={wormholeClip} />
|
|
802
|
+
{/* 叠加科幻UI元素 */}
|
|
803
|
+
<SciFiHUD />
|
|
804
|
+
</Sequence>
|
|
805
|
+
</Composition>
|
|
806
|
+
```
|
|
807
|
+
|
|
808
|
+
### 技术参数自动映射
|
|
809
|
+
|
|
810
|
+
| Seedance 2.0 | Remotion 对应 | 说明 |
|
|
811
|
+
|-------------|--------------|------|
|
|
812
|
+
| 4-6秒视频 | 120-180 frames @ 30fps | 短片段 |
|
|
813
|
+
| 8-12秒视频 | 240-360 frames @ 30fps | 标准片段 |
|
|
814
|
+
| 13-15秒视频 | 390-450 frames @ 30fps | 长片段 |
|
|
815
|
+
| 16:9 分辨率 | 1920x1080 | 横屏视频 |
|
|
816
|
+
| 9:16 分辨率 | 1080x1920 | 竖屏视频 |
|
|
817
|
+
| 1:1 分辨率 | 1080x1080 | 正方形 |
|
|
818
|
+
|
|
819
|
+
### 与其他工具配合
|
|
820
|
+
|
|
821
|
+
```typescript
|
|
822
|
+
// 完整视频制作流程
|
|
823
|
+
const workflow = {
|
|
824
|
+
// 1. Nano Banana Pro: 静态元素
|
|
825
|
+
background: generateImage('科幻城市背景', '4K'),
|
|
826
|
+
|
|
827
|
+
// 2. Seedance 2.0: 动态元素
|
|
828
|
+
spaceshipFlight: generateSeedanceVideo({
|
|
829
|
+
prompt: '[Seedance提示词]',
|
|
830
|
+
duration: 10,
|
|
831
|
+
resolution: '1920x1080'
|
|
832
|
+
}),
|
|
833
|
+
|
|
834
|
+
// 3. Remotion: 编排合成
|
|
835
|
+
finalVideo: (
|
|
836
|
+
<Composition>
|
|
837
|
+
<Sequence from={0}>
|
|
838
|
+
<Img src={background} /> {/* 静态背景 */}
|
|
839
|
+
</Sequence>
|
|
840
|
+
<Sequence from={0} durationInFrames={300}>
|
|
841
|
+
<Video src={spaceshipFlight} /> {/* 动态飞船 */}
|
|
842
|
+
</Sequence>
|
|
843
|
+
<Sequence from={240}>
|
|
844
|
+
<AnimatedText /> {/* Remotion 动画 */}
|
|
845
|
+
</Sequence>
|
|
846
|
+
</Composition>
|
|
847
|
+
)
|
|
848
|
+
};
|
|
849
|
+
```
|
|
850
|
+
|
|
851
|
+
### 质量检查清单
|
|
852
|
+
|
|
853
|
+
使用 Seedance 2.0 前确认:
|
|
854
|
+
|
|
855
|
+
- [ ] 需求是否需要**动态视频**(而非静态图像)
|
|
856
|
+
- [ ] 时长在 **4-15秒** 范围内
|
|
857
|
+
- [ ] 场景类型在 Seedance 擅长的8大类中
|
|
858
|
+
- [ ] 已准备好详细的场景描述
|
|
859
|
+
- [ ] 明确了分辨率和风格要求
|
|
860
|
+
|
|
861
|
+
### 性能对比
|
|
862
|
+
|
|
863
|
+
| 方案 | 耗时 | 质量 | 灵活性 | 适用场景 |
|
|
864
|
+
|------|------|------|--------|----------|
|
|
865
|
+
| **Seedance 2.0** | 5-10分钟 | ⭐⭐⭐⭐⭐ | ⭐⭐⭐⭐ | 电影级动态场景 |
|
|
866
|
+
| **Nano Banana Pro** | 2-5分钟 | ⭐⭐⭐⭐⭐ | ⭐⭐⭐⭐⭐ | 静态图像、插画 |
|
|
867
|
+
| **Remotion 从零编码** | 1-2小时 | ⭐⭐⭐⭐ | ⭐⭐⭐⭐⭐ | 自定义交互动画 |
|
|
868
|
+
| **Remotion 模板** | 5-15分钟 | ⭐⭐⭐⭐ | ⭐⭐⭐⭐ | 文字动画、UI元素 |
|
|
869
|
+
|
|
870
|
+
**建议**:动态场景用 Seedance 2.0,静态元素用 Nano Banana Pro,编排合成用 Remotion。
|
|
871
|
+
|
|
872
|
+
### 更新机制
|
|
873
|
+
|
|
874
|
+
```bash
|
|
875
|
+
# 定期同步最新提示词库(每周)
|
|
876
|
+
cd "E:/Bobo's Coding cache/seedance-prompts"
|
|
877
|
+
git pull origin main
|
|
878
|
+
|
|
879
|
+
# 或使用快捷命令
|
|
880
|
+
node scripts/update-seedance-prompts.js
|
|
881
|
+
```
|
|
882
|
+
|
|
883
|
+
---
|
|
884
|
+
|
|
885
|
+
## 📚 模板库集成指南(新增)
|
|
886
|
+
|
|
887
|
+
> **完整文档**: [REMOTION_TEMPLATES_LIBRARY.md](../capabilities/REMOTION_TEMPLATES_LIBRARY.md)
|
|
888
|
+
|
|
889
|
+
### 快速决策树
|
|
890
|
+
|
|
891
|
+
```
|
|
892
|
+
用户需求
|
|
893
|
+
↓
|
|
894
|
+
检查模板库
|
|
895
|
+
↓
|
|
896
|
+
├─ 有现成模板 → 直接使用(5分钟)
|
|
897
|
+
│ ├─ 复制模板文件
|
|
898
|
+
│ ├─ 修改文字/颜色
|
|
899
|
+
│ └─ 集成到项目
|
|
900
|
+
│
|
|
901
|
+
├─ 可以组合 → 组合模板(15分钟)
|
|
902
|
+
│ ├─ 选择2-4个模板
|
|
903
|
+
│ ├─ 设计时间线
|
|
904
|
+
│ └─ 添加过渡效果
|
|
905
|
+
│
|
|
906
|
+
├─ 需要修改 → 基于模板改(30分钟)
|
|
907
|
+
│ ├─ 选择最相似的模板
|
|
908
|
+
│ ├─ 修改动画逻辑
|
|
909
|
+
│ └─ 调整视觉效果
|
|
910
|
+
│
|
|
911
|
+
└─ 特殊需求 → 从零生成(1-2小时)
|
|
912
|
+
├─ 完整需求分析
|
|
913
|
+
├─ 设计组件结构
|
|
914
|
+
└─ 编写自定义代码
|
|
915
|
+
```
|
|
916
|
+
|
|
917
|
+
### 自动推荐逻辑
|
|
918
|
+
|
|
919
|
+
```typescript
|
|
920
|
+
function auto_recommend_templates(user_request: string) {
|
|
921
|
+
const keywords = extract_keywords(user_request);
|
|
922
|
+
|
|
923
|
+
// 1. 直接匹配
|
|
924
|
+
if (keywords.includes('标题') || keywords.includes('开场')) {
|
|
925
|
+
return {
|
|
926
|
+
primary: 'animated-text',
|
|
927
|
+
alternatives: ['bounce-text', 'bubble-pop-text'],
|
|
928
|
+
reason: '标题动画首选',
|
|
929
|
+
};
|
|
930
|
+
}
|
|
931
|
+
|
|
932
|
+
// 2. 场景组合
|
|
933
|
+
if (keywords.includes('产品介绍')) {
|
|
934
|
+
return {
|
|
935
|
+
combination: [
|
|
936
|
+
{ template: 'animated-text', role: 'intro', duration: '10%' },
|
|
937
|
+
{ template: 'animated-list', role: 'features', duration: '60%' },
|
|
938
|
+
{ template: 'particle-explosion', role: 'transition', duration: '10%' },
|
|
939
|
+
{ template: 'bounce-text', role: 'cta', duration: '20%' },
|
|
940
|
+
],
|
|
941
|
+
reason: '产品介绍标准流程',
|
|
942
|
+
};
|
|
943
|
+
}
|
|
944
|
+
|
|
945
|
+
// 3. 风格匹配
|
|
946
|
+
if (keywords.includes('赛博朋克') || keywords.includes('科幻')) {
|
|
947
|
+
return {
|
|
948
|
+
style_pack: ['glitch-text', 'matrix-rain', 'neon-effects'],
|
|
949
|
+
background: 'geometric-patterns',
|
|
950
|
+
reason: '赛博朋克视觉套装',
|
|
951
|
+
};
|
|
952
|
+
}
|
|
953
|
+
|
|
954
|
+
// 4. 功能匹配
|
|
955
|
+
if (keywords.includes('音乐') || keywords.includes('节奏')) {
|
|
956
|
+
return {
|
|
957
|
+
primary: 'sound-wave',
|
|
958
|
+
secondary: 'pulsing-text',
|
|
959
|
+
sync: 'use useAudioData for real-time sync',
|
|
960
|
+
reason: '音频可视化专用',
|
|
961
|
+
};
|
|
962
|
+
}
|
|
963
|
+
}
|
|
964
|
+
```
|
|
965
|
+
|
|
966
|
+
### 模板使用示例
|
|
967
|
+
|
|
968
|
+
#### 示例 1:快速标题动画
|
|
969
|
+
|
|
970
|
+
**用户说**:"做一个标题动画,文字是'欢迎来到未来'"
|
|
971
|
+
|
|
972
|
+
**自动处理**:
|
|
973
|
+
|
|
974
|
+
```typescript
|
|
975
|
+
// 1. 选择模板:animated-text(最适合)
|
|
976
|
+
// 2. 修改内容
|
|
977
|
+
const text = '欢迎来到未来'.split('');
|
|
978
|
+
|
|
979
|
+
// 3. 调整配色(可选)
|
|
980
|
+
color: '#00ffff'; // 青色,符合"未来"主题
|
|
981
|
+
|
|
982
|
+
// 4. 生成代码
|
|
983
|
+
import AnimatedText from './templates/animated-text';
|
|
984
|
+
|
|
985
|
+
// 完成!耗时:2分钟
|
|
986
|
+
```
|
|
987
|
+
|
|
988
|
+
#### 示例 2:产品功能展示
|
|
989
|
+
|
|
990
|
+
**用户说**:"展示我们产品的3个核心功能"
|
|
991
|
+
|
|
992
|
+
**自动处理**:
|
|
993
|
+
|
|
994
|
+
```typescript
|
|
995
|
+
// 1. 选择模板:animated-list(完美匹配)
|
|
996
|
+
// 2. 自定义数据
|
|
997
|
+
const items = [
|
|
998
|
+
{ name: 'AI 智能写作', color: '#3b82f6' },
|
|
999
|
+
{ name: '实时协作', color: '#60a5fa' },
|
|
1000
|
+
{ name: '多语言支持', color: '#93c5fd' },
|
|
1001
|
+
];
|
|
1002
|
+
|
|
1003
|
+
// 3. 调整动画速度(可选)
|
|
1004
|
+
delay: i * 8; // 从5帧改为8帧,更舒缓
|
|
1005
|
+
|
|
1006
|
+
// 完成!耗时:5分钟
|
|
1007
|
+
```
|
|
1008
|
+
|
|
1009
|
+
#### 示例 3:音乐可视化
|
|
1010
|
+
|
|
1011
|
+
**用户说**:"做一个音乐视频,要有声波效果"
|
|
1012
|
+
|
|
1013
|
+
**自动处理**:
|
|
1014
|
+
|
|
1015
|
+
```typescript
|
|
1016
|
+
// 1. 选择模板:sound-wave + pulsing-text(组合)
|
|
1017
|
+
// 2. 添加音频同步
|
|
1018
|
+
import { useAudioData, Audio } from "remotion";
|
|
1019
|
+
|
|
1020
|
+
const audioData = useAudioData("./music.mp3");
|
|
1021
|
+
const amplitude = audioData?.getAmplitude(frame) || 0;
|
|
1022
|
+
|
|
1023
|
+
// 3. 驱动声波高度
|
|
1024
|
+
const height = amplitude * 200;
|
|
1025
|
+
|
|
1026
|
+
// 4. 背景层
|
|
1027
|
+
<GeometricPatterns /> // 添加科技感背景
|
|
1028
|
+
|
|
1029
|
+
// 完成!耗时:15分钟
|
|
1030
|
+
```
|
|
1031
|
+
|
|
1032
|
+
#### 示例 4:赛博朋克开场
|
|
1033
|
+
|
|
1034
|
+
**用户说**:"做一个酷炫的赛博朋克风格开场"
|
|
1035
|
+
|
|
1036
|
+
**自动处理**:
|
|
1037
|
+
|
|
1038
|
+
```typescript
|
|
1039
|
+
// 1. 风格套装:glitch-text + matrix-rain + geometric-patterns
|
|
1040
|
+
// 2. 层次结构
|
|
1041
|
+
<AbsoluteFill>
|
|
1042
|
+
{/* 背景层 */}
|
|
1043
|
+
<div style={{ zIndex: 1 }}>
|
|
1044
|
+
<MatrixRain />
|
|
1045
|
+
</div>
|
|
1046
|
+
|
|
1047
|
+
{/* 几何层 */}
|
|
1048
|
+
<div style={{ zIndex: 2, opacity: 0.5 }}>
|
|
1049
|
+
<GeometricPatterns />
|
|
1050
|
+
</div>
|
|
1051
|
+
|
|
1052
|
+
{/* 文字层 */}
|
|
1053
|
+
<div style={{ zIndex: 3 }}>
|
|
1054
|
+
<GlitchText />
|
|
1055
|
+
</div>
|
|
1056
|
+
</AbsoluteFill>
|
|
1057
|
+
|
|
1058
|
+
// 3. 配色调整为霓虹色
|
|
1059
|
+
colors = {
|
|
1060
|
+
primary: "#00FFFF",
|
|
1061
|
+
secondary: "#FF00FF",
|
|
1062
|
+
accent: "#FFFF00"
|
|
1063
|
+
}
|
|
1064
|
+
|
|
1065
|
+
// 完成!耗时:10分钟
|
|
1066
|
+
```
|
|
1067
|
+
|
|
1068
|
+
### 性能对比
|
|
1069
|
+
|
|
1070
|
+
| 方案 | 耗时 | 质量 | 灵活性 | 推荐场景 |
|
|
1071
|
+
| ---------------- | --------- | ---------- | ---------- | ---------- |
|
|
1072
|
+
| **使用现成模板** | 2-5分钟 | ⭐⭐⭐⭐ | ⭐⭐⭐ | 标准需求 |
|
|
1073
|
+
| **组合多个模板** | 10-15分钟 | ⭐⭐⭐⭐⭐ | ⭐⭐⭐⭐ | 中等复杂度 |
|
|
1074
|
+
| **基于模板修改** | 20-30分钟 | ⭐⭐⭐⭐⭐ | ⭐⭐⭐⭐⭐ | 有特殊需求 |
|
|
1075
|
+
| **从零生成代码** | 1-2小时 | ⭐⭐⭐⭐⭐ | ⭐⭐⭐⭐⭐ | 独特创意 |
|
|
1076
|
+
|
|
1077
|
+
**建议**:80% 的需求可以用现成模板或组合解决,只有 20% 需要从零生成。
|
|
1078
|
+
|
|
1079
|
+
### 模板库维护
|
|
1080
|
+
|
|
1081
|
+
**本地模板路径**:
|
|
1082
|
+
|
|
1083
|
+
```bash
|
|
1084
|
+
E:/Bobo's Coding cache/remotion-templates-lib/templates/
|
|
1085
|
+
```
|
|
1086
|
+
|
|
1087
|
+
**更新模板库**:
|
|
1088
|
+
|
|
1089
|
+
```bash
|
|
1090
|
+
cd "E:/Bobo's Coding cache/remotion-templates-lib"
|
|
1091
|
+
git pull origin main
|
|
1092
|
+
```
|
|
1093
|
+
|
|
1094
|
+
**查看所有模板**:
|
|
1095
|
+
|
|
1096
|
+
```bash
|
|
1097
|
+
ls templates/*.tsx
|
|
1098
|
+
# 输出:15个模板文件
|
|
1099
|
+
```
|
|
1100
|
+
|
|
1101
|
+
**测试单个模板**:
|
|
1102
|
+
|
|
1103
|
+
```bash
|
|
1104
|
+
# 在 Remotion 项目中
|
|
1105
|
+
npm start
|
|
1106
|
+
# 在浏览器中预览各个模板
|
|
1107
|
+
```
|
|
1108
|
+
|
|
1109
|
+
---
|
|
1110
|
+
|
|
1111
|
+
## 🔄 更新到 CLAUDE.md
|
|
1112
|
+
|
|
1113
|
+
这个自动化规则已集成到你的工作流程中,当检测到视频创作需求时自动激活。
|
|
1114
|
+
|
|
1115
|
+
**模板库优先级**:
|
|
1116
|
+
|
|
1117
|
+
- ✅ 优先推荐现成模板
|
|
1118
|
+
- ✅ 其次建议模板组合
|
|
1119
|
+
- ✅ 必要时基于模板修改
|
|
1120
|
+
- ✅ 最后才从零生成
|