Skip to content

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-dlp was 2024.04.09 and could not parse YouTube responses anymore)

Pipeline

  1. yt-dlp (from venv) pulls auto-captions + chapters + info.json (skip-download)
  2. yt-dlp downloads 720p mp4 (only if frames are needed)
  3. pick_frame_times chooses frame timestamps: chapter midpoints (+ quarters for long chapters) when chapters exist, else every 10s; cap 60
  4. ffmpeg extracts each frame at 960px wide JPEG q4
  5. parse_vtt deduplicates rolling auto-captions (consecutive identical or prefix-overlap cues collapse)
  6. Writes transcript.md with chapters + interleaved [mm:ss] cues and ![](frame_NNN_mm-ss.jpg) references

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
  • --whisper is opt-in only. Reads OPENAI_API_KEY from 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 --frames for 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 /recall integration 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.