Communitygithub.com

AI Video Studio

Génère et assemble des actifs vidéo IA avec Seedance 2.0, Fish Audio, FFmpeg, les brouillons CapCut/Jianying, des storyboards multilingues et le pipeline scénarisé `drama`.

Qu'est-ce que AI Video Studio ?

AI Video Studio est une compétence conçue pour les agents IA (comme Claude Code) permettant de générer et d'assembler des actifs vidéo via des pipelines basés sur l'IA. Elle exploite Seedance 2.0 pour la génération de clips vidéo à partir de texte ou d'images, Fish Audio pour la synthèse vocale TTS, FFmpeg pour le rendu serveur direct (MP4), et prend en charge les brouillons CapCut/Jianying. La compétence inclut un pipeline innovant `drama` à quatre couches, qui encapsule la création complète de storyboards, de dialogues et de vidéos pour des mini-drames ou des promotions de produits. Elle propose des profils de livraison intégrés pour différents cas d'utilisation (export automobile, IP personnelle, etc.) et s'intègre à des moteurs de rendu externes comme `video_use` (montage réel), `hyperframes` (animations GSAP/HTML) ou `remotion` (modèles React). Elle est idéale pour les développeurs et les créateurs de contenu cherchant à automatiser la production vidéo multimodale, le montage et le rendu via une simple interface en ligne de commande.

Compatible avec✓Claude Code~Codex CLI~Cursor
npx skills add https://github.com/iPythoning/ai-video-studio/tree/main/skills/ai-video-studio

Demander à votre IA préférée

Ouvre une nouvelle conversation avec cette compétence d'agent déjà préchargée.

Documentation

Que fait AI Video Studio ?

AI 视频一站式工作流:Seedance 2.0 生成 + CapCut Mate 剪辑 + 云渲染导出。

核心能力

  1. AI 生成视频片段 — 通过文字/图片提示调用 Seedance 2.0 生成 5/8/11 秒视频
  2. 自动剪辑合成 — 多片段拼接、字幕叠加、转场效果、BGM
  3. 云渲染导出 — 生成最终 MP4

一条指令生成场景化视频(NEW — huobao 四层流水线)

drama 子命令封装了「剧本 → 角色/场景 → 分镜 → 渲染」完整链路,由 Sonnet 执行 + Opus advisor 自主挑选叙事模板(问题-转折-解决 / 场景蒙太奇 / 故事剧情化 / hybrid)。方法论参考 reference/huobao/(CC BY-NC-SA 4.0)。

产品推广短视频(一条指令)

python3 ~/.openclaw/workspace/skills/ai-video-studio/scripts/studio.py drama \
  --mode product \
  --idea "智能保温杯,精英通勤族的一天" \
  --scenario "晨跑/地铁/办公室/加班" \
  --highlights "12 小时保温、航空级不锈钢、一键温控" \
  --shots 6 --duration 5 --ratio 9:16 --lang zh --run

短剧(一条指令)

python3 ~/.openclaw/workspace/skills/ai-video-studio/scripts/studio.py drama \
  --mode shortdrama \
  --idea "咖啡厅偶遇前任,一句话揭开三年误会" \
  --shots 6 --duration 8 --ratio 9:16 --lang zh --run

参数

参数说明
--modeproduct 场景化产品推广 / shortdrama 短剧
--idea核心创意或产品一句话描述
--scenario使用/故事场景约束(可选),advisor 会围绕它构图
--highlightsproduct 模式的卖点列表(advisor 会自然融入剧情,不做硬广)
--shots镜头数量,默认 6
--duration每镜头时长 5/8/11 秒,默认 5
--ratio画幅,竖屏短视频建议 9:16
--advisor-callsOpus 咨询次数上限,默认 3
--run加上则立即执行 Seedance 生成 + ffmpeg 渲染,不加只产出蓝本 JSON

输出:蓝本 JSON(含 characters / scenes / shots / narrative_template / logline)保存在 $MEDIA_DIR/drama-<mode>-<ts>.json;加 --run 后继续走 pipeline 产出最终 mp4。

完整工作流(底层)

四类交付 profile 与外部渲染器

python3 ~/.openclaw/workspace/skills/ai-video-studio/scripts/studio.py profiles
python3 ~/.openclaw/workspace/skills/ai-video-studio/scripts/studio.py profiles paibao_private

内置 profile:automotive_export、paibao_private、haitun_public、personal_ip。故事板可显式使用 renderer: video_use|hyperframes|remotion 接入真实素材剪辑、HTML/GSAP 动效或 React 参数化模板;profile 不会自动选择依赖 EDL/工程目录的渲染器。

video_use 需要 edl,并要求 output 与 edl.json 同处 edit/;hyperframes 需要 project_dir;remotion 需要 project_dir、entry_point 和 composition_id。两类 Node 工程必须用 package-lock.json 锁定项目本地 CLI 并先执行 npm ci,渲染阶段不会联网补包。外部渲染器只允许从本地 pipeline CLI 显式运行,服务端/LLM 路径默认关闭。

paibao_private 对所有 renderer 都禁止故事板字幕烧录:先输出无字幕剪辑母版,再交由 paibao-course-publisher 完成 ASS、抽帧、哈希与发布门禁。

一键生成:从故事板到成品

创建一个 JSON 故事板文件,然后调用 pipeline:

# 创建故事板
cat > /tmp/storyboard.json << 'EOF'
{
  "title": "产品广告",
  "ratio": "16:9",
  "shots": [
    {"prompt": "A modern smartphone floating in space with golden particles around it, cinematic lighting", "duration": 5, "caption": "全新设计 引领未来"},
    {"prompt": "Hands holding a smartphone with holographic UI elements emerging from screen", "duration": 5, "caption": "触手可及的智能"},
    {"prompt": "Slow motion water splash revealing a smartphone, dramatic lighting", "duration": 5, "caption": "防水新境界"}
  ],
  "bgm_url": null
}
EOF

# 运行完整流程
python3 ~/.openclaw/workspace/skills/ai-video-studio/scripts/studio.py pipeline /tmp/storyboard.json

输出:最终视频文件路径(如 /root/.openclaw/media/studio-xxx.mp4)

故事板字段说明

字段类型说明
titlestring项目名称
ratiostring画面比例: 16:9, 9:16, 1:1
shots[].promptstringSeedance 生成提示词(建议英文,效果更好)
shots[].durationint每段时长: 5, 8, 11 秒
shots[].captionstring字幕文字(留空则不加字幕)
shots[].ref_imagestring?可选参考图片 URL
bgm_urlstring?可选背景音乐 URL

分步使用(灵活组合)

Step 1: 生成单个视频片段

python3 ~/.openclaw/workspace/skills/ai-video-studio/scripts/studio.py generate \
  --prompt "一只橘猫在阳光下打哈欠" \
  --ratio 16:9 \
  --duration 5

返回:视频文件路径

Step 2: 合成多个片段

python3 ~/.openclaw/workspace/skills/ai-video-studio/scripts/studio.py compose \
  --videos /root/.openclaw/media/clip1.mp4,/root/.openclaw/media/clip2.mp4 \
  --captions "第一幕,第二幕" \
  --ratio 16:9

返回:草稿 URL + 导出视频路径

Step 3: 仅用 CapCut Mate 编辑已有视频

python3 ~/.openclaw/workspace/skills/ai-video-studio/scripts/studio.py compose \
  --videos https://example.com/v1.mp4,https://example.com/v2.mp4 \
  --captions "开头,结尾" \
  --bgm https://example.com/music.mp3 \
  --ratio 9:16

FFmpeg 直出模式(推荐,默认)

pipeline 命令默认使用 ffmpeg 在服务端直出 mp4,不依赖剪映客户端。

仅渲染(跳过 Seedance,用已有片段)

python3 ~/.openclaw/workspace/skills/ai-video-studio/scripts/studio.py render   --videos clip1.mp4,clip2.mp4   --captions "第一幕,第二幕"   --bgm https://example.com/music.mp3   --ratio 16:9 --title myproject

返回:最终 mp4 文件路径

ffmpeg 渲染能力

  • 多片段拼接(自动归一化分辨率)
  • SRT 字幕烧录(白字黑边,底部居中)
  • BGM 混音(原声 100% + BGM 30%)
  • H.264 + AAC 编码,秒级渲染

pipeline 默认 ffmpeg

故事板 JSON 中 renderer 默认 ffmpeg,设 capcut 可切换为剪映草稿模式。

注意事项

  • Seedance 视频生成通常需要 3-10 分钟/片段,多片段并行提交
  • 云渲染需要剪映 API Key(通过 CAPCUT_API_KEY 环境变量设置)
  • 若无云渲染 Key,仍可生成草稿文件,手动用剪映客户端导出
  • 视频输出目录: /root/.openclaw/media/
  • 推荐中文提示词用于 Seedance,效果更好

环境变量

变量用途默认值
SEEDANCE_API_KEY豆包 Seedance API内置 fallback
CAPCUT_MATE_URLCapCut Mate 服务地址http://127.0.0.1:30000
CAPCUT_API_KEY剪映云渲染 Key(可选)无

Skills associés