Install
openclaw skills install @jinxuchen2020/ai-video-auto-generatorAI 短视频全自动流水线:从想法到成片,一键出视频。脚本生成→自动修复→资产生成→视频→音频→字幕,全自动无人值守。| AI video auto pipeline: from idea to final video, one command. Script generation → auto repair → assets → video → audio → subtitles, fully automated.
openclaw skills install @jinxuchen2020/ai-video-auto-generator📖 README:
README.md| CHANGELOG:CHANGELOG.md
将书面需求转换为结构化视频脚本,用于AI视频生成流水线。
目录
🔥 尝鲜(30 秒出预览,无需 API Key):
python ~/.workbuddy/skills/ai-video-auto-generator/scripts/pipeline.py \
--project ~/.workbuddy/skills/ai-video-auto-generator/sample --mode demo
💬 一句话生成视频(推荐,通过 AI Agent):
# 1. 在 WorkBuddy 中加载 ai-video-auto-generator skill
# 2. 直接告诉 AI Agent 你的需求,例如:
# "帮我做一个古代将军在现代城市醒来的短视频,紧张氛围,约30秒"
# 3. Agent 会自动:分析需求 → 生成 script.json → 跑流水线 → 出片
📌 脚本生成已由 AI Agent 接管。 之前的
--mode generate/--prompt命令已废弃,保留入口但不再执行脚本生成。所有脚本生成直接在对话中完成。
📄 从文档生成视频(通过 AI Agent):
# 直接把文件/URL/飞书链接发给 AI Agent
# Agent 会自动读取内容 → 生成 script.json → 跑流水线
📦 从模板创建(手动编辑):
python3 ~/.workbuddy/skills/ai-video-auto-generator/scripts/create_project.py \
--project "$HOME/WorkBuddy/我的视频" --template short_drama
cd "$HOME/WorkBuddy/我的视频" && python scripts/pipeline.py --mode auto
详细说明见
README.md。
你提供需求,AI Agent(当前对话)帮你搞定一切。 不需要手动调命令,直接说就好。
| 你的输入 | Agent 自动执行 |
|---|---|
"帮我做一个军事短剧,紧张氛围" | ① 解析需求 → 生成 script.json → 写回项目目录② 创建角色卡、场景卡、镜头列表 ③ 运行 --mode auto 启动流水线 |
"从这篇文章生成视频" + 贴 URL | ① WebFetch 读取文章内容 ② 分析角色/场景/情绪 → 生成 script.json③ 运行 --mode auto |
"从这份文档生成视频" + 上传文件 | ① Read 读取文档内容 ② 提取关键信息 → 生成 script.json③ 运行 --mode auto |
"帮我优化这个脚本" + 贴 JSON | ① 读取当前 script.json② 运行 fix_script_narrative 12 维修复③ 输出修复报告 |
"修一下 shot_05 的运镜问题" | ① 定位问题 ② 修改 script.json③ 通知验证结果 |
当 Agent 为你生成 script.json 时,遵循以下标准:
📋 角色卡要求:
- 每个角色必须有 name / title / appearance(clothing/physique/face/features)
- appearance 要细化到发型、脸型、瞳色、肤色、体态、着装
- 每个角色至少 front + face 两个视图,主角加 side + back
- asset_background 固定为 "white"
📋 场景卡要求:
- 每个场景有 name / description / views(广角/中景/特写)
- description 描述环境氛围(光线/色调/空间感/情绪)
📋 镜头要求(最重要):
- 每个镜头有 id / description / duration / voice_over
- description 包含: 景别 + 运镜 + 人物动作 + 环境 + 情绪
- duration 3-8 秒,总时长控制在 60-120 秒
- 前 3 个镜头要有钩子(冲突/悬念/意外)
- 高潮镜头放在总时长的 70-85% 处
- 收尾镜头要有结局感
📋 叙事结构:
- 开头抓人 → 展开 → 冲突升级 → 高潮 → 收尾
- 运镜要变化(不要连续 3+ 镜头同运镜)
- 情绪要有起伏(不要从欢快跳到悲伤)
- 对话和动作镜头比例合理(各不超过 70%)
📋 流水线触发:
- script.json 写完后,自动执行 `pipeline.py --mode auto`
- 如果项目已有 task_tracker 且部分完成,auto 会自动从断点继续
# Agent 一键出片(在对话中描述需求即可)
# 上述步骤全部由 AI Agent 自动完成
# 如果你需要手动查状态
tail -f auto.log # 查看流水线进度
AI Agent(你) → script.json → 10 阶段全自动流水线 → final.mp4
阶段 0: 脚本优化
阶段 1: 叙事结构修复(12 维)
阶段 2: 构建资产 prompt 文件
阶段 3: 角色资产生成 + 6 维质量验证(55 分制)
阶段 4: 辅助资产生成 + 质量验证
阶段 5: 场景资产生成 + 人脸检测 + 风格检测
阶段 6: 初始化首帧图
阶段 7: 首帧图生成 + 50 分制验证
阶段 8: 提交视频任务 + 验证 prompt
阶段 9: 轮询完成 + 55 分制视频验证 + 拼接 + 音频 + 字幕
全部阶段支持断点续跑。
| 资产 | 检查项 | 评分 |
|---|---|---|
| 角色图 | 文件+模糊+人物=1+背景+全身+风格 | 55 分 |
| 场景图 | Haar 人脸检测 + Canny 风格匹配 | pass/fail |
| 首帧图 | 文件+比例+模糊+HOG人数+色彩 | 50 分 |
| 视频 | 时长+比例+黑帧+光流运镜+情绪匹配 | 55 分 |
fail → classify(5 categories) → strategy(soften/switch/backoff/regen) → capped retry(max 5)
python scripts/pipeline.py --mode setup # 环境检测 + 自动装依赖 + 复制 Key 模板
python scripts/pipeline.py --mode auto # 全自动流水线(从中断继续)
python scripts/pipeline.py --mode validate # 预检(只验证不生成)
python scripts/pipeline.py --mode demo # 快速尝鲜(30 秒,无需 API Key)
python scripts/pipeline.py --mode poll --detached # 仅轮询
AI video auto pipeline: from idea to final video, one command.
Load this skill in WorkBuddy, then tell the AI agent what you want:
"Create a short video about an ancient general waking up in a modern city"
"Generate a video from this article" + paste URL
"Turn this document into a video" + upload file
The agent will:
script.json (characters, scenes, shots)pipeline.py --mode auto — fully automated pipelinefinal.mp4 is ready| Stage | Description |
|---|---|
| 0 | Script optimization |
| 1 | Narrative 12-dim auto repair (hook/pacing/camera/emotion/closure) |
| 2 | Build asset prompt files |
| 3 | Character asset generation + 6-dim quality verification (55pt) |
| 4 | Troop asset generation + verification |
| 5 | Scene asset generation + face detection + style check |
| 6 | Initialize first frames |
| 7 | First frame generation + 50pt verification |
| 8 | Submit video tasks + prompt verification |
| 9 | Poll completion + 55pt video verification (camera motion/mood/black frames) + stitch + audio + subtitles |
All stages support resume from checkpoint (Ctrl+C / crash / shutdown).
python scripts/pipeline.py --mode setup # Auto-install dependencies + copy API key template
python scripts/pipeline.py --mode auto # Full pipeline (resume from checkpoint)
python scripts/pipeline.py --mode validate # Pre-flight check (no generation)
python scripts/pipeline.py --mode demo # 30s preview, no API key needed
python scripts/pipeline.py --mode poll --detached # Poll only
--mode setup)