Video Summary
by @lifei68801
Video summarization for Bilibili, Xiaohongshu, Douyin, and YouTube. Extract insights from video content through transcription and summarization.
clawhub install video-summaryπ About This Skill
name: video-summary version: 1.6.4 description: "Video summarization for Bilibili, Xiaohongshu, Douyin, and YouTube. Extract insights from video content through transcription and summarization."
π Security Declaration
This skill downloads videos/subtitles from YouTube/Bilibili/Xiaohongshu/Douyin.
It does NOT directly call external LLM APIs - it outputs structured requests for agent processing.
OPENAI_API_KEY and OPENAI_BASE_URL are optional - used by agent, not by this script.
Cookie files are read locally only, never transmitted externally.
No config files written. No secrets stored. No telemetry, no analytics.
metadata: openclaw: requires: bins: ["yt-dlp", "jq", "ffmpeg", "ffprobe", "bc"] credentials: - name: "OPENAI_API_KEY" required: false description: "API key for LLM summarization (optional, script outputs request for agent processing)" - name: "OPENAI_BASE_URL" required: false description: "Custom API endpoint (e.g., for Zhipu, DeepSeek)" - name: "VIDEO_SUMMARY_COOKIES" required: false description: "Path to cookies file for restricted video content" behavior: networkAccess: indirect description: "Downloads videos/subtitles from video platforms using yt-dlp. Summarization requests are output as structured text for agent/external LLM processing. Script itself makes no direct LLM API calls. Requires yt-dlp, jq, ffmpeg. Optional: VIDEO_SUMMARY_WHISPER_MODEL, VIDEO_SUMMARY_COOKIES, OPENAI_BASE_URL, OPENAI_MODEL."Video Summary Skill
Intelligent video summarization for multi-platform content. Supports Bilibili, Xiaohongshu, Douyin, YouTube, and local video files.
What It Does
Quick Setup
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/v4Optional: Whisper model for transcription (default: base)
export VIDEO_SUMMARY_WHISPER_MODEL=base
How it works: 1. Script extracts video subtitles/transcript 2. Script outputs a structured summary request (JSON/text) 3. Agent or external tool calls LLM API with the request 4. Script does NOT directly call any external APIs
Supported LLM Providers
Just set OPENAI_BASE_URL to the provider's API endpoint.
Cookie Configuration (Optional)
Xiaohongshu and Douyin may need cookies for some videos:
# Set cookie file path
export VIDEO_SUMMARY_COOKIES=/path/to/cookies.txtOr use --cookies flag
video-summary "https://xiaohongshu.com/..." --cookies cookies.txt
β οΈ Cookie Security Note:
Manual Trigger
If configuration is incomplete, say: > "help me configure video-summary"
Quick Start
Check Dependencies
# Check all required tools
yt-dlp --version && jq --version && ffmpeg -versionIf missing, install
pip install yt-dlp
apt install jq ffmpeg # or: brew install jq ffmpeg
Basic Usage
# Standard summary
video-summary "https://www.bilibili.com/video/BV1xx411c7mu"With chapter segmentation
video-summary "https://www.youtube.com/watch?v=xxxxx" --chapterJSON output for programmatic use
video-summary "https://www.xiaohongshu.com/explore/xxxxx" --jsonSubtitle only (no AI summary)
video-summary "https://v.douyin.com/xxxxx" --subtitleSave to file
video-summary "https://www.bilibili.com/video/BV1xx" --output summary.mdUse cookies for restricted content
video-summary "https://www.xiaohongshu.com/explore/xxxxx" --cookies cookies.txt
In OpenClaw Agent
Just say: > "Summarize this video: [URL]"
The agent will automatically: 1. Detect the platform 2. Extract video content 3. Generate a structured summary
Commands Reference
| 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 |
How It Works
Platform Support Matrix
| 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. |
Supported URL Formats
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)Processing Pipeline
URL Input
β
Platform Detection
β
Subtitle Extraction (yt-dlp / Whisper)
β
Content Chunking (if long)
β
LLM Summarization (OpenAI API / Agent)
β
Structured Output
β
Auto Cleanup
Performance Estimation
Whisper Transcription Time
| 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 balanceSubtitle Extraction Time
| Platform | Time | Notes | |----------|------|-------| | YouTube | ~5s | Direct subtitle download | | Bilibili | ~5s | Direct subtitle download | | Xiaohongshu | ~3m | Requires transcription | | Douyin | ~2m | Requires transcription |
Advanced Configuration
Whisper for 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
OpenAI API for Summarization
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.
Cookie Configuration for Restricted Content
Some platforms require authentication for certain content:
# Method 1: Command line
video-summary "https://www.xiaohongshu.com/explore/xxxxx" --cookies cookies.txtMethod 2: Environment variable
export VIDEO_SUMMARY_COOKIES=/path/to/cookies.txt
How to get cookies:
1. Install browser extension: "Get cookies.txt LOCALLY" 2. Login to the platform 3. Export cookies to file
Custom Summary Prompt
Create ~/.video-summary/prompt.txt:
# Summary TemplateKey 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
Output Formats
Standard Output (default)
# Video TitleDuration: 12:34
Platform: Bilibili
Author: Tech Creator
Core Content
This video explains...Key Points
1. Point one
2. Point two
3. Point threeTimestamps
00:00 Introduction
02:15 Core concept
08:30 Case study
11:45 Summary
JSON Output (--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..."
}
Technical Details
Dependencies
| Tool | Required | Purpose | |------|----------|---------| | yt-dlp | Yes | Video/subtitle downloader | | jq | Yes | JSON processing | | ffmpeg | Yes | Audio/video processing | | whisper | Optional | Local transcription |
File Structure
~/.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
Environment Variables
| 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) |
Troubleshooting
"No subtitles found"
--transcribe to use Whisper"yt-dlp: command not found"
pip install yt-dlp
or
brew install yt-dlp
"Missing required dependencies"
# Install all dependencies
pip install yt-dlp
apt install jq ffmpeg # Ubuntu/Debian
or
brew install jq ffmpeg # macOS
"Video too long"
Long videos (>1h) are automatically chunked:
"Failed to fetch video info"
--cookies for restricted content"Rate limited"
--cookies for authenticated accessComparison
| Feature | OpenClaw summarize | video-summary | |---------|-------------------|---------------| | YouTube | β | β | | Bilibili | β | β | | Xiaohongshu | β | β οΈ (transcription) | | Douyin | β | β οΈ (transcription) | | Chapter segmentation | β | β | | Timestamps | β | β | | Transcript extraction | β | β | | JSON output | β | β | | Save to file | β | β | | Cookie support | β | β |
References
Contributing
Found a bug or want to add platform support?
Changelog
v1.6.4 (2026-03-13)
v1.6.3 (2026-03-12)
v1.6.2 (2026-03-12)
v1.6.1 (2026-03-12)
v1.6.0 (2026-03-12)
v1.5.1 (2026-03-12)
v1.5.0 (2026-03-12)
v1.4.6 (2026-03-12)
v1.3.6 (2026-03-10)
v1.3.5 (2026-03-09)
v1.3.0 (2026-03-08)
v1.2.2 (2026-03-08)
v1.2.1 (2026-03-08)
v1.2.0 (2026-03-08)
v1.1.0 (2026-03-08)
--output parameter--cookies parameterv1.0.0
*Make video content accessible. Watch less, learn more.*
π‘ Examples
Check Dependencies
# Check all required tools
yt-dlp --version && jq --version && ffmpeg -versionIf missing, install
pip install yt-dlp
apt install jq ffmpeg # or: brew install jq ffmpeg
Basic Usage
# Standard summary
video-summary "https://www.bilibili.com/video/BV1xx411c7mu"With chapter segmentation
video-summary "https://www.youtube.com/watch?v=xxxxx" --chapterJSON output for programmatic use
video-summary "https://www.xiaohongshu.com/explore/xxxxx" --jsonSubtitle only (no AI summary)
video-summary "https://v.douyin.com/xxxxx" --subtitleSave to file
video-summary "https://www.bilibili.com/video/BV1xx" --output summary.mdUse cookies for restricted content
video-summary "https://www.xiaohongshu.com/explore/xxxxx" --cookies cookies.txt
In OpenClaw Agent
Just say: > "Summarize this video: [URL]"
The agent will automatically: 1. Detect the platform 2. Extract video content 3. Generate a structured summary
π Tips & Best Practices
"No subtitles found"
--transcribe to use Whisper"yt-dlp: command not found"
pip install yt-dlp
or
brew install yt-dlp
"Missing required dependencies"
# Install all dependencies
pip install yt-dlp
apt install jq ffmpeg # Ubuntu/Debian
or
brew install jq ffmpeg # macOS
"Video too long"
Long videos (>1h) are automatically chunked:
"Failed to fetch video info"
--cookies for restricted content"Rate limited"
--cookies for authenticated access