video-content-analyzer

下载视频并用AI分析内容 - 支持B站/抖音/YouTube等平台,提取语音内容并分析视频结构

33 stars

Best use case

video-content-analyzer is best used when you need a repeatable AI agent workflow instead of a one-off prompt.

下载视频并用AI分析内容 - 支持B站/抖音/YouTube等平台,提取语音内容并分析视频结构

Teams using video-content-analyzer should expect a more consistent output, faster repeated execution, less prompt rewriting, better workflow continuity with your supporting tools.

When to use this skill

  • You want a reusable workflow that can be run more than once with consistent structure.
  • You already have the supporting tools or dependencies needed by this skill.

When not to use this skill

  • You only need a quick one-off answer and do not need a reusable workflow.
  • You cannot install or maintain the underlying files, dependencies, or repository context.

Installation

Claude Code / Cursor / Codex

$curl -o ~/.claude/skills/video-content-analyzer/SKILL.md --create-dirs "https://raw.githubusercontent.com/aAAaqwq/AGI-Super-Team/main/skills/video-content-analyzer/SKILL.md"

Manual Installation

  1. Download SKILL.md from GitHub
  2. Place it in .claude/skills/video-content-analyzer/SKILL.md inside your project
  3. Restart your AI agent — it will auto-discover the skill

How video-content-analyzer Compares

Feature / Agentvideo-content-analyzerStandard Approach
Platform SupportNot specifiedLimited / Varies
Context Awareness High Baseline
Installation ComplexityUnknownN/A

Frequently Asked Questions

What does this skill do?

下载视频并用AI分析内容 - 支持B站/抖音/YouTube等平台,提取语音内容并分析视频结构

Where can I find the source code?

You can find the source code on GitHub using the link provided at the top of the page.

Related Guides

SKILL.md Source

# 视频内容分析器

自动下载视频并用AI分析内容,提取完整的语音文案,分析视频结构和节奏。

## 功能

1. **视频下载** - 支持B站、抖音、YouTube等主流平台
2. **音频提取** - 用ffmpeg提取视频中的音频
3. **语音转写** - 用OpenAI Whisper API转写为文字
4. **内容分析** - AI分析视频结构、节奏、钩子等

## 前置要求

### 必须安装的工具

```bash
# 安装 yt-dlp (视频下载)
pip3 install --break-system-packages yt-dlp

# 安装 ffmpeg (音频处理)
# Mac: brew install ffmpeg
# Ubuntu: sudo apt install ffmpeg
```

### API Key

需要设置 OpenAI API Key(用于Whisper转写):
```bash
export OPENAI_API_KEY="your-api-key"
```

或在 `~/.openclaw/openclaw.json` 中配置:
```json
{
  "skills": {
    "openai-whisper-api": {
      "apiKey": "your-api-key"
    }
  }
}
```

## 使用方法

### 输入

用户提供视频链接,例如:
- B站: `https://www.bilibili.com/video/BV1xuPYzcEdo`
- 抖音: `https://www.douyin.com/video/xxx`
- YouTube: `https://www.youtube.com/watch?v=xxx`

### 输出

完整的分析报告,包括:
1. 📝 完整文案(语音转写)
2. 🎬 视频结构分析(章节/时间节点)
3. 🪝 钩子分析
4. ⏱️ 节奏分析
5. 💡 内容总结

---

## 工作流程

```
1. 输入视频链接
        ↓
2. yt-dlp 下载视频
        ↓
3. 获取视频时长,计算关键帧数量
        ↓
4. ffmpeg 提取关键帧(每30秒1帧)
        ↓
5. 获取弹幕数据(若有)
        ↓
6. Whisper API 转写(若有API)
        ↓
7. AI 分析画面+弹幕+文案
        ↓
8. 输出完整报告
```

---

## 关键帧提取(优化版)

### 自动提取策略

```bash
# 视频时长 / 30 = 关键帧数量
# 例如:8分钟视频 → 16-17张关键帧

# 提取关键帧(每30秒1帧)
ffmpeg -ss 00:00:00 -i video.mp4 -vframes 1 -q:v 2 frame_001.jpg -y
ffmpeg -ss 00:00:30 -i video.mp4 -vframes 1 -q:v 2 frame_002.jpg -y
ffmpeg -ss 00:01:00 -i video.mp4 -vframes 1 -q:v 2 frame_003.jpg -y
# ... 以此类推
```

### 帧数建议

| 视频时长 | 建议帧数 | 间隔 |
|---------|---------|------|
| < 3 分钟 | 6-8 帧 | 每20-30秒 |
| 3-10 分钟 | 12-20 帧 | 每30秒 |
| 10-30 分钟 | 30-60 帧 | 每30秒 |

### 批量提取脚本

```python
import subprocess
import os

def extract_frames(video_path, output_dir, interval=30):
    """提取视频关键帧
    
    Args:
        video_path: 视频文件路径
        output_dir: 输出目录
        interval: 帧间隔(秒),默认30秒
    """
    # 获取视频时长
    cmd = ['ffprobe', '-v', 'error', '-show_entries', 
           'format=duration', '-of', 'default=noprint_wrappers=1:nokey=1', 
           video_path]
    result = subprocess.run(cmd, capture_output=True, text=True)
    duration = float(result.stdout.strip())
    
    # 计算帧数
    num_frames = int(duration // interval) + 1
    
    os.makedirs(output_dir, exist_ok=True)
    
    for i in range(num_frames):
        seconds = i * interval
        mins = seconds // 60
        secs = seconds % 60
        ts = f'{mins:02d}:{secs:02d}'
        out = f'{output_dir}/frame_{i+1:03d}.jpg'
        
        cmd = ['ffmpeg', '-ss', ts, '-i', video_path, 
               '-vframes', '1', '-q:v', '2', out, '-y']
        subprocess.run(cmd, capture_output=True)
        print(f'✓ Extracted {out}')
    
    return num_frames

# 使用示例
extract_frames('/tmp/video.mp4', '/tmp/frames', interval=30)
```

---

## 命令行示例

### 手动下载B站视频

```bash
# 下载B站视频(仅音频)
yt-dlp -x --audio-format mp3 -o "%(title)s.%(ext)s" "https://www.bilibili.com/video/BV1xuPYzcEdo"

# 下载视频(最佳画质)
yt-dlp -f "bestvideo[ext=mp4]+bestaudio[ext=m4a]/best[ext=mp4]/best" -o "%(title)s.%(ext)s" "https://www.bilibili.com/video/BV1xuPYzcEdo"

# 仅下载字幕
yt-dlp --write-subs --skip-download -o "%(title)s" "https://www.bilibili.com/video/BV1xuPYzcEdo"
```

### 提取音频

```bash
# 从视频提取音频
ffmpeg -i input.mp4 -vn -acodec libmp3lame -q:a 2 output.mp3

# 或直接用yt-dlp
yt-dlp -x --audio-format mp3 "https://www.bilibili.com/video/BV1xuPYzcEdo"
```

---

## 输出模板

```markdown
# 📹 视频内容分析报告

**视频**: [标题]
**链接**: [URL]
**时长**: [时长]
**平台**: [B站/抖音/YouTube]
**关键帧数**: [数量]

---

## 📝 完整文案

[Whisper转写的完整语音文案]

---

## 🎬 视频结构(基于关键帧)

| 时间 | 画面内容 | 阶段 |
|------|---------|------|
| 0:00 | [第1帧描述] | 钩子 |
| 0:30 | [第2帧描述] | 铺垫 |
| 1:00 | [第3帧描述] | 主题展开 |
| ... | ... | ... |

---

## 🪝 钩子分析

[开头画面的钩子设计分析]

---

## 🎯 内容分层

- **开头 (0-1分钟)**:
- **中段 (1-5分钟)**:
- **高潮 (5-7分钟)**:
- **结尾 (7-分钟)**:

---

## 💡 爆款元素

| 元素 | 分析 |
|------|------|
| 情感点 | [弹幕高频情感词] |
| 互动点 | [弹幕互动热点] |
| 记忆点 | [金句/名场面] |

---

## 📊 弹幕热点词

```
[从danmaku.xml提取的高频弹幕]
```

---

## 🔥 成功原因总结

1. [核心爆款因素]
2. [情感共鸣点]
3. [创新/独特之处]

---

## 总结

[视频的核心内容和亮点]
```

---

## 注意事项

1. 📡 **网络** - 下载视频需要稳定的网络
2. 💰 **费用** - Whisper API按分钟计费(~$0.006/分钟)
3. ⏱️ **时间** - 完整分析需要3-5分钟
4. 📏 **长度** - 建议视频时长 < 30分钟
5. 🔐 **版权** - 仅供学习分析使用,勿用于商业目的

---

## 故障排除

### 下载失败
- 检查网络连接
- 尝试使用代理
- B站可能需要Cookie认证

### Whisper转写失败
- 确认OPENAI_API_KEY正确设置
- 检查API余额
- 音频文件是否损坏

### ffmpeg问题
- 确认ffmpeg已安装: `ffmpeg -version`
- Mac用户: `brew install ffmpeg`
```

Related Skills

xhs-content-creator

33
from aAAaqwq/AGI-Super-Team

Generate Xiaohongshu (小红书/RED) content optimized for the platform's CES algorithm. Use when: (1) creating xiaohongshu/小红书 posts, (2) writing Chinese social media content for RED, (3) generating content with xiaohongshu SEO optimization, (4) planning xiaohongshu content calendars. Supports diary-style, tutorial, review, and list formats with proper AI content labeling.

web-content-capture

33
from aAAaqwq/AGI-Super-Team

为内容生产提供**网页截图和素材采集**能力。所有内容生成类 skill 在素材阶段应调用本 skill。

videocut:自进化

33
from aAAaqwq/AGI-Super-Team

字幕生成与烧录。火山引擎转录→词典纠错→审核→烧录。触发词:加字幕、生成字幕、字幕

video-transcriber

33
from aAAaqwq/AGI-Super-Team

视频转写工作流,支持B站和YouTube视频。自动判断有字幕/无字幕,有字幕则获取字幕,无字幕则下载音频+whisper转写。触发场景:(1) 用户要求总结视频内容 (2) 用户要求获取视频字幕 (3) 用户要求转写视频 (4) 处理B站/YouTube视频

video-subtitles

33
from aAAaqwq/AGI-Super-Team

Generate SRT subtitles from video/audio with translation support. Transcribes Hebrew (ivrit.ai) and English (whisper), translates between languages, burns subtitles into video. Use for creating captions, transcripts, or hardcoded subtitles for WhatsApp/social media.

video-script

33
from aAAaqwq/AGI-Super-Team

Create video scripts and publishing materials for YouTubers/UP主. Use when user wants to prepare a video, write a script (口播稿), generate video title, description, tags, or chapter timestamps. Triggers on "写视频脚本", "视频口播稿", "video script", "prepare video", "视频发布素材", or mentions creating content for YouTube/Bilibili.

video-merge-send

33
from aAAaqwq/AGI-Super-Team

合并多个分段视频为一个完整视频,并发送到飞书。使用ffmpeg拼接视频片段,支持淡入淡出转场。触发场景:用户需要合并视频片段、拼接分镜视频、视频合并后发飞书、把多个短视频合成一个、分段视频合并发送。配合 jimeng-storyboard skill 使用,完成数字人视频全流程。

video-marketing

33
from aAAaqwq/AGI-Super-Team

When the user wants to plan video marketing, create video scripts, or optimize for short-form or long-form video. Also use when the user mentions "video marketing," "video script," "short-form video," "long-form video," "TikTok script," "Reels script," "YouTube script," "video hook," or "video content strategy."

video-lyrics-subtitle

33
from aAAaqwq/AGI-Super-Team

Video lyrics subtitle generator — create synchronized subtitle files for music videos

video-generation

33
from aAAaqwq/AGI-Super-Team

Use this skill when the user requests to generate, create, or imagine videos. Supports structured prompts and reference image for guided generation.

video-caption-burner

33
from aAAaqwq/AGI-Super-Team

Burn existing subtitles or captions directly into video exports so they remain visible across platforms and players. Use when a team already has captions and needs a platform-ready, subtitle-baked video for social, ads, storefronts, or review links.

social-content

33
from aAAaqwq/AGI-Super-Team

When the user wants help creating, scheduling, or optimizing social media content for LinkedIn, Twitter/X, Instagram, TikTok, Facebook, or other platforms. Also use when the user mentions 'LinkedIn...