从项目文件夹中读取 `script_output.json`,自动执行完整的视频生成流程:
Automates complete video creation from project folder by generating TTS audio, AI images, and CapCut draft.
/plugin marketplace add readonme/claude_video_plugin/plugin install video-creator@claude-video-plugin从项目文件夹中读取 script_output.json,自动执行完整的视频生成流程:
这是一个一键式自动化命令,无需手动分步执行。
script_output.json 的目录)
·# 基本用法(从项目文件夹自动生成所有资源)
/video-creator:build /path/to/project_folder
此命令期望以下项目文件夹结构:
输入:
<project_folder>/
└── script_output.json # 必需:脚本+提示词(来自 /video-creator:scene 和 /video-creator:prompt)
输出:
<project_folder>/
├── script_output.json # 输入文件
├── audio/ # Step 1 生成:音频文件
│ ├── audio_001.mp3
│ ├── audio_002.mp3
│ └── ...
├── images/ # Step 2 生成:图像文件
│ ├── image_001.png (或 image_001_01.png, image_001_02.png ...)
│ ├── image_002.png
│ └── ...
└── subtitles.srt # Step 3 生成:字幕文件
<project_folder>/script_output.jsonscript 和 prompt 字段的数组)输出格式示例:
🎬 构建完整视频
================================
项目文件夹: /path/to/project
场景数量: 174
语言: 英文
音色: English_Gentle-voiced_man
分辨率: 1920x1080 (YouTube 横屏)
准备开始自动化构建...
使用 mcp__minimax-tts__script_batch_tts 工具批量生成音频:
工具调用参数:
{
"script_file": "<project_folder>/script_output.json",
"output_dir": "<project_folder>/audio",
"voice_id": "English_Gentle-voiced_man",
"speed": 1.2
}
重要规则:
script_file 和 output_dirscript_file 必须指向包含 script 字段的 JSON 数组文件audio_001.mp3, audio_002.mp3, ...输出示例:
🎙️ Step 1/3: 生成 TTS 音频
================================
输入文件: script_output.json (174 个场景)
输出目录: audio/
音色: English_Gentle-voiced_man
语速: 1.2x
⏳ 批量生成中... (并发数: 3)
✅ 音频生成完成
- 成功: 174/174
- 总时长: 524.3 秒 (8.7 分钟)
- 输出: audio/audio_001.mp3 ~ audio_174.mp3
使用 mcp__minimax-tts__script_batch_image_gen 工具批量生成图像:
工具调用参数:
{
"script_file": "<project_folder>/script_output.json",
"output_dir": "<project_folder>/images"
}
重要规则:
script_file 和 output_dirscript_file 必须包含 prompt 和 image_count 字段image_count 自动生成相应数量的图片image_XXX.pngimage_XXX_01.png, image_XXX_02.png, ...输出示例:
🎨 Step 2/3: 生成 AI 图像
================================
输入文件: script_output.json (174 个提示词)
输出目录: images/
模型: doubao-seedream-4-0-250828
分辨率: 2048x2048
⏳ 批量生成中... (并发数: 5)
✅ 图像生成完成
- 成功: 416/416
- 多图场景: 89 个
- 输出: images/image_001.png ~ image_174.png (或多图格式)
使用 mcp__capcut-api__jianying_draft_from_folder 工具创建草稿:
工具调用参数:
{
"project_folder": "<project_folder>",
"width": 1920,
"height": 1080
}
重要规则:
project_folder 必须是绝对路径script_output.json、audio/ 和 images/ 目录输出示例:
🎬 Step 3/3: 创建 CapCut 草稿
================================
项目文件夹: /path/to/project
草稿名称: my_project
分辨率: 1920x1080
⏳ 创建草稿...
✅ 创建草稿: my_project_1703456789_abc123
✅ 添加 416 张图片(含动画和转场)
✅ 添加 174 个音频文件
✅ 生成 SRT 字幕文件
✅ 添加字幕到草稿
✅ 保存草稿
✅ 草稿创建完成
- 草稿 ID: my_project_1703456789_abc123
- 总时长: 524.3 秒 (8.7 分钟)
- 位置: ~/Movies/JianyingPro/User Data/Projects/com.lveditor.draft/
🎉 视频构建完成!
================================
📂 项目文件夹: /path/to/project
✅ Step 1: TTS 音频生成
- 174 个音频文件
- 总时长: 524.3 秒 (8.7 分钟)
✅ Step 2: AI 图像生成
- 416 张图片(89 个多图场景)
- 分辨率: 2048x2048
✅ Step 3: CapCut 草稿创建
- 草稿 ID: my_project_1703456789_abc123
- 分辨率: 1920x1080
- 位置: ~/Movies/JianyingPro/User Data/Projects/com.lveditor.draft/
下一步操作:
1. 在 JianYing Pro (剪映) 中打开草稿
2. 预览视频效果
3. 导出最终视频
❌ 错误:项目文件夹不存在 - /path/to/project
请先运行 /video-creator:scene 和 /video-creator:prompt 命令创建项目
❌ 错误:找不到 script_output.json
路径: /path/to/project/script_output.json
请先运行以下命令生成脚本和提示词:
1. /video-creator:scene script.txt /path/to/project
2. /video-creator:prompt /path/to/project
❌ 错误:script_output.json 格式无效
- 文件必须是 JSON 数组
- 每个元素必须包含 "script" 和 "prompt" 字段
示例格式:
[
{
"index": 1,
"script": "Your brain on toxic love...",
"prompt": "A glowing brain connected to a slot machine...",
"image_count": 3
}
]
如果任何步骤失败,显示详细错误并停止执行:
❌ Step 1 失败: TTS 音频生成错误
错误详情: API rate limit exceeded
已完成步骤: 无
未完成步骤: Step 1, Step 2, Step 3
建议:
1. 检查网络连接和 API 密钥配置
2. 等待几分钟后重试
3. 查看详细错误信息进行排查
audio/ 目录已存在文件,MCP 工具会自动跳过已生成的文件images/ 目录已存在文件,MCP 工具会自动跳过已生成的文件根据场景数量估算总时间:
| 场景数 | 音频生成 | 图像生成 | 草稿创建 | 总时长 |
|---|---|---|---|---|
| 50 | ~2 分钟 | ~3 分钟 | ~1 分钟 | ~6 分钟 |
| 100 | ~4 分钟 | ~6 分钟 | ~1 分钟 | ~11 分钟 |
| 200 | ~8 分钟 | ~12 分钟 | ~2 分钟 | ~22 分钟 |
注:实际时间取决于网络速度和 API 响应时间
✅ 任务成功的标志:
script_output.jsonaudio/ 目录images/ 目录/video-creator:scene 和 /video-creator:promptEnglish_Gentle-voiced_man 音色