Loading...
Loading...
Volcengine Video Understanding - Analyze video content using Volcano Ark Video Understanding API. Upload videos via Files API (recommended), supports large files up to 512MB, applicable for video content analysis, object recognition, action understanding, etc. This skill is activated when users need to analyze videos, understand video content, or extract video information.
npx skill4agent add freestylefly/canghe-skills volcengine-video-understandingARK_API_KEYcp .canghe-skills/.env.example .canghe-skills/.env.canghe-skills/.envARK_API_KEY=your-actual-api-key-hereexport ARK_API_KEY="your-api-key"process.env.canghe-skills/.env~/.canghe-skills/.envcd ~/.openclaw/workspace/skills/volcengine-video-understanding
python3 scripts/video_understand.py /path/to/video.mp4 "Describe the content of this video"python3 scripts/video_understand.py /path/to/video.mp4 "What characters appear in the video?"python3 scripts/video_understand.py /path/to/video.mp4 "Analyze the emotional changes of the characters in the video"python3 scripts/video_understand.py /path/to/video.mp4 "Summarize the key points of the video" \
--model doubao-seed-2-0-pro-260215 \
--fps 2python3 scripts/video_understand.py /path/to/video.mp4 "Describe the video" --output result.json| Parameter | Default Value | Description |
|---|---|---|
| Required | Video file path |
| Required | Analysis instruction/question |
| doubao-seed-2-0-pro-260215 | Model ID |
| 1 | Video sampling frame rate (preprocessing) |
| - | Result output file path |
doubao-seed-2-0-pro-260215doubao-seed-2-0-lite-250728doubao-seed-1-6-251015python3 scripts/video_understand.py ~/Desktop/video.mp4 "Describe the content of this video in detail, including scenes, characters and actions"python3 scripts/video_understand.py ~/Desktop/video.mp4 "Summarize the key points of this video in 3 sentences"python3 scripts/video_understand.py ~/Desktop/video.mp4 "What actions are the characters in the video doing? Describe in chronological order"python3 scripts/video_understand.py ~/Desktop/video.mp4 "Analyze the scene changes and environmental characteristics in the video"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'{
"model": "doubao-seed-2-0-pro-260215",
"input": [
{
"role": "user",
"content": [
{
"type": "input_video",
"file_id": "file-xxxx"
},
{
"type": "input_text",
"text": "User instruction"
}
]
}
]
}| FPS | Applicable Scenarios |
|---|---|
| 0.3-0.5 | Slow-paced videos, static scenes, token saving |
| 1 | General video analysis (default) |
| 2-3 | Fast actions, detail analysis |
from scripts.video_understand import analyze_video
result = analyze_video(
file_path="/path/to/video.mp4",
instruction="Describe video content",
model="doubao-seed-2-0-pro-260215",
fps=1
)
# Extract answer
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)| Error | Cause | Solution |
|---|---|---|
| API Key error | Not set or incorrect | Check ARK_API_KEY environment variable |
| File does not exist | Wrong path | Check file path |
| Upload failed | File too large or format not supported | Check file size (<512MB) and format |
| Processing timeout | Video too long or complex | Shorten video or reduce FPS |