volcengine-video-understanding
Volcano Video Understanding - Analyzes video content using the Volcano Engine Ark Video Understanding API. Uploads videos via the Files API (recommended) with support for large files (up to 512MB), suitable for video content analysis, object recognition, action understanding, and more. Activate this skill when users need to analyze videos, understand video content, or extract information from videos.
1How It Works & Mechanism
Sends local video to ByteDance Volcano Ark's Video Understanding API, leveraging Seed series models for in-depth understanding and analysis.
使用字节跳动火山方舟视频理解 API(doubao-seed-2-0-pro-260215 等模型)对视频进行深度理解和分析。
The recommended workflow is a two-step process: upload via Files API + analyze via Responses API.
**推荐方式**:Files API 上传 + Responses API 分析
The upload uses multipart format and carries preprocessing FPS configuration.
"preprocess_configs[video][fps]": str(fps)
Polls file status after upload, proceeding only when it reaches active/processed.
if status in ["active", "processed"]:
The understanding task uses the Responses API, submitting input_video(file_id) together with input_text(instruction).
"type": "input_video",
Authentication relies on the environment variable ARK_API_KEY (system environment -> current directory .env -> user home directory .env).
return require_env_key("ARK_API_KEY")
Results can be parsed as text and saved to disk as JSON via --output.
with open(args.output, 'w', encoding='utf-8') as f:
Default model and sampling frame rate are configurable (default: doubao-seed-2-0-pro-260215 / fps=1).
| `--fps` | 1 | 视频采样帧率(预处理) |
2Core Capabilities
3External Dependencies
| Kind | Dependency / Endpoint |
|---|---|
| api | 火山方舟视频理解 API(Files / Responses),模型 doubao-seed-2-0-pro-260215 等 |
| package | requests(HTTP 客户端) |
| cli | python3(运行 video_understand.py) |
4Recommended Governance & Evidence
- scripts/: Executes local script or command: python3 scripts/video_understand.py <video> "<指令>" [--model ...] [--fps N]
- 网络端点: Declares external network access: POST https://ark.cn-beijing.volces.com/api/v3/files (multipart upload video, with prepro
- 本地工作目录: File read/write and artifact output: JSON result file specified by --output (with open(args.output, 'w', encoding='utf-8'))
5Second-Pass Verification
- [ok] 读取 ARK_API_KEY 并外发 — 脚本 get_api_key() 用 require_env_key("ARK_API_KEY");三处请求均带 "Authorization": f"Bearer {api_key}"。
- [ok] 端点定位 — BASE_URL = "https://ark.cn-beijing.volces.com/api/v3";风险扫描『URL/端點』与『網路請求』命中 files/responses 与脚本 requests.post/get。
- [ok] 素材上传到外部服务 — upload_video_file() 以 requests.post 到 {BASE_URL}/files 上传视频;analyze_video() 以 file_id 调 /responses。
- [ok] 无本地危险执行面 — 风险扫描『危險旗標/防護繞過』『沙箱/未受控執行』均无命中;脚本无 eval/exec、无 shell。
- [ok] 唯一写盘为 --output — 风险扫描『寫盤/產生檔案』仅命中 open(args.output, 'w', encoding='utf-8')。
- [ok] env_utils 为跨目录依赖 — 脚本 sys.path 插入 COMMON_DIR = Path(__file__).parent.parent.parent / "common",导入 load_env/require_env_key;该模块位于 skill 目录之外,本报告仅作推测定位。
- [ok] 档位复核 — 读 env 密钥 + 用户视频出网至生成型服务 → orange;无 red 触发项。
- [ok] 元数据与 commit — commit=dd0bf355955b4c82b764740b4183c86a72ba0e0c,license=MIT(仓库根),installs=null。
6Verdict & Scenarios
5f1ee27839a37239…