WatchYouTube¶
Forge-native equivalent of bradautomates/claude-video, written from scratch so it bills $0 by default (subscription quota only).
Files¶
- Script:
forge/scripts/forge_watch_youtube.py - Skill:
forge/.claude/skills/watchyoutube/SKILL.md - Cache:
forge/data/watchyoutube/<video-id>/(video.mp4, video.en.vtt, frame_*.jpg, transcript.md) - Venv:
~/.forge-venvs/watchyoutube/(holds a recent yt-dlp; system/usr/bin/yt-dlpwas 2024.04.09 and could not parse YouTube responses anymore)
Pipeline¶
- yt-dlp (from venv) pulls auto-captions + chapters + info.json (skip-download)
- yt-dlp downloads 720p mp4 (only if frames are needed)
pick_frame_timeschooses frame timestamps: chapter midpoints (+ quarters for long chapters) when chapters exist, else every 10s; cap 60- ffmpeg extracts each frame at 960px wide JPEG q4
parse_vttdeduplicates rolling auto-captions (consecutive identical or prefix-overlap cues collapse)- Writes
transcript.mdwith chapters + interleaved[mm:ss]cues andreferences
When the calling skill Reads transcript.md, all referenced frames load as image inputs.
Flags¶
--frames N(default 60),--interval S(default 10),--whisper,--force--whisperis opt-in only. ReadsOPENAI_API_KEYfrom env or~/.forge-secrets/openai.env. Logs to stderr that it is API-billed.
Known limitations¶
- YouTube auto-caption dedup is heuristic; some rolling overlap still leaks through (cosmetic)
- Long no-chapter videos (>30 min) get sparse coverage at 60-frame cap; bump
--framesfor visual-heavy content - yt-dlp WARNINGs about "no JS runtime / impersonation" are harmless on current videos but may bite if YouTube tightens further; pinning to a recent yt-dlp release in the venv is the mitigation
- No
/recallintegration yet (would index transcripts into the semantic search corpus)
Known good test¶
/watchyoutube https://www.youtube.com/watch?v=QZMljuD10sU → 8 frames, 279 cues, transcript.md ~12KB. Built 2026-05-01.