Now liveThe Skillselion MCP - thousands of ranked skills, loaded into your agent mid-task. No install.Get it →
ceeon avatar

Video Analyzer

  • 9 installs
  • 15 repo stars
  • Updated February 14, 2026
  • ceeon/video-analyzer-skill

Downloads a video from Bilibili/YouTube or a local file, compresses it, and analyzes it into timestamped notes via a Volcengine video model.

About

Downloads or reads a video, compresses with ffmpeg, uploads via the Volcengine Files API, and calls the Responses API to produce timestamped content notes. A developer uses it to summarize or take notes on a video link or local file.

  • yt-dlp download + ffmpeg compress + Volcengine Files/Responses API
  • Outputs timestamped structured video notes

Video Analyzer by the numbers

  • 9 all-time installs (skills.sh)
  • Ranked #1,065 of 1,335 Generative Media skills by installs in the Skillselion catalog
  • Data as of Jul 28, 2026 (Skillselion catalog sync)
npx skills add https://github.com/ceeon/video-analyzer-skill --skill video-analyzer

Add your badge

Show developers this skill is listed on Skillselion. Paste this into your README.

Listed on Skillselion
Installs9
repo stars15
Last updatedFebruary 14, 2026
Repositoryceeon/video-analyzer-skill

What it does

Downloads a video from Bilibili/YouTube or a local file, compresses it, and analyzes it into timestamped notes via a Volcengine video model.

Files

SKILL.mdMarkdownGitHub ↗

<!-- input: 视频 URL 或本地文件路径 output: 视频内容的详细分析笔记(含时间戳) pos: 核心 skill,视频理解能力 -->

视频内容分析

下载视频 → 压缩 → Files API 上传 → Responses API 分析。一次 API 调用出完整结果。

依赖

  • yt-dlp(brew install yt-dlp)
  • ffmpeg(brew install ffmpeg)

步骤

1. 读取配置

# 从 ~/.claude/skills/video-analyzer/config/secrets.md 读取
API_KEY="your-api-key-here"
API_URL="https://ark.cn-beijing.volces.com/api/v3/responses"
MODEL="doubao-seed-2-0-pro-260215"

2. 获取视频

本地文件:直接用。

在线视频(B站/YouTube 等):

yt-dlp -f "bv*+ba/b" -o "/tmp/video-analyzer-%(id)s.%(ext)s" --no-playlist "URL"

B站高清需要 Cookie:

yt-dlp --cookies-from-browser chrome -f "bv*+ba/b" -o "/tmp/video-analyzer-%(id)s.%(ext)s" --no-playlist "URL"

3. 压缩(超过 100MB 时)

ffmpeg -i "输入文件" -vf "scale='min(720,iw)':-2" -c:v libx264 -crf 28 -preset fast -c:a aac -b:a 64k -y /tmp/video-analyzer-compressed.mp4

实测效果:327MB → 74MB。如果还大,加 -crf 32-t 600 截前 10 分钟。

4. 上传 Files API

curl -s https://ark.cn-beijing.volces.com/api/v3/files \
  -H "Authorization: Bearer $API_KEY" \
  -F "purpose=user_data" \
  -F "file=@/tmp/video-analyzer-compressed.mp4"

返回 {"id": "file-xxx", "status": "processing"},提取 id 即 file_id。

5. 等待文件处理完成

文件上传后状态为 processing,必须等处理完才能调用分析。

文件大小等待时间
< 30MBsleep 15
30-100MBsleep 45
> 100MBsleep 60,或轮询状态

如果调用分析返回 OperationDenied.InvalidState 说明还没处理完,再等 15 秒重试。

6. 调用 Responses API

curl -s "$API_URL" \
  -H "Content-Type: application/json" \
  -H "Authorization: Bearer $API_KEY" \
  -d '{
    "model": "'"$MODEL"'",
    "input": [{
      "role": "user",
      "content": [
        {"type": "input_video", "file_id": "'"$FILE_ID"'"},
        {"type": "input_text", "text": "提示词"}
      ]
    }]
  }'

关键:用 "file_id" 字段引用视频,不要用 "video_url" 传 file_id(会报 invalid scheme)。

7. 默认提示词

你是一个视频内容分析助手。请按时间线详细梳理视频内容,要求:
1. 标注准确的时间戳 [mm:ss]
2. 提取所有关键信息:讲解的知识点、出现的文字、图表、公式、人物动作、场景变化
3. 生成结构化的内容笔记
请用中文详细回答。

用户可指定侧重点("重点分析代码"、"提取公式"、"总结观点"),融入 prompt。

8. 解析响应

响应 output 数组包含两类:

  • "type": "reasoning" — 模型思考过程(忽略)
  • "type": "message" — 最终结果,取 content[].text
for item in result["output"]:
    if item["type"] == "message":
        for c in item["content"]:
            if c["type"] == "output_text":
                print(c["text"])

9. 清理

rm -f /tmp/video-analyzer-*

10. 输出格式

拿到原始分析后,根据用户意图决定输出详细程度:

  • 用户说"分析视频"、"视频笔记" → 直接输出完整笔记
  • 用户说"简单描述"、"讲了什么" → 用自己的话精简概括,不贴原文

踩坑记录

问题原因解决
invalid schemevideo_url 传了 file_id改用 file_id 字段
OperationDenied.InvalidState文件还在 processing多等一会儿再调用
429 RequestBurstTooFastbase64 直传请求体太大触发突发保护改用 Files API 上传,不要用 base64
input_file 报 not pdfinput_file 类型只支持 PDF视频用 input_video + file_id
yt-dlp 下载 480pB站高清需登录--cookies-from-browser chrome

Related skills

This week in AI coding

Five minutes, every Monday - the tools, releases and tactics for developers.

unsubscribe anytime.