gemini-video-understanding

majiayu000 的头像作者 majiayu000

使用 Google 的 Gemini API 分析和理解视频。当用户要求分析、理解、描述、总结、转录或从视频中提取信息时使用。支持本地视频文件(MP4、MOV、WebM 等)和 YouTube URL。可以回答有关视频内容的问题、描述场景、识别对象/人/动作、提取文本/时间戳等。当用户提供视频文件路径或 YouTube 链接并想要了解其内容时,请使用此技能。

📖 中文导读:使用 Google 的 Gemini API 分析和理解视频。当用户要求分析、理解、描述、总结、转录或从视频中提取信息时使用。支持本地视频文件(MP4、MOV、WebM 等)和 YouTube URL。可以回答有关视频内容的问题、描述场景、识别对象/人/动作、提取文本/时间戳等。当用户提供视频文件路径或 YouTube 链接并想要了解其内容时,请使用此技能。 以下正文为该技能的原始 SKILL.md 内容(英文),上方安装命令可直接使用。

name: gemini-video-understanding description: Analyze and understand videos using Google's Gemini API. Use when the user asks to analyze, understand, describe, summarize, transcribe, or extract information from videos. Supports local video files (MP4, MOV, WebM, etc.) and YouTube URLs. Can answer questions about video content, describe scenes, identify objects/people/actions, extract text/timestamps, and more. Use this skill when user provides a video file path or YouTube link and wants to understand its content.

Gemini Video Understanding

uv run ~/.claude/skills/gemini-video-understanding/scripts/understand_video.py \
  --source "path/to/video.mp4" \
  --prompt "Describe what happens in this video" \
  [--fast] \
  [--fps 1] \
  [--start 0] \
  [--end 60]

Source Types

  • Local files: --source "video.mp4" — MP4, MOV, WebM, AVI, MKV, etc.
  • YouTube: --source "https://youtube.com/watch?v=..." — Any YouTube URL

Options

Option Description
--fast Use faster flash model instead of pro
--fps Frame rate sampling (default: 1 fps). Use 2+ for fast action
--start Start time in seconds for clipping
--end End time in seconds for clipping

Example Prompts

  • "Summarize this video in 3 bullet points"
  • "What text appears on screen? Include timestamps"
  • "Describe the main actions and events with timestamps"
  • "Identify all people and what they're doing"

API Key

Uses GEMINI_API_KEY env var, or pass --api-key KEY.

Updating Models

Edit ~/.claude/skills/gemini-video-understanding/config.json:

{
  "default_model": "gemini-3-pro-preview",
  "fast_model": "gemini-3-flash-preview"
}