# Text To Video

> 使用 meitu-cli 从纯文字描述生成动态视频，覆盖高画质默认模式与高动态快速模式。当用户提到文生视频、文字生成视频、帮我生成一段视频、做一个视频、广告视频、产品宣传片、短视频时触发。

- **Type:** Skill
- **Install:** `agentstack add skill-meitu-meitu-skills-text-to-video`
- **Verified:** Yes — security-reviewed for prompt injection and unsafe behavior
- **Seller:** [meitu](https://agentstack.voostack.com/s/meitu)
- **Installs:** 0
- **Category:** [Content & Media](https://agentstack.voostack.com/c/content-and-media)
- **Latest version:** 0.1.0
- **License:** MIT
- **Upstream author:** [meitu](https://github.com/meitu)
- **Source:** https://github.com/meitu/meitu-skills/tree/main/skills/text-to-video

## Install

```sh
agentstack add skill-meitu-meitu-skills-text-to-video
```

Requires the [AgentStack CLI](https://agentstack.voostack.com/docs/cli). Works with Claude Code, Cursor, and any MCP-compatible agent.

## About

# Text To Video（文生视频）

## Overview

纯文字驱动生成动态视频，涵盖 2 类场景：

1. **高画质默认模式**：创意视频、广告素材、文案可视化、概念演示；4–15s，比例 adaptive/16:9/4:3/1:1/3:4/9:16/21:9，480p/720p，音频默认 on。
2. **高动态快速模式**：追求动态效果 / 画面生动、或需 3s 短时长；3–15s，仅 16:9/1:1/9:16，720p，音频默认 off，动态效果更强。

不处理：图片驱动生成视频、音频驱动生成、视频编辑、视频加特效/改风格。

## API Mapping

| 场景 | 后端 API |
|------|---------|
| 高画质默认模式 | `video_toffee_t2v_v20` |
| 高动态快速模式 | `video_bonbon_txt2vid_v30` |

model 映射：

- `auto`（默认）/ 不传 → 按路由规则决策
- `toffee` → `video_toffee_t2v_v20`
- `bonbon` → `video_bonbon_txt2vid_v30`
- 互相降级：一方失败切另一方重试

## Dependencies

- **meitu-cli**: `>=2.0.6`
- **凭证**：CONFIG AKSK → `meitu tools update`；EXEC AKSK → 跑命令（见根 `CONFIG.md`）
- **环境变量**：`MEITU_OPENAPI_TOOL_TASK_MODE=command`

## Core Workflow

```
Preflight → Execute → Deliver
```

### Preflight

1. `meitu --version` ≥ 2.0.6
2. `meitu auth verify --json`
3. 确认 registry 含 `text-to-video`
4. 解析 output_dir：`openclaw.yaml` → `./output/`；else → `~/.openclaw/workspace/visual/output/text-to-video/`
5. 时长钳位：用户要 600s | 降低时长 / 分辨率重试 1 次 → 仍失败返回错误 |
| 内容合规拦截 | 直接返回合规提示，不重试、不降级 |

冲突规则：
- 动态 + 特殊比例 → 比例优先，走 `video_toffee_t2v_v20`
- 3s 时长 + 默认模式 → 时长优先，走 `video_bonbon_txt2vid_v30`
- 要 480p → 走 `video_toffee_t2v_v20`（bonbon 不支持）

### Deliver

解析 `--json`：
- `ok: true` → `downloaded_files[0].saved_path` 为本地视频
- `ok: false` → 输出 `code` + `hint`

落盘：`mv {file} {output_dir}/{YYYY-MM-DD}_{descriptive-name}.mp4`

## Output

- **格式**: MP4
- **命名**: `{YYYY-MM-DD}_{descriptive-name}.mp4`
- **位置**: 项目 → `./output/`；一次性 → `~/.openclaw/workspace/visual/output/text-to-video/`

## 基线 Task ID

见根目录 `references/task-id-baseline.md` 中 `text-to-video` 条目。

## Source & license

This open-source skill is cataloged on AgentStack and links to its original source — we do not rehost the code.

- **Author:** [meitu](https://github.com/meitu)
- **Source:** [meitu/meitu-skills](https://github.com/meitu/meitu-skills)
- **License:** MIT

Install and usage instructions live in the source repository linked above.

## Pricing

- **Free** — Free

## Security capabilities

Automated source analysis of v0.1.0 — what this tool can access:

- **Network access:** no
- **Filesystem access:** no
- **Shell / process execution:** no
- **Environment & secrets:** no
- **Dynamic code execution:** no

*"Yes" means the capability is present in the source — more access means more to trust, not that it is unsafe.*


## Versions

- **0.1.0** — security scan: passed — Imported from the upstream source.

## Links

- Listing page: https://agentstack.voostack.com/l/skill-meitu-meitu-skills-text-to-video
- Seller: https://agentstack.voostack.com/s/meitu
- Browse the marketplace: https://agentstack.voostack.com/browse

---
Listed on AgentStack — the marketplace for AI agent skills and MCP servers. Every listing is security-reviewed. Creators keep 70%.
