Vidin

io.github.teunlao由 GitHub 帳號 teunlao 發布v0.1.0更新於 Oct 24, 2026

Turn a screen recording into agent-readable annotated keyframes. MCP server + CLI on ffmpeg.

已驗證STDIO僅桌面開發者工具媒體與設計

概覽

AI 產生的概覽

本機 MCP 伺服器兼命令列工具,把螢幕錄影轉成附標註的關鍵影格與文字時間軸,供助理閱讀。

可以做什麼
把影片分析成磁碟上的附標註影格,回傳報告文字和一張聯絡表圖片(analyze_video)。依影格編號或時間範圍取得完整細節影格,並限制數量以免佔滿上下文(get_frames)。當兩個影格不足以說明問題時,以更高影格率重新擷取某個窄時間區間(zoom_clip)。低成本讀取長度、解析度、影格率和音訊資訊(probe_video)。輸出包含時間軸報告、機器可讀清單、聯絡表和標註影格。
適用情境
當錯誤回報或操作示範以螢幕錄影形式提供,而只接受圖片、不接受影片的程式開發助理需要了解發生什麼事時適用。它只保留畫面變化後穩定下來的影格,因此長錄影的檢視成本較低。
執行需求
透過 npx 從 npm 套件以 stdio 在本機執行;需要安裝 ffmpeg,僅在傳入影片網址時才需要 yt-dlp。未宣告驗證、環境變數或請求標頭。僅支援桌面端。
安裝前請注意
會將輸出檔案寫入磁碟(.vidin 輸出目錄),傳入網址時會下載遠端影片,因而向第三方發出請求。不回報指標位置和點擊,不偵測水平捲動,低於預設門檻的小變化可能被漏掉,除非提高靈敏度。

安裝

在 SourceWeft 中

  1. 開啟 儀表板中的 Vidin,將其新增到工作區。
  2. 為需要使用其工具的對話啟用該服務。

Desktop only,透過 STDIO。 STDIO 服務會啟動本機處理程序,因此需要 SourceWeft 桌面主機。

其他 MCP 客戶端

參照 儲存庫 中的啟動說明。

README

vidin

Turn a video into something a coding agent can actually read.

Claude Code, Codex and friends accept images, not video. So when a bug report arrives as a screen recording, the video is dead weight — someone has to watch it and retype what happened. vidin watches it instead: it converts the recording into a small set of annotated keyframes plus a written timeline, and serves them to agents over MCP.

[A 20-second recording condensed to six annotated frames]

A 20-second recording in, six frames out: the refund panel, the 500 dialog, the retry toast, the recovery — each boxed and timestamped. (The clip is vidin's synthetic test fixture.)

  • Event-driven, not one-frame-per-second. A frame is kept when the screen changes and then comes to rest. Three minutes of someone reading costs almost nothing; every real UI event is captured.
  • Fast. A 3-minute 1080p recording takes ~4 seconds on an M-series Mac. An hour-long one costs time, not RAM.
  • One command to run. npx @teunlao/vidin — all it asks of the machine is ffmpeg; no sharp, no headless browser, no native image library.
  • Shaped for agent context. The MCP tools return a written report and one contact sheet first; full-detail frames only for the moments that turn out to matter.
  • Timestamps you can scrub to. An agent can say "the error appears at 00:41.2" and you jump straight there in the original file.

Quickstart

sh
brew install ffmpeg        # + yt-dlp, only if you'll pass URLs

Hook it into Claude Code:

sh
claude mcp add vidin -- npx -y @teunlao/vidin mcp

Or in .mcp.json / ~/.codex/config.toml equivalents:

json
{  "mcpServers": {    "vidin": { "command": "npx", "args": ["-y", "@teunlao/vidin", "mcp"] }  }}

Or straight from the shell:

sh
npx @teunlao/vidin ~/Desktop/bug.mov       # → ./.vidin/bug/npm i -g @teunlao/vidin                    # or put `vidin` on PATH for goodvidin https://example.com/screencast.mp4   # downloaded with yt-dlpvidin zoom bug.mov --from 00:41 --to 00:45 --fps 6vidin probe bug.mov

What comes out

out/  REPORT.md        the entry point: timeline table, what changed where, what to open  manifest.json    the same, machine readable  sheets/          the whole video as labelled 3x3 grids (~1.3k tokens each)  frames/          full-detail annotated frames

[An annotated frame: red dashed box around the error dialog, timestamp bar]

Each frame carries a red dashed box around the regions that changed since the previous kept frame, and a bottom bar with the frame number, the timestamp in the original video, the gap since the previous frame, why the frame was kept, and how much of the screen changed.

The MCP tools

Four tools, shaped so an agent spends context in the right order:

toolwhat it does
analyze_videovideo → frames on disk; returns the report text and one contact sheet image
get_framesfull-detail frames by number or time range, capped so a call can't flood the context
zoom_clipre-extract a narrow window at a higher frame rate — for the moment two frames don't explain
probe_videoduration / resolution / fps / audio, cheap

The intended loop: analyse → look at the sheet → read the timeline → open two or three frames → zoom in if the moment between them is still unclear. Opening everything up front would burn the context before knowing which second matters.

Profiles and tuning

profilefor
bug-reportdefault — someone recorded a screen, narrated a bug, stopped
denseshort clips where every twitch matters (24 fps analysis, up to 80 frames)
walkthroughlong recordings; fewer frames, wider anchors
cheapsmallest footprint, for when the context really is tight (12 frames at 1092px)

Tuning without leaving the profile: --max-frames, --sensitivity (percent of the screen that counts as an event, lower = more frames), --fps, --width, --quality, --no-annotate, --no-sheets.

Why pick frames instead of slicing them

One screenshot per second turns three minutes into 180 frames of which ~90% are identical, because the person was reading, thinking or moving the mouse. Those duplicates don't cost much — they bury the handful of frames where something actually happened, and an agent has to look at all of them to find out which. Frame selection is a signal-to-noise problem wearing a cost problem's clothes.

vidin is event driven instead. It walks the video at 12 fps in downscaled RGB and keeps a frame only when something actually happened:

  • Change is measured against the last kept frame, not the previous sample, so slow drift accumulates instead of hiding under the threshold.
  • Frames land after the change, not inside it. When motion starts, nothing is emitted yet — the selector waits for the screen to come to rest and keeps the settled frame. You get the state after the click, not the animation blur.
  • Colour counts as change. Comparison is per channel, not on brightness. A field turning red or a green toast over a grey panel barely moves the luma and is exactly what a bug report is about.
  • A moving mouse costs nothing, by arithmetic rather than special-casing: at analysis resolution a pointer is an order of magnitude below the event threshold. There was once a subsystem for recognising it; measured on real recordings it changed no decision anywhere, so it is gone.
  • Guard rails. A minimum gap, anchor frames across long still stretches, periodic samples while a long animation runs, and a hard budget (40 frames by default) that drops the least informative frames first while keeping the ends of the timeline.

Two invariants hold whatever path a frame took:

  • Nothing is dropped silently. The comparison baseline only ever advances by keeping a frame. There is no path that folds a changed screen into the baseline without emitting it — that would make the change unrecoverable, since every later comparison would measure zero against a state you never see.
  • Annotations describe the neighbour you can actually see. After the frame budget prunes the middle of the timeline, every survivor's change percentage and boxes are recomputed against the frame that now precedes it.

How it works

ffmpeg ─raw RGB @12fps, 400px─ selector ──timestamps+regions── ffmpeg ──annotated WebP         one decode pass,         event state machine            drawbox/drawtext         streamed                 in plain TypeScript            per frame

Decoding streams two frames at a time; the selector additionally keeps the downscaled buffers of the frames it has kept so it can recompute their deltas after pruning. That is bounded by the frame budget, not by video length: ~32 MB at the defaults. All drawing is done by ffmpeg filters, which is why there is no image library in package.json.

Development

Development runs on Bun; the runtime code itself sticks to node: APIs, which is what lets the published package run anywhere npx does.

sh
git clone https://github.com/teunlao/vidin && cd vidin && bun installbun test

The fixture is a synthetic screen recording with a scripted timeline — a panel, an error dialog, a toast, a recovery, and two stretches of pointer-only motion. The suite asserts that each staged event yields exactly one settled frame and that pointer motion alone yields none. test/regressions.test.ts builds its own clips and pins every failure a review has found, so a fixed bug stays fixed.

Not there yet

  • Audio transcript. Narration is the highest-signal part of a bug report. Planned: local Whisper (whisper.cpp or mlx-whisper) → a transcript.md aligned to the frame timeline.
  • OCR over kept frames, so an agent can grep an error message without spending vision tokens at all.
  • Pointer position and clicks are not reported — deliberately. A drawn crosshair was checked against a real recording and was right about half the time: a growing DevTools request list moves down the screen exactly like a pointer does. A wrong marker asserts "the user was pointing here" on a coin flip, and the pointer is plainly visible in the frame anyway.
  • Horizontal scroll is not detected; vertical is.
  • Small elements need a nudge. The default event threshold is 0.4% of the screen, so a progress bar or a badge below that is not an event on its own. --sensitivity 0.2 or --profile dense catches them, at the cost of more frames.

來源:README.md,提交 5a7c84e

工具

0
SourceWeft 尚未在沙箱中啟動過該軟體包,因此其工具未知。

版本歷史

1
  1. v0.1.0最新Sep 16, 2026

評分

已滿足適用檢查項的 50%

該評分衡量此收錄條目的完整程度,依據註冊中心條目、端點與公開來源計算得出。它不是對伺服器本身的評價,也不表示伺服器安全或目前可用:可連通性是帶日期的檢查結果,評分也不包含安裝量或使用者評價。

  • 近 30 天內可連通25 分

    請保持端點能夠回應 MCP 握手;SourceWeft 每 30 天探測一次。

  • 已宣告認證方式10 分

    請在註冊中心條目中宣告憑證請求標頭,或保持端點能夠回應探測,以便判定其認證方式。

  • 已列出工具15 分

    請讓伺服器在無憑證時回應 tools/list,或發布可在沙箱中無憑證啟動的軟體包。

  • 描述必需15 分
  • 圖示10 分
  • 文件15 分
  • 授權條款10 分