videogencn
Compare original and translation side by side
🇺🇸
Original
English🇨🇳
Translation
Chinesevideogencn - Chinese Video Generation Skill
videogencn - 中文视频生成Skill
Overview
概述
Generate short video clips using Chinese video models across four providers — Alibaba Cloud Bailian (Wan/PixVerse/Kling/Vidu/HappyHorse), Volcengine Ark (Jimeng/即梦), MiniMax (海螺 AI), and Tencent Hunyuan (混元).
Four modes, auto-selected from inputs:
| Mode | Inputs | Default model |
|---|---|---|
| t2v 文生视频 | prompt only | |
| i2v 图生视频 | prompt + | |
| kf2v 首尾帧 | prompt + | |
| r2v 参考生视频 | prompt + | |
Video generation is asynchronous: submit → poll every 10s → download MP4. Result URLs expire after 24h, so the script always downloads immediately.
Local images: Wan/HappyHorse accept base64 data URIs directly; PixVerse/Kling/Vidu auto-upload to DashScope OSS (48h); Jimeng/Hunyuan use base64; MiniMax uploads via its file API.
通过四家服务商的中文视频模型生成短视频片段——阿里云百炼(Wan/PixVerse/Kling/Vidu/HappyHorse)、火山引擎方舟(即梦)、MiniMax(海螺AI)以及腾讯混元。
根据输入自动选择四种模式:
| 模式 | 输入 | 默认模型 |
|---|---|---|
| t2v 文生视频 | 仅提示词 | |
| i2v 图生视频 | 提示词 + | |
| kf2v 首尾帧 | 提示词 + | |
| r2v 参考生视频 | 提示词 + | |
视频生成为异步流程:提交任务 → 每10秒轮询一次 → 下载MP4文件。结果URL会在24小时后过期,因此脚本会立即下载视频。
本地图片处理:Wan/HappyHorse直接支持base64数据URI;PixVerse/Kling/Vidu会自动上传至DashScope OSS(保留48小时);即梦/混元使用base64;MiniMax通过其文件API上传。
When to Use This Skill
何时使用该Skill
- User asks to 生成视频 / 文生视频 / 图生视频 / 首尾帧 / 参考生视频
- User names a Chinese video model: 万相/Wan, 爱诗/PixVerse, 可灵/Kling, Vidu, HappyHorse, 即梦/Jimeng, 海螺/MiniMax, 混元/Hunyuan
- User needs B-roll, animated stills, character-consistent clips, or frame transitions
- User asks about model pricing, features, or wants to compare models → open
docs/models.html
- 用户要求生成视频 / 文生视频 / 图生视频 / 首尾帧生成视频 / 参考图生成视频
- 用户提及中文视频模型:万相/Wan、爱诗/PixVerse、可灵/Kling、Vidu、HappyHorse、即梦/Jimeng、海螺/MiniMax、混元/Hunyuan
- 用户需要B-roll镜头、静态图片动效、角色一致的片段或帧过渡效果
- 用户询问模型定价、功能,或想要对比模型 → 打开
docs/models.html
Workflow
工作流程
Step 0: Prompt Refinement (interactive)
步骤0:提示词优化(交互式)
Run for t2v/i2v unless skipped (see §0.4). Claude polishes the user's prompt before generation.
除非跳过,否则针对t2v/i2v模式执行(见§0.4)。Claude会在生成前优化用户的提示词。
0.1 Analyze the raw input
0.1 分析原始输入
| Dimension | Check |
|---|---|
| Subject | Who/what? Appearance, action, expression |
| Scene | Where? Background, environment, atmosphere |
| Lighting | Time of day? Light quality? (golden hour, neon, soft diffused, backlit) |
| Camera | Shot type? (close-up, wide, aerial, tracking). Movement? (push-in, pan, orbit) |
| Mood/Style | Emotional tone? Visual style? (cinematic, anime, documentary, surreal) |
| Motion | What moves? How? Speed, direction, dynamics |
| Temporal | Any sequence? Beginning→middle→end? |
| 维度 | 检查内容 |
|---|---|
| 主体 | 谁/什么?外观、动作、表情 |
| 场景 | 地点?背景、环境、氛围 |
| 光线 | 一天中的时段?光线类型?(黄金时段、霓虹、柔和漫射、逆光) |
| 镜头 | 镜头类型?(特写、广角、航拍、跟拍)。镜头运动?(推近、摇移、环绕) |
| 情绪/风格 | 情感基调?视觉风格?(电影感、动漫、纪录片、超现实主义) |
| 动态 | 什么在动?如何动?速度、方向、动态效果 |
| 时序 | 是否有序列?开头→中间→结尾? |
0.2 Generate three refined variants
0.2 生成三个优化版本
Present 3 variants in a table:
| # | 风格方向 | 优化后提示词 | 建议参数 |
|---|---------|-------------|---------|
| 1 | [风格名] | [完整中文提示词] | 5s / 16:9 / 1080P |
| 2 | [风格名] | [完整中文提示词] | 8s / 16:9 / 1080P |
| 3 | [风格名] | [完整中文提示词] | 5s / 9:16 / 1080P |- Variant 1: 忠于原意 — preserve core idea, add cinematic detail
- Variant 2: 创造性发散 — different artistic interpretation
- Variant 3: 实用主义 — optimized for vertical short-video
Prompt writing rules:
- Write in Chinese; front-load subject + action (first 20 chars matter most)
- Concrete visual nouns ("金色麦田") not abstract concepts ("丰收的感觉")
- Describe motion explicitly ("缓缓推近", "随风飘动")
- Add camera/lighting cues at the end ("电影感镜头", "逆光剪影")
- Keep within 150 characters
- Wan 2.7 multi-shot: format
第N个镜头[N-Ns]: 描述
以表格形式呈现3个版本:
| 序号 | 风格方向 | 优化后提示词 | 建议参数 |
|---|---------|-------------|---------|
| 1 | [风格名] | [完整中文提示词] | 5秒 / 16:9 / 1080P |
| 2 | [风格名] | [完整中文提示词] | 8秒 / 16:9 / 1080P |
| 3 | [风格名] | [完整中文提示词] | 5秒 / 9:16 / 1080P |- 版本1:忠于原意 — 保留核心想法,添加电影感细节
- 版本2:创造性发散 — 不同的艺术解读
- 版本3:实用主义 — 针对竖屏短视频优化
提示词撰写规则:
- 使用中文;将主体+动作前置(前20个字符最重要)
- 使用具体的视觉名词(如“金色麦田”)而非抽象概念(如“丰收的感觉”)
- 明确描述动态(如“缓缓推近”、“随风飘动”)
- 在末尾添加镜头/光线提示(如“电影感镜头”、“逆光剪影”)
- 控制在150字符以内
- Wan 2.7多镜头格式:
第N个镜头[N-N秒]: 描述
0.3 User feedback loop
0.3 用户反馈循环
| User says | Action |
|---|---|
| "用第N个" / "N" | Use variant N as-is |
| "更诗意" / "更浪漫" | Regenerate with poetic tone |
| "更简洁" | Strip to essentials |
| "加动态元素" | Add more motion/action |
| "改为夜景" / "下雪" / etc | Apply scene change to all variants |
| "混合1和3" | Combine subject of 1 with style of 3 |
| "直接用" / "不改了" | Skip refinement |
| Custom feedback | Apply and regenerate |
Iterate until the user explicitly approves ("好", "可以", "用这个", "生成吧").
| 用户表述 | 操作 |
|---|---|
| "用第N个" / "N" | 直接使用第N个版本 |
| "更诗意" / "更浪漫" | 以诗意基调重新生成 |
| "更简洁" | 精简至核心内容 |
| "加动态元素" | 添加更多动态/动作描述 |
| "改为夜景" / "下雪" / 其他 | 将场景修改应用到所有版本 |
| "混合1和3" | 将版本1的主体与版本3的风格结合 |
| "直接用" / "不改了" | 跳过优化 |
| 自定义反馈 | 应用反馈后重新生成 |
迭代直到用户明确确认(“好”、“可以”、“用这个”、“生成吧”)。
0.4 Skip conditions
0.4 跳过条件
Skip refinement when user says "直接生成" / "不用优化" / "skip", the prompt is already detailed (>80 chars), or mode is kf2v/r2v.
当用户说“直接生成” / “不用优化” / “skip”,提示词已经足够详细(超过80字符),或模式为kf2v/r2v时,跳过优化步骤。
Step 1: Decide mode, provider, and model
步骤1:确定模式、服务商和模型
- Mode: auto-detected from inputs (t2v / i2v / kf2v / r2v)
- Provider: or auto-detect from model name
--provider {bailian,jimeng,minimax,hunyuan} - Model: flag, or provider default for the mode
--model - Parameters: duration, resolution, ratio from variant suggestion or user override
- 模式:根据输入自动检测(t2v / i2v / kf2v / r2v)
- 服务商:或根据模型名称自动检测
--provider {bailian,jimeng,minimax,hunyuan} - 模型:参数,或对应模式下的服务商默认模型
--model - 参数:时长、分辨率、比例来自版本建议或用户自定义
Step 2: Confirm and generate
步骤2:确认并生成
Show the final command and confirm with the user. Run the script; it blocks until the task finishes and saves the MP4.
展示最终命令并与用户确认。运行脚本;脚本会阻塞直到任务完成并保存MP4文件。
Step 3: Deliver
步骤3:交付
Report output path, file size, and generation time. Save to cwd if no path given.
Cost note: video APIs bill per second of output. Confirm with user for long/many clips.
报告输出路径、文件大小和生成时间。如果未指定路径,则保存到当前工作目录。
成本说明:视频API按输出时长计费。生成较长或多个片段时需与用户确认。
Providers
服务商
Alibaba Bailian 百炼
阿里云百炼
One API key () covers 5 model families. Third-party models (PixVerse/Kling/Vidu/HappyHorse) are cn region only. Models: Wan (t2v/i2v, up to 15s), PixVerse (all 4 modes, 1-15s), Kling (t2v/i2v/kf2v + r2v on omni), Vidu (q3: 1-16s with audio; q2: 1-10s), HappyHorse (t2v/i2v, 3-15s).
DASHSCOPE_API_KEY一个API密钥()可覆盖5个模型系列。第三方模型(PixVerse/Kling/Vidu/HappyHorse)仅支持中国区。模型包括:Wan(文生/图生视频,最长15秒)、PixVerse(支持所有4种模式,1-15秒)、Kling(文生/图生/首尾帧视频 + 全模式参考生视频)、Vidu(q3版本:1-16秒带音频;q2版本:1-10秒)、HappyHorse(文生/图生视频,3-15秒)。
DASHSCOPE_API_KEYVolcengine Ark (Jimeng 即梦)
火山引擎方舟(即梦)
ARK_API_KEYhttps://ark.cn-beijing.volces.com/api/v3通过获取。Seedance 2.0:文生/图生视频最长15秒/2K分辨率,支持音频、唇形同步和镜头运动。比例:16:9、9:16、1:1、21:9。
https://ark.cn-beijing.volces.com/api/v3ARK_API_KEYMiniMax 海螺 AI
MiniMax 海螺AI
MINIMAX_API_KEYhttps://api.minimax.chatvideo-01--no-prompt-optimizerMINIMAX_API_BASEhttps://api.minimaxi.comhttps://api.minimax.io通过获取。MiniMax-H3(海螺3.0):文生/图生视频,4-15秒,768P/1080P(通过直接API支持2K),24fps带原生立体声。旧版:720P分辨率最长6秒,默认启用提示词优化器(使用关闭)。主机地址自定义:(例如中国区 / 国际区)。
https://api.minimax.chatMINIMAX_API_KEYvideo-01--no-prompt-optimizerMINIMAX_API_BASEhttps://api.minimaxi.comhttps://api.minimax.ioTencent Hunyuan 混元
腾讯混元
HUNYUAN_API_KEY--duration--seed--resolution--ratio--audio--camera-motion通过TokenHub获取。hy-video-1.5:文生/图生视频(5-10秒,720P,支持/)。实验性仅图生视频模型:yt-video-2.0、yt-video-fx、yt-video-humanactor。、、、参数暂不支持。
HUNYUAN_API_KEY--duration--seed--resolution--ratio--audio--camera-motionModel Selection Guide
模型选择指南
| Use case | Model | Provider |
|---|---|---|
| Best quality t2v, multi-shot | | Bailian |
| Fast action / combat | | Bailian |
| Smart storyboard + audio | | Bailian |
| Long clips up to 16s + audio | | Bailian |
| Douyin/XHS short-video | | Jimeng |
| Smooth motion, natural physics | | MiniMax |
| Animate an image (default) | | Bailian |
| Transition between two frames | | Bailian |
| Character/subject consistency | | Bailian |
| Cheap drafts | | Bailian |
| Chinese t2v/i2v on Tencent | | Hunyuan |
| Portrait animation (experimental) | | Hunyuan |
Run for the full model catalog.
python scripts/generate_video.py --list-models| 使用场景 | 模型 | 服务商 |
|---|---|---|
| 最佳质量文生视频、多镜头 | | 百炼 |
| 快速动作/战斗场景 | | 百炼 |
| 智能分镜+音频 | | 百炼 |
| 最长16秒片段+音频 | | 百炼 |
| 抖音/小红书短视频 | | 即梦 |
| 流畅动态、自然物理效果 | | MiniMax |
| 图片动效(默认) | | 百炼 |
| 两帧之间过渡 | | 百炼 |
| 角色/主体一致性 | | 百炼 |
| 低成本草稿 | | 百炼 |
| 腾讯平台中文文生/图生视频 | | 混元 |
| 人像动效(实验性) | | 混元 |
运行查看完整模型目录。
python scripts/generate_video.py --list-modelsModel Comparison Page
模型对比页面
When the user wants to compare models, browse pricing, filter by features, or pick a model:
Open in the browser. It's a self-contained static page — no server needed. Use (macOS) or (Linux):
docs/models.htmlopenxdg-openbash
open docs/models.htmlThe page supports filtering by provider, mode (文生/图生/首尾帧/参考生), and features (audio/camera/multi-shot), with pricing and capability comparison across all 24 models.
当用户想要对比模型、查看定价、按功能筛选或选择模型时:
在浏览器中打开。这是一个独立的静态页面——无需服务器。在macOS使用命令,Linux使用命令:
docs/models.htmlopenxdg-openbash
open docs/models.html该页面支持按服务商、模式(文生/图生/首尾帧/参考生)和功能(音频/镜头/多镜头)筛选,包含所有24个模型的定价和能力对比。
Usage
使用方法
bash
undefinedbash
undefinedText-to-Video (Bailian default)
文生视频(默认百炼)
python scripts/generate_video.py "一只柴犬在樱花树下奔跑,花瓣随风飘落,电影感镜头" shiba.mp4
--duration 5 --resolution 1080P --ratio 16:9
--duration 5 --resolution 1080P --ratio 16:9
python scripts/generate_video.py "一只柴犬在樱花树下奔跑,花瓣随风飘落,电影感镜头" shiba.mp4
--duration 5 --resolution 1080P --ratio 16:9
--duration 5 --resolution 1080P --ratio 16:9
Image-to-Video
图生视频
python scripts/generate_video.py "镜头缓缓推近,人物微笑" out.mp4 --image portrait.png
python scripts/generate_video.py "镜头缓缓推近,人物微笑" out.mp4 --image portrait.png
First+Last Frame (kf2v)
首尾帧生成视频(kf2v)
python scripts/generate_video.py "花苞缓缓绽放成盛开的牡丹" bloom.mp4
--image bud.png --last-frame bloom.png
--image bud.png --last-frame bloom.png
python scripts/generate_video.py "花苞缓缓绽放成盛开的牡丹" bloom.mp4
--image bud.png --last-frame bloom.png
--image bud.png --last-frame bloom.png
Reference-to-Video (r2v)
参考图生成视频(r2v)
python scripts/generate_video.py "@girl 在 @cafe 里弹吉他" out.mp4
--ref girl=girl.png --ref cafe=cafe.jpg
--ref girl=girl.png --ref cafe=cafe.jpg
python scripts/generate_video.py "@girl 在 @cafe 里弹吉他" out.mp4
--ref girl=girl.png --ref cafe=cafe.jpg
--ref girl=girl.png --ref cafe=cafe.jpg
Other providers
其他服务商
python scripts/generate_video.py "城市日落延时摄影" sunset.mp4 --provider jimeng --duration 10
python scripts/generate_video.py "海浪拍打礁石" ocean.mp4 --provider minimax --duration 6
python scripts/generate_video.py "金黄色的麦田在秋风中起伏" field.mp4 --provider hunyuan --duration 5
python scripts/generate_video.py "城市日落延时摄影" sunset.mp4 --provider jimeng --duration 10
python scripts/generate_video.py "海浪拍打礁石" ocean.mp4 --provider minimax --duration 6
python scripts/generate_video.py "金黄色的麦田在秋风中起伏" field.mp4 --provider hunyuan --duration 5
Dry-run: preview request + cost estimate without submitting
试运行:预览请求和成本估算,不提交任务
python scripts/generate_video.py "一只柴犬在樱花树下奔跑" --dry-run
python scripts/generate_video.py "一只柴犬在樱花树下奔跑" --dry-run
Schema introspection (for agents)
模式 introspection(供Agent使用)
python scripts/generate_video.py schema providers # list all providers
python scripts/generate_video.py schema bailian # list bailian models with capabilities
python scripts/generate_video.py schema providers # 列出所有服务商
python scripts/generate_video.py schema bailian # 列出百炼模型及其能力
JSON output (auto-detected when stdout is not a TTY; force with --format)
JSON输出(当标准输出不是TTY时自动检测;使用--format强制设置)
python scripts/generate_video.py --list-models --format json
python scripts/generate_video.py "海边的日落" out.mp4 --format json --provider jimeng
python scripts/generate_video.py --list-models --format json
python scripts/generate_video.py "海边的日落" out.mp4 --format json --provider jimeng
Resume a task
恢复任务
python scripts/generate_video.py --task-id <task-id> out.mp4
python scripts/generate_video.py --task-id <task-id> out.mp4
List all models
列出所有模型
python scripts/generate_video.py --list-models
undefinedpython scripts/generate_video.py --list-models
undefinedOptions
参数选项
| Flag | Meaning | Default |
|---|---|---|
| | auto-detect |
| model name | auto by mode |
| first-frame image (path/URL) → i2v | — |
| last-frame image → kf2v (requires | — |
| reference image | — |
| seconds | 5 |
| 360P/480P/540P/720P/1080P | 1080P |
| 16:9 / 9:16 / 1:1 / 3:4 / 4:3 / 21:9 | 16:9 |
| exact | from resolution+ratio |
| negative prompt (Wan only) | — |
| disable prompt rewriting (Wan only) | extend on |
| disable built-in prompt optimizer (MiniMax only) | optimizer on |
| enable audio on PixVerse/Kling/Vidu/Jimeng | off |
| silent output on Wan audio models | audio on |
| camera motion (Jimeng Seedance 2.0 only) | — |
| reproducibility | random |
| resume polling an existing task | — |
| preview request body + cost estimate, no submit | — |
| | auto |
| list models and exit | — |
| introspection: | — |
| 参数 | 含义 | 默认值 |
|---|---|---|
| | 自动检测 |
| 模型名称 | 根据模式自动选择 |
| 首帧图片(路径/URL)→ 图生视频 | — |
| 尾帧图片 → 首尾帧生成视频(需配合 | — |
| 参考图片 | — |
| 时长(秒) | 5 |
| 360P/480P/540P/720P/1080P | 1080P |
| 16:9 / 9:16 / 1:1 / 3:4 / 4:3 / 21:9 | 16:9 |
| 基于尺寸的模型的精确 | 由分辨率和比例计算得出 |
| 负面提示词(仅Wan支持) | — |
| 关闭提示词重写(仅Wan支持) | 开启重写 |
| 关闭内置提示词优化器(仅MiniMax支持) | 开启优化器 |
| 在PixVerse/Kling/Vidu/即梦上启用音频 | 关闭 |
| 在Wan音频模型上生成无音视频 | 开启音频 |
| 镜头运动(仅即梦Seedance 2.0支持) | — |
| 可重复性种子 | 随机 |
| 恢复轮询现有任务 | — |
| 预览请求体和成本估算,不提交任务 | — |
| | 自动检测 |
| 列出所有模型并退出 | — |
| 内省: | — |
Requirements
依赖要求
bash
pip install requestsbash
pip install requestsEnvironment Variables
环境变量
| Variable | Required | Provider | Purpose |
|---|---|---|---|
| yes (Bailian) | Bailian | https://bailian.console.aliyun.com/ |
| no | Bailian | |
| no | Bailian | default model override |
| yes (Jimeng) | Jimeng | https://console.volcengine.com/ark/ |
| yes (MiniMax) | MiniMax | https://platform.minimax.io |
| no | MiniMax | API host override (CN: |
| yes (Hunyuan) | Hunyuan | https://console.cloud.tencent.com/hunyuan |
Third-party Bailian models are cn region only.
| 变量 | 是否必填 | 服务商 | 用途 |
|---|---|---|---|
| 是(百炼) | 百炼 | https://bailian.console.aliyun.com/ |
| 否 | 百炼 | |
| 否 | 百炼 | 覆盖默认模型 |
| 是(即梦) | 即梦 | https://console.volcengine.com/ark/ |
| 是(MiniMax) | MiniMax | https://platform.minimax.io |
| 否 | MiniMax | API主机地址自定义(中国区: |
| 是(混元) | 混元 | https://console.cloud.tencent.com/hunyuan |
百炼第三方模型仅支持中国区。