This skill should be used when the user asks to "analyze video", "summarize video", "extract video transcript", "understand video content", "video to text", "describe video", "ask questions about video", or "what happens in this video". Analyzes videos using Google Gemini API with local file upload or YouTube URL input.
View on GitHubjongwony/cc-plugin
google/skills/video-understanding/SKILL.md
January 24, 2026
Select agents to install to:
npx add-skill https://github.com/jongwony/cc-plugin/blob/main/google/skills/video-understanding/SKILL.md -a claude-code --skill video-understandingInstallation paths:
.claude/skills/video-understanding/# Video Understanding with Gemini
Analyze video content using Google Gemini 3 Flash API. Extract summaries, transcripts, timestamps, and answer questions about video content from local files or YouTube URLs.
## Prerequisites
```bash
# Install SDK
uv pip install google-genai
# Set API key
export GEMINI_API_KEY="your-api-key"
```
## Input Methods
### 1. Files API Upload (Recommended for local files)
For files >100MB or videos >1 minute, use Files API for reliable upload.
```python
from google import genai
client = genai.Client(api_key=os.getenv("GEMINI_API_KEY"))
# Upload video file
video_file = client.files.upload(file="/path/to/video.mp4")
# Wait for processing
import time
while video_file.state.name == "PROCESSING":
time.sleep(5)
video_file = client.files.get(name=video_file.name)
if video_file.state.name == "FAILED":
raise ValueError("Video processing failed")
# Analyze
response = client.models.generate_content(
model="gemini-3-flash-preview",
contents=[video_file, "Summarize this video"]
)
print(response.text)
```
### 2. Inline Data (For small files <20MB)
```python
import base64
with open("/path/to/short_video.mp4", "rb") as f:
video_data = base64.standard_b64encode(f.read()).decode("utf-8")
response = client.models.generate_content(
model="gemini-3-flash-preview",
contents=[
{"inline_data": {"mime_type": "video/mp4", "data": video_data}},
"What is happening in this video?"
]
)
```
### 3. YouTube URL (Public videos only)
```python
from google.genai import types
response = client.models.generate_content(
model="gemini-3-flash-preview",
contents=types.Content(
parts=[
types.Part(
file_data=types.FileData(
file_uri="https://www.youtube.com/watch?v=VIDEO_ID"
)
),
types.Part(text="Summarize this video with key timestamps")
]
)
)
```
**YouTube Limits:**
- Public videos only (no priv