watch-youtube
Compare original and translation side by side
🇺🇸
Original
English🇨🇳
Translation
ChineseWatch YouTube
观看YouTube视频
Use Google's Gemini API to actually watch YouTube videos and answer questions about them.
使用Google的Gemini API来真正“观看”YouTube视频并回答相关问题。
How It Works
工作原理
Gemini processes both audio and visual streams of YouTube videos at 1 FPS. You pass a URL + prompt, it returns analysis.
Gemini以每秒1帧的速度处理YouTube视频的音频和视频流。你传入一个URL和提示词,它就会返回分析结果。
When to Use
使用场景
- User shares a YouTube URL and wants a summary, transcript, or analysis
- User asks "what did they say about X in this video?"
- User wants timestamps of key moments
- User wants to compare multiple videos (up to 10 per request with Gemini 2.5+)
- 用户分享YouTube URL,想要获取摘要、转录文本或分析内容
- 用户询问“在这个视频中他们关于X说了什么?”
- 用户想要关键时刻的时间戳
- 用户想要对比多个视频(使用Gemini 2.5+时,每次请求最多支持10个视频)
When NOT to Use
不适用场景
- Private or unlisted videos (only public videos work)
- User just wants the video link or metadata
- 私有或未列出的视频(仅支持公开视频)
- 用户仅想要视频链接或元数据
Setup
设置
Requires environment variable. Get one free at https://aistudio.google.com/apikey
GOOGLE_API_KEY需要设置环境变量。可在https://aistudio.google.com/apikey免费获取。
GOOGLE_API_KEYUsage
使用方法
Run the script:
bash
GOOGLE_API_KEY="$GOOGLE_API_KEY" python3 ~/.openclaw/workspace/skills/watch-youtube/watch.py "<youtube_url>" "<prompt>"运行脚本:
bash
GOOGLE_API_KEY="$GOOGLE_API_KEY" python3 ~/.openclaw/workspace/skills/watch-youtube/watch.py "<youtube_url>" "<prompt>"Examples
示例
Summarize:
bash
watch.py "https://www.youtube.com/watch?v=VIDEO_ID" "Summarize this video in 5 bullet points"Timestamps:
bash
watch.py "https://www.youtube.com/watch?v=VIDEO_ID" "List the key moments with timestamps"Q&A:
bash
watch.py "https://www.youtube.com/watch?v=VIDEO_ID" "What tools or products did they mention?"Specific section:
bash
watch.py "https://www.youtube.com/watch?v=VIDEO_ID" "What happens at 05:30?" 生成摘要:
bash
watch.py "https://www.youtube.com/watch?v=VIDEO_ID" "Summarize this video in 5 bullet points"获取时间戳:
bash
watch.py "https://www.youtube.com/watch?v=VIDEO_ID" "List the key moments with timestamps"问答:
bash
watch.py "https://www.youtube.com/watch?v=VIDEO_ID" "What tools or products did they mention?"特定片段:
bash
watch.py "https://www.youtube.com/watch?v=VIDEO_ID" "What happens at 05:30?" Limits
限制
- Free tier: 8 hours of YouTube video per day
- Paid tier: No limit
- Max videos per request: 10 (Gemini 2.5+)
- Max video length: ~1 hour (1M context), ~3 hours (low res)
- ~300 tokens per second of video
- 免费层级: 每天最多处理8小时YouTube视频
- 付费层级: 无限制
- 每次请求最多视频数: 10个(Gemini 2.5+)
- 最大视频时长: 约1小时(1M上下文),约3小时(低分辨率)
- 每秒约300个token的视频处理速度
Models
模型
- — fast, cheap, good for most use cases
gemini-2.5-flash - — deeper analysis, longer videos
gemini-2.5-pro - — latest, best quality
gemini-3-flash-preview
- — 速度快、成本低,适用于大多数场景
gemini-2.5-flash - — 分析更深入,支持更长视频
gemini-2.5-pro - — 最新版本,质量最佳
gemini-3-flash-preview