video-digest
Agents can't watch video. video-digest turns a screen recording, bug repro, demo or talk into
something an LLM can read in one pass: a Markdown timeline of what changed on screen, the few key
frames that matter, the text on them, and what the pointer did, all on your machine.
From a real bug repro, a React app's error overlay:
- [00:00.0] **frame 1** · settled 1.0s → frames/001_00m00.0s.jpg
- [00:01.0] **frame 2** · settled 1.2s · after click "Underli..." at (234,496) · disappeared middle-left
- [00:02.2] back to frame 1 (same screen) · transient 900ms · after click "Underline" at (257,425)
- [00:03.3] **frame 3** · settled 2.3s · after click "Wor B..." at (240,552) · appeared middle-left:
"Uncaught runtime errors: ERROR durationInFrames must be positive, but…" · ⚠ error
Quick start
pip install 'video-digest-cli[mcp]' # or: uvx --from video-digest-cli video-digest bug.mov
video-digest bug.mov --print # Markdown timeline to stdout
claude mcp add video-digest -- uvx --from 'video-digest-cli[mcp]' video-digest-mcp # Claude Code
What it does
| Change detection | Samples the video (10 fps for clips under 2 min, 4 fps up to 10 min, 1 fps beyond), diffs grayscale frames, and keeps a frame only when the screen really changes. Pointer-sized blobs don't count. |
| Settled / transient / motion | A state held ≥ 1 s is settled. Shorter is transient (toasts, spinners, error flashes: often the bug). Animation, scrolling and embedded video are motion. A run of short, never-repeating states becomes one motion segment. |
| Repeats | A screen that matches an earlier one becomes "back to frame N" and costs no image. A brief change that snaps back is folded in as "flickered N×". |
| Diff regions | Bounding boxes of what changed, labelled appeared / disappeared / changed plus a position (top-right, …), with a crop and the OCR text inside the box ("appeared bottom-right: 'Invalid code'"). |
| Pointer + clicks | Tracks the system pointer (a small dark-and-light blob that moves). If the pointer came to rest just before a change, it's an inferred click, labelled with the text under it. If it was still moving, it's a hover. |
| OCR | macOS Vision when pyobjc-framework-Vision is installed (fast, accurate), else the Tesseract CLI, else none. |
| Transcript | --transcript talk.vtt (or .srt) aligns speech per segment. --whisper base runs local faster-whisper if installed. |
| Budget | --budget N caps the key frame images. Frames are ranked by first/last position, transient status, change size and duration, then shown in order. |
| Busy areas | In videos 30 s or longer, areas that change all the time (webcam tile, playing video) are masked out and named in the header. In videos over 5 min, a new state also needs ≥ 1 % of the frame to change, which keeps slides and drops speaker badges. |
Output in -o out/:
digest.md: the timeline plus a "Key frames" section with images and on-screen text.frames/NNN_MMmSS.Ss.jpg: key frames (1280 px wide), with_rN.pngcrops of the changed regions.digest.json: everything, machine-readable, including segments, regions, actions, the cursor track, settings and timings.
Install
The PyPI package is video-digest-cli; it installs the video-digest and video-digest-mcp commands. Needs Python ≥ 3.10. ffmpeg is recommended (faster decoding and seeking); without it, OpenCV decodes.
pip install 'video-digest-cli[mcp]' # + '[vision]' on macOS for Apple's OCR
brew install ffmpeg tesseract # optional, but recommended
CLI
video-digest bug.mov # -> bug.digest/digest.md
video-digest bug.mov -o out/ --budget 12 --print
video-digest talk.mp4 --transcript talk.vtt --budget 30
video-digest flow.mov --fps 15 --settle 0.5 --sensitivity 2 # catch smaller / faster changes
MCP server (Claude Code, Cursor, …)
claude mcp add video-digest -- video-digest-mcp # if installed with pip
claude mcp add video-digest -- uvx --from 'video-digest-cli[mcp]' video-digest-mcp # nothing to install
Other MCP clients: run video-digest-mcp as a stdio server.
Tools:
watch_video(path, budget=12, transcript=None, include_images=True)returns the timeline and the key frame images in one tool result. Results are cached in~/.cache/video-digestby file and budget.frame_at(path, t)returns one full frame at a timestamp, for a closer look at a moment from the timeline.
Then ask: "watch ~/Desktop/bug.mov and tell me what broke".
Limits
- Clicks are inferred: the mouse button isn't visible in most recordings, and a pointer that is hidden or very small isn't tracked.
- Tuned for screen recordings. Camera footage changes every frame and mostly comes out as motion; use scene detection for that.
- Long videos load all samples into memory (capped at ~600 MB by lowering the analysis width).
- Library-wide search, speaker-labelled transcripts, long-video processing and sharing are what the hosted ContentIndexer API does.
Development
git clone https://github.com/scotthavird/video-digest && cd video-digest
uv venv && uv pip install -e '.[dev,mcp,vision]'
.venv/bin/python -m pytest tests -q
The tests build a synthetic screen recording (page → pointer glides and rests on a button → 400 ms
toast → back → new page) and check states, transient detection, click inference, budget, CLI and MCP.
python docs/make_demo.py rebuilds the demo GIF from that same clip (needs agg).
How it was tuned on real recordings: SPIKE_NOTES.md.
Releases: bump version in pyproject.toml and video_digest/__init__.py, then push a vX.Y.Z tag.
The release workflow builds and publishes to PyPI (trusted publishing) and creates the GitHub release.
MIT licensed.
Metadata
Release files for video-digest-cli 0.1.0
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | Provenance | Actions |
|---|---|---|---|---|
| video_digest_cli-0.1.0.tar.gz | 27.5 kB | With provenance | Details for video_digest_cli-0.1.0.tar.gz |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Actions Reset |
|---|---|---|---|---|
| video_digest_cli-0.1.0-py3-none-any.whl | Python 3 | none | any | Details for video_digest_cli-0.1.0-py3-none-any.whl |
Total release size: 53.2 kB
Release files / video_digest_cli-0.1.0.tar.gz
| Download URL | video_digest_cli-0.1.0.tar.gz |
|---|---|
| Size | 27.5 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
8022d5731d21054a71bb41a2baa765ba0a92cddbc58d44cff68b1e4e7912d0a7
|
|
BLAKE2b-256 checksum How to use checksums |
f566941cb593fb83517100bf4cc5f330feec07cac6f553d5764413c676b15ba4
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/7.0.0 CPython/3.13.16
|
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
PyPI Publish Attestation
PyPI verified that this artifact, at this checksum, originated from the publisher listed below.
Signed by GitHub Actions, verified by PyPI on Dec 2, 2026.
Transparency logRelease files / video_digest_cli-0.1.0-py3-none-any.whl
| Download URL | video_digest_cli-0.1.0-py3-none-any.whl |
|---|---|
| Size | 25.7 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
681f5316ec731990adb980427bd2a3bcf9d5ba9fecd5baef6357f97264355266
|
|
BLAKE2b-256 checksum How to use checksums |
ded32162694fb433a1aee149cf99ff4249cb096884d28812a41968287e886c11
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/7.0.0 CPython/3.13.16
|
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
PyPI Publish Attestation
PyPI verified that this artifact, at this checksum, originated from the publisher listed below.
Signed by GitHub Actions, verified by PyPI on Dec 2, 2026.
Transparency logSecurity for video-digest-cli 0.1.0
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
Full provenance
Both files in this release have been uploaded with provenance metadata.
Attestation for video_digest_cli-0.1.0.tar.gz
PyPI Publish Attestation
PyPI verified that this artifact, at this checksum, originated from the publisher listed below.
Signed by GitHub Actions, verified by PyPI on Dec 2, 2026.
Transparency logA note on package security
PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.
To learn more about protecting yourself from malicious actors, visit our package security documentation.