使用 html-video 引擎从 content-graph 和模板生成视频。支持 23+ 模板、多种画面比例、变量注入、逐帧渲染、全项目导出。TTS/BGM 由 openclaw MiniMax 扩展提供,不使用 html-video 内置音频。
65
80%
Does it follow best practices?
Run evals on this skill
Adds up to 20 points to the overall score
View guide
Low
Low-risk findings worth noting
Fix and improve this skill with Tessl
tessl review fix ./crews/content-producer/skills/html-video/SKILL.md基于 html-video 引擎的视频生成技能。核心能力:
TTS/BGM 说明:音频生成由 openclaw 的 MiniMax 扩展提供(speech-2.8-hd / music-2.6),不使用 html-video 内置的 MiniMax provider。生成后的音频文件作为项目资产注入 html-video 的 applySoundtrack。
⚠️ 调用规范(必须遵守)
- 必须通过
./skills/html-video/scripts/hv.sh <command>调用,hv.sh 内部自动解析 CLI 路径并exec node- 禁止直接
node .../bin.js— 路径易错且绕过 allowlist- 禁止
python3 .../bin.js— bin.js 是 ESM JavaScript,不是 Python 脚本- 禁止
bash hv.sh或绝对路径调用 — 使用工作区相对路径./skills/html-video/scripts/hv.sh- 禁止直接
ffmpeg/ffprobe— 由 hv.sh 内部 subprocess 调用,agent 直接调有 CPU 卡死风险
所有操作通过 hv.sh 包装脚本调用:
# 环境检查
./skills/html-video/scripts/hv.sh doctor
# 模板搜索
./skills/html-video/scripts/hv.sh search-templates --intent "title animation"
# 查看模板详情
./skills/html-video/scripts/hv.sh inspect-template frame-glitch-title
# 项目管理
./skills/html-video/scripts/hv.sh project-create --name "my-video" --aspect "9:16"
./skills/html-video/scripts/hv.sh project-set-template <project-id> --template <template-id>
./skills/html-video/scripts/hv.sh project-set-var <project-id> --key title --value '"文案"'
./skills/html-video/scripts/hv.sh project-set-var <project-id> --key duration_sec --value 4
# 渲染
./skills/html-video/scripts/hv.sh project-render <project-id> --output /path/to/output.mp4
# 项目查询
./skills/html-video/scripts/hv.sh project-list
./skills/html-video/scripts/hv.sh project-show <project-id>| 比例 | 分辨率 | 典型场景 |
|---|---|---|
9:16 | 1080×1920 | 短视频、竖屏(默认) |
16:9 | 1920×1080 | 横屏视频、YouTube |
1:1 | 1080×1080 | Instagram 方形 |
4:5 | 1080×1350 | Instagram 竖屏 |
创建项目时通过 --aspect 指定,未指定默认 9:16。
分析脚本内容,自行决定分段,生成 content-graph.json:
{
"schemaVersion": 1,
"intent": "promo",
"synopsis": "视频概要",
"nodes": [
{
"id": "hook-title",
"kind": "text",
"frameIntent": "intro",
"durationSec": 4,
"templateRef": "frame-glitch-title",
"variables": { "title": "...", "subtitle": "..." },
"hasTts": true,
"ttsText": "配音文案"
},
{
"id": "product-clip",
"kind": "entity",
"frameIntent": "image-pan",
"durationSec": 8,
"templateRef": "video-clip-916",
"variables": { "videoSrc": "assets/clip.mp4" },
"hasTts": true,
"ttsText": "产品介绍文案"
}
],
"edges": [
{ "from": "hook-title", "to": "product-clip", "kind": "sequence" }
]
}素材类节点(如 video-clip)需要先获取素材 MP4:
获取优先级(按顺序尝试,成功即停):
assets/ 中已有对应素材 → 直接使用video_generate 工具:根据画面需求撰写 prompt,生成后验证时长siliconflow-video-gen:AI 视频生成(每次 5 秒,可能需多次生成后拼接)
⚠️:siliconflow-video-gen只要失败一次,第二次马上降级使用pexels-footage或者pixabay-footage,绝不允许连续多次调用siliconflow-video-gen,以避免触发系统锁死pixabay-footage:从 Pixabay 免费素材库搜索下载pexels-footage:Pixabay 无合适结果时,从 Pexels 搜索下载素材下载规则:
--max-clips=1--min-duration 和 --max-duration,不下载远超需求的素材duration 字段所有节点的变量通过 project-set-var 注入 html-video 项目。素材节点的 videoSrc 替换为 Step 2 获取的 clip.mp4 路径,duration 替换为 ffprobe 检测的实际时长。
tts 工具调用MINIMAX_CODE_PLAN_KEYsiliconflow-tts 技能调用,详见 siliconflow-tts/SKILL.mdmusic_generate 工具调用applySoundtrack 负责最终混音./skills/html-video/scripts/hv.sh project-render <project-id> --output final/video.mp4html-video 自动完成:逐帧渲染 → 帧拼接 → 音频混合。
| 模板 ID | 名称 | 时长 | 适用场景 |
|---|---|---|---|
frame-glitch-title | Glitch Title | 3-8s | 科技产品揭示、赛博朋克风格 |
frame-kinetic-type | Kinetic Type | 3-30s | 推广标题、醒目声明 |
frame-bold-poster | Bold Poster | 4-6s | 品牌宣言、杂志封面式开场 |
frame-bold-signal | Bold Signal | 3-6s | 章节分隔、强冲击标题卡 |
frame-build-minimal | Build Minimal | 4-7s | 高端产品/品牌 hero、优雅标题卡 |
frame-creative-voltage | Creative Voltage | 3-6s | 活力品牌/活动标题、手绘风格 |
frame-electric-studio | Electric Studio | 3-6s | 引用/证言揭示、使命声明卡 |
frame-warm-grain | Warm Grain | 3-30s | 产品发布、生活方式品牌 |
frame-swiss-grid | Swiss Grid | 3-30s | 企业幻灯片、极简报告卡 |
frame-vignelli | Vignelli | 3-30s | 社交竖屏、醒目声明卡 |
vfx-text-cursor | Text + Cursor VFX | 3-10s | 代码演示开场、科技叙事 |
| 模板 ID | 名称 | 时长 | 适用场景 |
|---|---|---|---|
frame-data-chart-nyt | NYT Data Chart | 5-20s | 编辑数据可视化、年报、对比揭示 |
frame-data-rollup | Data Rollup | 3-8s | 数据动画、周报指标、增长柱状图 |
frame-nyt-graph | NYT Graph | 3-30s | 新闻式统计揭示、折线图 |
frame-pentagram-stat | Pentagram Stat | 3-6s | 单一核心指标/基准揭示、编辑数据幻灯 |
| 模板 ID | 名称 | 时长 | 适用场景 |
|---|---|---|---|
frame-product-promo | Product Promo | 3-30s | 产品展示、多功能轮播、hero 推广 |
frame-product-promo-30s | Product Promo · 30s | 25-35s | 30 秒产品推广、B2B SaaS 发布 |
frame-liquid-bg-hero | Liquid Background Hero | 4-12s | 产品发布 hero、SaaS 落地视频 |
frame-play-mode | Play Mode | 3-30s | 轻松社交广告、休闲开场 |
| 模板 ID | 名称 | 时长 | 适用场景 |
|---|---|---|---|
frame-decision-tree | Decision Tree | 3-30s | 操作流程、决策分支 |
frame-takram-organic | Takram Organic | 4-7s | 系统/架构概念揭示、温暖产品故事 |
frame-light-leak-cinema | Light Leak Cinema | 4-10s | 电影感开场、纪录片冷开场 |
| 模板 ID | 名称 | 时长 | 适用场景 |
|---|---|---|---|
video-clip-916 | Video Clip 9:16 | 由素材时长决定 | 9:16 竖屏素材视频播放、片段嵌入 |
本地 workspace 模板(
templates/目录下)使用<name>-<aspect>命名,由registry.py解析。html-video CLI 模板使用frame-前缀。在 content-graph 的templateRef中使用对应的模板 ID。
| 模板 ID | 名称 | 时长 | 适用场景 |
|---|---|---|---|
frame-logo-outro | Logo Outro Frame | 3-10s | 视频结尾卡、品牌 outro、频道签退 |
模板选择提示:使用
hv.sh search-templates --intent "<意图>"搜索最匹配的模板。例如--intent "product launch"会推荐frame-liquid-bg-hero和frame-product-promo。
| 变量 | 必需 | 说明 |
|---|---|---|
MINIMAX_CODE_PLAN_KEY | 推荐 | MiniMax TokenPlan 订阅 key(openclaw 扩展自动识别) |
SILICONFLOW_API_KEY | fallback | SiliconFlow TTS 备选 |
HTML_VIDEO_CLI | 可选 | html-video CLI 路径(默认自动查找) |
bcef823
If you maintain this skill, you can claim it as your own. Once claimed, you can manage eval scenarios, bundle related skills, attach documentation or rules, and ensure cross-agent compatibility.