release-skills
Universal release workflow. Auto-detects version files and changelogs. Supports Node.js, Python, Rust, Claude Plugin, and generic…
火山视频理解 - 使用火山方舟视频理解 API 分析视频内容。通过 Files API 上传视频(推荐),支持大文件(最大512MB),可用于视频内容分析、物体识别、动作理解等。当用户需要分析视频、理解视频内容、提取视频信息时激活此技能。
$ npx -y skills add freestylefly/canghe-skills --skill canghe-volcengine-video-understanding --agent claude-codeHow it fires
How this skill gets triggered: by you, by Claude, or both.
/canghe-volcengine-video-understandingContext preview
The summary Claude sees to decide when to auto-load this skill.
火山视频理解 - 使用火山方舟视频理解 API 分析视频内容。通过 Files API 上传视频(推荐),支持大文件(最大512MB),可用于视频内容分析、物体识别、动作理解等。当用户需要分析视频、理解视频内容、提取视频信息时激活此技能。
name: volcengine-video-understanding description: 火山视频理解 - 使用火山方舟视频理解 API 分析视频内容。通过 Files API 上传视频(推荐),支持大文件(最大512MB),可用于视频内容分析、物体识别、动作理解等。当用户需要分析视频、理解视频内容、提取视频信息时激活此技能。
使用字节跳动火山方舟视频理解 API(doubao-seed-2-0-pro-260215 等模型)对视频进行深度理解和分析。
**推荐方式**:Files API 上传 + Responses API 分析
需要设置 `ARK_API_KEY` 环境变量。
1. 复制配置模板:
cp .canghe-skills/.env.example .canghe-skills/.env
2. 编辑 `.canghe-skills/.env` 文件,填写你的 API Key:
ARK_API_KEY=your-actual-api-key-here
export ARK_API_KEY="your-api-key"
1. 系统环境变量 (`process.env`) 2. 当前目录 `.canghe-skills/.env` 3. 用户主目录 `~/.canghe-skills/.env`
cd ~/.openclaw/workspace/skills/volcengine-video-understanding python3 scripts/video_understand.py /path/to/video.mp4 "描述这个视频的内容"
python3 scripts/video_understand.py /path/to/video.mp4 "视频中出现了哪些人物?"
python3 scripts/video_understand.py /path/to/video.mp4 "分析视频中人物的情感变化"
python3 scripts/video_understand.py /path/to/video.mp4 "总结视频要点" \ --model doubao-seed-2-0-pro-260215 \ --fps 2
python3 scripts/video_understand.py /path/to/video.mp4 "描述视频" --output result.json
| 参数 | 默认值 | 说明 | |------|--------|------| | `video_path` | 必填 | 视频文件路径 | | `instruction` | 必填 | 分析指令/问题 | | `--model` | doubao-seed-2-0-pro-260215 | 模型 ID | | `--fps` | 1 | 视频采样帧率(预处理) | | `--output` | - | 结果输出文件路径 |
python3 scripts/video_understand.py ~/Desktop/video.mp4 "详细描述这个视频的内容,包括场景、人物和动作"
python3 scripts/video_understand.py ~/Desktop/video.mp4 "用3句话总结这个视频的要点"
python3 scripts/video_understand.py ~/Desktop/video.mp4 "视频中的人物在做什么动作?按时间顺序描述"
python3 scripts/video_understand.py ~/Desktop/video.mp4 "分析视频中的场景变化和环境特征"
1. **上传视频**:通过 Files API 上传本地视频文件,指定 FPS 预处理配置 2. **等待处理**:等待视频预处理完成(状态变为 processed) 3. **创建任务**:调用 Responses API 进行视频理解 4. **获取结果**:返回分析结果
**Files API 上传**:
curl https://ark.cn-beijing.volces.com/api/v3/files \ -H "Authorization: Bearer $ARK_API_KEY" \ -F 'purpose=user_data' \ -F 'file=@video.mp4' \ -F 'preprocess_configs[video][fps]=1'
**Responses API 分析**:
{
"model": "doubao-seed-2-0-pro-260215",
"input": [
{
"role": "user",
"content": [
{
"type": "input_video",
"file_id": "file-xxxx"
},
{
"type": "input_text",
"text": "用户指令"
}
]
}
]
}| FPS | 适用场景 | |-----|----------| | 0.3-0.5 | 慢节奏视频、静态场景、节省token | | 1 | 一般视频分析(默认) | | 2-3 | 快速动作、细节分析 |
from scripts.video_understand import analyze_video
result = analyze_video(
file_path="/path/to/video.mp4",
instruction="描述视频内容",
model="doubao-seed-2-0-pro-260215",
fps=1
)
# 提取回答
text = ""
for item in result.get("output", []):
if item.get("type") == "message":
for content in item.get("content", []):
if content.get("type") == "output_text":
text = content.get("text", "")
break
print(text)常见错误及解决方案:
| 错误 | 原因 | 解决方案 | |------|------|----------| | API Key 错误 | 未设置或错误 | 检查 ARK_API_KEY 环境变量 | | 文件不存在 | 路径错误 | 检查文件路径 | | 上传失败 | 文件过大或格式不支持 | 检查文件大小(<512MB)和格式 | | 处理超时 | 视频过长或复杂 | 缩短视频或降低 FPS |
Skills shared by Canghe for improving daily work efficiency with Claude Code.
Universal release workflow. Auto-detects version files and changelogs. Supports Node.js, Python, Rust, Claude Plugin, and generic…
Analyzes article structure, identifies positions requiring visual aids, generates illustrations with Type × Style two-dimension…
Knowledge comic creator supporting multiple art styles and tones. Creates original educational comics with detailed panel layouts…
Compresses images to WebP (default) or PNG with automatic tool selection. Use when user asks to "compress image", "optimize…
Generates article cover images with 5 dimensions (type, palette, rendering, text, mood) combining 9 color palettes and 6…
Generates images and text via reverse-engineered Gemini Web API. Supports text generation, image generation from prompts,…