Install
openclaw skills install @bill492/video-understandingUse whenever the user provides any video URL, YouTube link, or video file, even if they only ask to watch, look at, react to, understand, analyze, summarize, transcribe, inspect, or extract answers from the video.
openclaw skills install @bill492/video-understandingAnalyze videos using Google Gemini's multimodal video understanding. Supports 1000+ video sources via yt-dlp.
uvyt-dlp — brew install yt-dlp / pip install yt-dlpffmpeg — brew install ffmpeg (for merging video+audio streams)GEMINI_API_KEY environment variableUse this skill first whenever the user provides a video URL, YouTube link, or video file. The trigger is the video input itself, not whether the user explicitly says "Gemini," "analyze," or "transcribe."
Casual asks like "watch this," "look at this," "what is this?," "you laugh," or "what happens here?" still require this skill.
GEMINI_API_KEY or another dependency is missing, report that blocker before falling back to local extraction.yt-dlp and ffmpeg installed (sanity-check with which yt-dlp / which ffmpeg).ACTIVE, but expire after about 48 hours.Returns structured JSON:
[MM:SS] timestampsuv run {baseDir}/scripts/analyze_video.py "https://example.com/video.mp4"
Local video files work too:
uv run {baseDir}/scripts/analyze_video.py "/path/to/video.mp4"
uv run {baseDir}/scripts/analyze_video.py "https://example.com/video.mp4" -q "What product is shown?"
Use a stable --session-key for the conversation or Slack thread. --reuse-file-cache keeps and reuses an ACTIVE Gemini File API handle instead of re-uploading; stale handles automatically fall back to a fresh upload/download.
uv run {baseDir}/scripts/analyze_video.py "https://example.com/video.mp4" --session-key "slack-thread-123" --reuse-file-cache -q "Summarize this"
uv run {baseDir}/scripts/analyze_video.py "https://example.com/video.mp4" --session-key "slack-thread-123" --reuse-file-cache --continue-chat -q "What happens after the pricing screen?"
For long videos with repeated follow-ups, add --use-context-cache to try Gemini explicit CachedContent. If Gemini rejects caching, the script falls back to File API reuse.
uv run {baseDir}/scripts/analyze_video.py "https://example.com/video.mp4" --session-key "slack-thread-123" --reuse-file-cache --use-context-cache --cache-ttl-seconds 3600 -q "Find all UI errors"
uv run {baseDir}/scripts/analyze_video.py "https://example.com/video.mp4" -p "Custom prompt" --raw
uv run {baseDir}/scripts/analyze_video.py "https://example.com/video.mp4" --download-only -o video.mp4
| Flag | Description | Default |
|---|---|---|
-q / --question | Question to answer (added to default fields) | none |
-p / --prompt | Override entire prompt (ignores -q) | structured JSON |
-m / --model | Gemini model | gemini-2.5-flash |
--fallback-model | Optional fallback model for transient Gemini errors | none |
-o / --output | Save output to file | stdout |
--keep | Keep downloaded video file | false |
--download-only | Download only, skip analysis | false |
--max-size | Max file size in MB | 500 |
--raw | Raw text output instead of JSON | false |
--reuse-file-cache | Keep/reuse Gemini File API upload handles for follow-ups | false |
--use-context-cache | Try Gemini explicit CachedContent for repeated questions | false |
--cache-ttl-seconds | TTL for explicit CachedContent | 3600 |
--cache-dir | Local directory for cache records | ~/.openclaw/cache/video-understanding |
--session-key | Conversation/thread key for follow-up reuse | none |
--continue-chat | Include prior cached outputs as follow-up context | false |
--purge-cache | Delete cached Gemini handles for this asset/session | false |
--reuse-file-cache, valid Gemini file handles are reused for follow-up questions; expired/deleted handles trigger a fresh upload/download--use-context-cache, the script tries Gemini CachedContent and falls back to File API reuse if caching is unavailableAny URL supported by yt-dlp: Loom, YouTube, TikTok, Vimeo, Twitter/X, Instagram, Dailymotion, Twitch, and 1000+ more.
-q for targeted questions on top of the full analysis--session-key plus --reuse-file-cache for Slack-thread follow-ups so Loom/local videos are not re-uploaded every turn--continue-chat when the follow-up relies on prior wording like "that screen" or "the second speaker"--purge-cache when done with a sensitive video to delete the remote Gemini handles--fallback-model only when that model has quota on the accountuv