Files
video-create/.claude/skills/video-from-script/references/account-system.md
sion123 49537ea02f feat(video-pipeline): 添加 Ken Burns 镜头动画及账号创建流程优化
- 新增 Ken Burns 关键帧动画功能,为图片片段添加慢速缩放/平移效果
- 重构账号创建流程为10维度画像体系(定位→受众→内容气质→视觉基调→画风质感→色彩体系→镜头运动→声音身份→文字呈现→节奏律动)
- 新增爆款潜力自检机制,在汇总确认前检查差异化定位、情绪价值等指标
- 优化转场策略,基于累计时长间隔添加转场动画
- 改进 OSS 上传功能,支持并发上传
- 添加 BGM 淡入淡出效果(0.5s淡入/1s淡出)
- 新增 Hook 策略偏好(结论前置/认知冲突/身份挑衅等)和目标情绪回路字段
- 更新模板 JSON 配置,集成 kenBurns 字段
2026-05-01 17:01:39 +08:00

223 lines
8.8 KiB
Markdown
Raw Blame History

This file contains ambiguous Unicode characters
This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.
# 账号系统规范
> 每个账号独立管理视觉风格、提示词策略和 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 字段说明
```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.kenBurns` | object | Ken Burns 关键帧动画(消除图片幻灯片感),见下方 |
| `capcut.defaultBGM` | string | 默认背景音乐 URL |
### kenBurns 字段
Ken Burns 关键帧动画:为每张图片添加慢速连续缩放/平移,消除幻灯片感。**速率驱动**,自动适配片段时长(短片段缩放少,长片段缩放多)。
```json
{
"kenBurns": {
"enabled": true,
"default": { "startScale": 1.0, "scaleRate": 0.8, "panXRate": 0, "panYRate": 0 },
"byDirector": {
"tarantino": { "startScale": 1.0, "scaleRate": 0.9, "panXRate": 0, "panYRate": -0.3 },
"kitano": { "startScale": 1.03, "scaleRate": 0.5, "panXRate": 0.4, "panYRate": 0 },
"fincher": { "startScale": 1.0, "scaleRate": 0.4, "panXRate": 0, "panYRate": 0 }
}
}
}
```
| 参数 | 类型 | 说明 |
|------|------|------|
| `enabled` | boolean | `false` 禁用 Ken Burns默认 `true` |
| `default` | object | 默认 Ken Burns 参数(无 directorRef 匹配时使用) |
| `byDirector` | object | 按 directorRef 覆盖key 为导演名小写) |
| `startScale` | number | 起始缩放1.0=原始1.03=略微放大) |
| `scaleRate` | number | 缩放速率(%/秒),如 0.8 = 每秒放大 0.8%。自动乘以片段时长计算 endScale上限 1.20 |
| `panXRate` | number | 水平平移速率(单位/秒),正值右移。自动乘以片段时长 |
| `panYRate` | number | 垂直平移速率(单位/秒),正值下移。自动乘以片段时长 |
**创建账号时 Agent 应询问**
- 是否需要 Ken Burns 镜头动画?(图片成片必开,视频模式自动跳过)
- 镜头风格偏好:微缩放 / 平移+缩放 / 仅缩放
---
## 提示词模板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](account-creation.md)
---
## 参考图references/
参考图用于生图时的风格引导Gemini 图生图 / MJ --sref
### 管理流程
1. 用户将参考图放入 `accounts/{id}/references/` 目录
2. Agent 上传到 OSS`node scripts/oss-upload.js accounts/{id}/references/{图片文件}`
3. 将返回的 URL 写入 account.json 的 `references` 数组
---
## 创建新账号
### Q&A 创建(推荐)
用户说"创建账号"或"新账号"时Agent 按 [account-creation.md](account-creation.md) 的结构化问答流程执行:
1. 逐项询问:账号身份 → 内容 DNA → 视觉身份 → 技术配置
2. 基于通用模板 + 用户回答生成 3 个 prompt 文件 + account.json
3. 校验完整性
### CLI 创建(辅助)
```bash
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 流程或手动创建。
### 校验账号
```bash
node scripts/pipeline.js validate-account --account military
```
检查id 匹配、必填字段、prompts 模板存在、参考图完整性、OSS URL 有效。