- 在 account.json 中新增 styles、ttsVoice、ttsInstruction、keywordStyle、transitions 等配置字段 - 分镜表 items 添加 keyword 字段,用于渲染关键词花字动画 - 重构 capcut_assemble.js 转场策略:前两段不加转场,rhythm 模式优化为只在关键位置添加 - 动画系统区分循环动画和入场动画,支持更丰富的动画组合(缩放、回弹伸缩等) - 更新 SKILL.md 和 manifest-schema.md 文档以反映新增字段和流程变更
7.1 KiB
7.1 KiB
账号系统规范
每个账号独立管理视觉风格、提示词策略和 CapCut 配置。 视觉风格直接内嵌在 prompts/*.md 中,无需单独的 styles/ 目录。
目录结构
accounts/ # 项目根目录下
├── _template/ # 新账号模板(含通用 prompt 模板)
│ ├── account.json
│ ├── prompts/ # 通用提示词模板(生成账号 prompt 的基础)
│ │ ├── 通用分镜.md
│ │ ├── 通用图片.md
│ │ └── 通用视频.md
│ └── references/ # 参考图目录
│ └── .gitkeep
└── {account}/ # 用户创建的账号(目录名 = account.json 的 id)
├── account.json
├── prompts/ # 账号专属提示词(基于通用模板 + 风格注入生成)
│ ├── 分镜.md # 口播文案 → 分镜表
│ ├── 图片提示词.md # shotDesc → imagePrompt
│ └── 视频提示词.md # shotDesc → videoPrompt
└── references/ # 参考图(生图时作为参考输入)
├── ref_001.png
└── ref_002.png
account.json 字段说明
{
"id": "tech-talk",
"name": "科技解说",
"description": "科技类短视频账号,深色背景,赛博朋克风格",
"pipeline": "image-video",
"defaultFormat": "9:16",
"imageModel": "gemini",
"videoModel": "veo3-fast",
"batchSize": 30,
"styles": {
"赛博风格": {
"references": [
{ "file": "cyber_ref.png", "url": "https://oss.../cyber_ref.png" }
]
}
},
"ttsVoice": "cosyvoice-v3.5-plus-bailian-xxx",
"ttsInstruction": "用冷静理性的男性声音朗读,语速适中",
"storyboardPrompt": "prompts/分镜.md",
"imageStylePrompt": "prompts/图片提示词.md",
"videoStylePrompt": "prompts/视频提示词.md",
"references": [],
"capcut": {
"effects": ["录制边框 III"],
"filter": "质感暗调:30",
"subtitleStyle": {
"fontSize": 24,
"color": "#FFFFFF",
"highlightColor": "#FF6B35",
"bold": true,
"hasShadow": true,
"shadowColor": "#000000",
"shadowAlpha": 0.8,
"transformY": -380,
"alignment": 1,
"inAnimation": "淡入",
"outAnimation": "淡出"
},
"keywordStyle": {
"textEffect": "简约白色黑边花字",
"fontSize": 60,
"color": "#FFFFFF",
"bold": true,
"transformY": 0,
"inAnimation": "打字机效果",
"outAnimation": "模糊淡出",
"inAnimDuration": 300000,
"outAnimDuration": 300000
},
"transitions": {
"strategy": "rhythm",
"default": { "name": "闪白", "duration": 150000 },
"byPosition": {
"hook": { "name": "闪白", "duration": 100000 },
"keypoint": { "name": "闪白", "duration": 120000 },
"body": { "name": "溶解", "duration": 300000 },
"closing": { "name": "闪黑", "duration": 200000 }
}
},
"defaultBGM": ""
}
}
| 字段 | 类型 | 说明 |
|---|---|---|
id |
string | 账号唯一标识(与目录名一致) |
name |
string | 账号显示名 |
description |
string | 一句话描述 |
pipeline |
string | 流水线类型:image-video(默认) |
defaultFormat |
string | 默认画幅(9:16 / 16:9 / 1:1 / 4:3) |
imageModel |
string | 默认图片模型(gemini / mj) |
videoModel |
string | 默认视频模型(veo3-fast / grok-video-3 / kling) |
batchSize |
number | 默认批量生成数量 |
styles |
object | 命名风格预设,每项含 references 数组 |
ttsVoice |
string | TTS 音色 ID,留空用 config.json 全局默认 |
ttsInstruction |
string | TTS 语气指令(描述期望的语气、语速、情感) |
storyboardPrompt |
string | 分镜提示词模板路径(相对于账号目录) |
imageStylePrompt |
string | 图片提示词模板路径(相对于账号目录) |
videoStylePrompt |
string | 视频提示词模板路径(相对于账号目录) |
references |
array | 默认参考图列表(每项含 file 和 url),已被 styles 取代 |
capcut.effects |
string[] | CapCut 特效名称列表 |
capcut.filter |
string | CapCut 滤镜,格式 "名称:强度"(如 "质感电影:40") |
capcut.subtitleStyle |
object | 字幕样式(font/字体、fontSize、color、highlightColor、bold、transformY、inAnimation/outAnimation) |
capcut.keywordStyle |
object | 关键字氛围词样式(textEffect 花字、fontSize、color、动画),留空或删除则关闭 |
capcut.transitions |
object | 转场配置(strategy + default + byPosition + byDirector) |
capcut.defaultBGM |
string | 默认背景音乐 URL |
提示词模板(prompts/)
每个账号在 prompts/ 目录下维护三个子 Agent 提示词模板:
| 文件 | 用途 | Step |
|---|---|---|
分镜.md |
口播文案 → 分镜表(shotDesc/script/duration/directorRef) | Step 1 |
图片提示词.md |
shotDesc + directorRef → imagePrompt | Step 2-A |
视频提示词.md |
shotDesc + directorRef → videoPrompt | Step 3-A |
这些文件定义了子 Agent 的角色、入参、出参、词库和示例。路径在 account.json 中以相对路径引用,Agent 读取 account.json 后自动定位。
生成方式
账号的 prompts 基于 _template/prompts/通用*.md 生成:
- 通用模板提供方法论骨架(切割规则、导演词库、写法规范、输出格式、质量自检)
- 创建账号时通过 Q&A 收集风格信息,注入到骨架的固定位置
- 详细流程见 account-creation.md
参考图(references/)
参考图用于生图时的风格引导(Gemini 图生图 / MJ --sref)。
管理流程
- 用户将参考图放入
accounts/{id}/references/目录 - Agent 上传到 OSS:
node scripts/oss-upload.js accounts/{id}/references/{图片文件} - 将返回的 URL 写入 account.json 的
references数组
创建新账号
Q&A 创建(推荐)
用户说"创建账号"或"新账号"时,Agent 按 account-creation.md 的结构化问答流程执行:
- 逐项询问:账号身份 → 内容 DNA → 视觉身份 → 技术配置
- 基于通用模板 + 用户回答生成 3 个 prompt 文件 + account.json
- 校验完整性
CLI 创建(辅助)
node scripts/pipeline.js create-account \
--id military \
--name "军事账号" \
--desc "军事主题短视频,暗黑漫画风格" \
--video-model veo3-fast-frames \
--references ./ref1.png,./ref2.png
自动完成:创建目录 → 生成 account.json → 复制参考图 → 上传 OSS → 回写 URL。
注意:CLI 创建只生成目录结构和 account.json 骨架,prompt 文件仍需通过 Q&A 流程或手动创建。
校验账号
node scripts/pipeline.js validate-account --account military
检查:id 匹配、必填字段、prompts 模板存在、参考图完整性、OSS URL 有效。