# Ad Video Gen

> 将场景图和文案转为广告视频，支持叠加字幕和动效

- Skill: `lujiaheng-artpivot/ad-video-gen` (Agent Skill, multi-file: 2 files)
- Install (CLI): `npx skillmds@latest add lujiaheng-artpivot/ad-video-gen`
- Raw SKILL.md: https://api.skillmd.com/api/skills/lujiaheng-artpivot/ad-video-gen/raw
- Safety review: pending
- Works with: Claude Code, Claude.ai, OpenAI Codex
- Category: Coding & Dev Tools
- Author: lujiaheng-artpivot (https://skillmd.com/u/lujiaheng-artpivot)
- Updated: 2026-09-17
- Page: https://skillmd.com/skills/lujiaheng-artpivot/ad-video-gen

---


# 广告视频生成 Skill

使用火山引擎 Seedance 视频生成模型，将场景图和文案转为动态广告视频，支持多种运镜效果和字幕叠加。

## 使用方法

```bash
python3 scripts/generate_ad_video.py \
  --scene-image ./scene.png \
  --copy-json ./ad_copy.json \
  --motion zoom \
  --duration 15 \
  --ratio 9:16 \
  --resolution 720p \
  --add-subtitles \
  --output ./ad_video.mp4
```

## 参数说明

| 参数 | 类型 | 必填 | 说明 |
|------|------|------|------|
| `--scene-image` | string | ✅ | 场景图片路径 |
| `--copy-json` | string | ✅ | 广告文案JSON路径 |
| `--motion` | string | ✅ | 运镜效果：zoom/pan/rotate/parallax/static |
| `--duration` | number |  | 视频时长（秒），默认10 |
| `--ratio` | string |  | 视频比例：16:9/9:16/4:3/3:4/1:1，默认16:9 |
| `--resolution` | string |  | 分辨率：480p/720p/1080p，默认720p |
| `--add-subtitles` | boolean |  | 是否叠加字幕，默认false |
| `--subtitle-style` | string |  | 字幕样式：bold/minimal/neon/retro，默认bold |
| `--add-background-music` | boolean |  | 是否添加背景音乐，默认false |
| `--music-style` | string |  | 音乐风格：upbeat/relax/epic/cute，默认upbeat |
| `--output` | string |  | 输出视频路径，默认 ./ad_video.mp4 |
| `--watermark` | boolean |  | 是否添加水印，默认true |

## 运镜效果说明

| 运镜 | 说明 | 适用场景 |
|------|------|----------|
| zoom | 镜头缓慢缩放 | 突出商品细节 |
| pan | 镜头平移 | 展示全景场景 |
| rotate | 镜头轻微旋转 | 增加动态感 |
| parallax | 视差效果 | 营造立体感 |
| static | 静态画面 | 适合快切剪辑 |

## 输出文件

- 主视频文件：{output}
- 字幕文件（如果启用）：{output}.srt
- 生成日志：{output}.log

## 事件发布

生成完成后会发布 `video.generated` 事件到消息总线。

## 依赖

- ffmpeg >= 5.0（用于后期处理和字幕叠加）
- Seedance 视频生成API权限

