Intelligent video summarization for multi-platform content. Supports Bilibili, Xiaohongshu, Douyin, YouTube, and local video files.
No API key required to run. This skill extracts video content and outputs structured requests for summarization. The agent (or external tool) handles LLM calls.
# Optional: If you want the agent to call LLM for summarization
export OPENAI_API_KEY="your-api-key-here"
export OPENAI_BASE_URL=https://open.bigmodel.cn/api/paas/v4
# Optional: Whisper model for transcription (default: base)
export VIDEO_SUMMARY_WHISPER_MODEL=base
How it works:
Just set OPENAI_BASE_URL to the provider's API endpoint.
Xiaohongshu and Douyin may need cookies for some videos:
# Set cookie file path
export VIDEO_SUMMARY_COOKIES=/path/to/cookies.txt
# Or use --cookies flag
video-summary "https://xiaohongshu.com/..." --cookies cookies.txt
⚠️ Cookie Security Note:
If configuration is incomplete, say:
> "help me configure video-summary"
# Check all required tools
yt-dlp --version && jq --version && ffmpeg -version
# If missing, install
pip install yt-dlp
apt install jq ffmpeg # or: brew install jq ffmpeg
# Standard summary
video-summary "https://www.bilibili.com/video/BV1xx411c7mu"
# With chapter segmentation
video-summary "https://www.youtube.com/watch?v=xxxxx" --chapter
# JSON output for programmatic use
video-summary "https://www.xiaohongshu.com/explore/xxxxx" --json
# Subtitle only (no AI summary)
video-summary "https://v.douyin.com/xxxxx" --subtitle
# Save to file
video-summary "https://www.bilibili.com/video/BV1xx" --output summary.md
# Use cookies for restricted content
video-summary "https://www.xiaohongshu.com/explore/xxxxx" --cookies cookies.txt
Just say:
> "Summarize this video: [URL]"
The agent will automatically:
| Command | Description |
|---|---|
| --------- | ------------- |
video-summary " | Generate standard summary |
video-summary " | Chapter-by-chapter breakdown |
video-summary " | Extract raw transcript only |
video-summary " | Structured JSON output |
video-summary " | Specify subtitle language (default: auto) |
video-summary " | Save output to file |
video-summary " | Use cookies file |
video-summary " | Force Whisper transcription |
| Platform | Subtitle Extraction | Notes |
|---|---|---|
| ---------- | ------------------- | ------- |
| YouTube | Native CC + auto-generated | Best support |
| Bilibili | Native CC + backup methods | Requires video ID extraction |
| Xiaohongshu | Limited (OCR fallback) | No native subtitles, uses transcription |
| Douyin | Limited (OCR fallback) | Short-form video, may need transcription |
| Local files | Whisper transcription | Supports mp4, mkv, webm, mp3, etc. |
YouTube:
https://www.youtube.com/watch?v=xxxxxhttps://youtu.be/xxxxxBilibili:
https://www.bilibili.com/video/BV1xx411c7muhttps://www.bilibili.com/video/av123456Xiaohongshu:
https://www.xiaohongshu.com/explore/xxxxxhttps://xhslink.com/xxxxx (short link)Douyin:
https://www.douyin.com/video/xxxxxhttps://v.douyin.com/xxxxx (short link)URL Input
↓
Platform Detection
↓
Subtitle Extraction (yt-dlp / Whisper)
↓
Content Chunking (if long)
↓
LLM Summarization (OpenAI API / Agent)
↓
Structured Output
↓
Auto Cleanup
| Video Duration | tiny | base | small | medium |
|---|---|---|---|---|
| --------------- | ------ | ------ | ------- | -------- |
| 5 min | ~30s | ~1m | ~2m | ~4m |
| 15 min | ~1.5m | ~3m | ~6m | ~12m |
| 30 min | ~3m | ~6m | ~15m | ~30m |
| 60 min | ~6m | ~12m | ~30m | ~60m |
Notes:
base model recommended for balance| Platform | Time | Notes |
|---|---|---|
| ---------- | ------ | ------- |
| YouTube | ~5s | Direct subtitle download |
| Bilibili | ~5s | Direct subtitle download |
| Xiaohongshu | ~3m | Requires transcription |
| Douyin | ~2m | Requires transcription |
For platforms without native subtitles (Xiaohongshu, Douyin), install Whisper:
pip install openai-whisper
Then configure:
export VIDEO_SUMMARY_WHISPER_MODEL=base # tiny, base, small, medium, large
This script does NOT directly call LLM APIs. It outputs structured requests for the agent to process.
If you want the agent to call LLM for summarization, configure:
# Optional: API key for your LLM provider
export OPENAI_API_KEY="your-api-key-here"
# Optional: Custom API endpoint (for non-OpenAI providers)
export OPENAI_BASE_URL=https://open.bigmodel.cn/api/paas/v4 # Zhipu
# export OPENAI_BASE_URL=https://api.deepseek.com/v1 # DeepSeek
# export OPENAI_BASE_URL=https://api.moonshot.cn/v1 # Moonshot
# Optional: Model selection
export OPENAI_MODEL=gpt-4o-mini
Without API key: Script outputs transcript and structured request. Agent handles summarization.
Some platforms require authentication for certain content:
# Method 1: Command line
video-summary "https://www.xiaohongshu.com/explore/xxxxx" --cookies cookies.txt
# Method 2: Environment variable
export VIDEO_SUMMARY_COOKIES=/path/to/cookies.txt
How to get cookies:
Create ~/.video-summary/prompt.txt:
# Summary Template
## Key Insights
- List 3-5 core arguments
## Key Information
- Data, cases, quotes
## Action Items
- Specific actions viewers can take
## Timestamp Navigation
- Key moments with timestamps and descriptions
# Video Title
**Duration**: 12:34
**Platform**: Bilibili
**Author**: Tech Creator
## Core Content
This video explains...
## Key Points
1. Point one
2. Point two
3. Point three
## Timestamps
- 00:00 Introduction
- 02:15 Core concept
- 08:30 Case study
- 11:45 Summary
--json){
"title": "Video Title",
"platform": "bilibili",
"duration": 754,
"author": "Creator Name",
"summary": "Core content summary...",
"keyPoints": ["Point 1", "Point 2", "Point 3"],
"chapters": [
{"time": 0, "title": "Intro", "summary": "..."},
{"time": 135, "title": "Core Concept", "summary": "..."}
],
"transcript": "Full transcript text..."
}
| Tool | Required | Purpose |
|---|---|---|
| ------ | ---------- | --------- |
| yt-dlp | Yes | Video/subtitle downloader |
| jq | Yes | JSON processing |
| ffmpeg | Yes | Audio/video processing |
| whisper | Optional | Local transcription |
~/.openclaw/workspace/skills/video-summary/
├── SKILL.md # This file
├── scripts/
│ └── video-summary.sh # Main CLI script
├── prompts/
│ ├── summary-default.txt
│ └── summary-chapter.txt
└── references/
└── platform-support.md # Detailed platform notes
| Variable | Default | Description |
|---|---|---|
| ---------- | --------- | ------------- |
OPENAI_API_KEY | - | Optional - API key for LLM summarization (used by agent, not this script) |
OPENAI_BASE_URL | https://api.openai.com/v1 | Optional - Custom API endpoint |
OPENAI_MODEL | gpt-4o-mini | Optional - Model for summarization |
VIDEO_SUMMARY_WHISPER_MODEL | base | Whisper model size |
VIDEO_SUMMARY_COOKIES | - | Optional - Path to cookies file (read locally only) |
--transcribe to use Whisperpip install yt-dlp
# or
brew install yt-dlp
# Install all dependencies
pip install yt-dlp
apt install jq ffmpeg # Ubuntu/Debian
# or
brew install jq ffmpeg # macOS
Long videos (>1h) are automatically chunked:
--cookies for restricted content--cookies for authenticated access| Feature | OpenClaw summarize | video-summary |
|---|---|---|
| --------- | ------------------- | --------------- |
| YouTube | ✅ | ✅ |
| Bilibili | ❌ | ✅ |
| Xiaohongshu | ❌ | ⚠️ (transcription) |
| Douyin | ❌ | ⚠️ (transcription) |
| Chapter segmentation | ❌ | ✅ |
| Timestamps | ❌ | ✅ |
| Transcript extraction | ❌ | ✅ |
| JSON output | ❌ | ✅ |
| Save to file | ❌ | ✅ |
| Cookie support | ❌ | ✅ |
Found a bug or want to add platform support?
--output parameter--cookies parameterMake video content accessible. Watch less, learn more.
共 4 个版本