$ cat ~/map/pi-watch.md
pi-watch
Lets pi watch video: /watch turns a file or URL into a timestamped transcript plus sampled frames.
extensions✓ Oct 22
Facts
- repository
- github.com/mimimaster/pi-watch ↗
- GitHub Stars
- ★ 0
- Forks
- 0
- license
- MIT
- npm / mo
- —
- last push
- Oct 21, 2026
install
pi install npm:pi-watch, or pi install git:github.com/mimimaster/pi-watch from a checkout; requires ffmpeg and ffprobe (yt-dlp for URL sources) and Node.js 22.19.0 or newer## TL;DR
A pi coding-agent extension whose /watch command preprocesses a local video file or URL into a timestamped transcript plus sampled JPEG frames and injects them into the session, so a model without native video modality can still watch.
## Key points
- $/watch <local-path-or-url> turns video into a timestamped transcript plus sampled JPEG frames, injected via sendUserMessage as text and image/jpeg parts; if the host rejects image parts, the prompt lists the frame file paths for Read instead.
- $Transcript sources are tried in order: embedded subtitle track, sibling .vtt/.srt files, yt-dlp subtitles, then a local Whisper binary (mlx-whisper on Apple Silicon or whisper-cli from whisper.cpp), and frames only with a note as the last resort.
- $System tools are detected, never vendored: ffmpeg and ffprobe are required, yt-dlp covers URL sources, and /watch doctor prints install hints for anything missing without crashing.
- $Frame sampling is adaptive with a default cap of 100 JPEGs at about 768px wide; short clips are sampled denser, long clips sparser.
- $The default maximum duration is 20 minutes; longer files are rejected unless --start/--end selects a window of at most 20 minutes, with times given in seconds (12.5) or clocks (1:30, 0:01:30).
- $Dropping a video file into the TUI triggers the same pipeline through the interactive input hook; pasted URLs do not auto-download — use /watch <url> explicitly.
- $/watch status reports the last run in the session, and temporary files live under pi-watch-* in the process temp dir.
- $A piwin variant installs as a standalone managed extension from Git and does not patch piwin core; a future pi attachment hook could absorb it without forking the host.
## FAQ
Q Does pi-watch need a model with native video support?
No. It exists for models without a video modality: the transcript arrives as text and the frames as image parts models already accept.
Q Which system tools does it require?
ffmpeg and ffprobe are required — without them /watch refuses — while yt-dlp is only needed for URL sources and a Whisper binary only when no captions exist.
Q Will it download a video when I paste a URL into the prompt?
No. URL paste does not auto-download; run /watch <url> explicitly, and use the yt-dlp-backed fetching only on content you have the right to download and process.
Q How long a video can it take?
20 minutes by default; longer files are rejected unless --start and --end select a window of at most 20 minutes.
## References
## Related entries
$ pi-conversation-timer
Statusline timer that counts only active task seconds, frozen while pi waits, with a /chat-time stats popup.
$ pi-reddit
Reddit tools for the pi agent: the audited reddit-mcp-server bridged over local stdio, with confirmation-gated writes.
$ pi-shell-jobs
Managed background shell jobs for pi: long commands and interactive terminals keep running across /reload.
## Guides
Last updated: Oct 21, 2026