
Vidgrid — eyes for video
io.github.pawvej由 GitHub 帳號 pawvej 發布v0.1.0更新於 Oct 24, 2026
Give an AI agent eyes for video: turn a clip into a numbered frame grid + transcript.
概覽
Vidgrid 把影片片段轉成附編號的畫面網格與逐字稿,讓助理透過視覺模型「看」影片。
- 可以做什麼
- 將影片算繪成附註解的影像網格:預設每秒取一格畫面,拼成帶時間戳的編號格子,並自動選擇網格尺寸與圖片數量。
- 以 Whisper 轉錄音訊,讀寫 JSON、SRT、TXT 三種字幕格式,也可把字幕燒錄進網格圖。
- 把網格圖加逐字稿連同提示詞送給 Claude、GPT 或 Gemini,並回傳回答。
- 以 Python API 提供同一套算繪流程,方便腳本化批次處理。
- 適用情境
- 適合讓助理不必親自觀看就能摘要演講或會議、在螢幕錄影中定位某個特定時刻,或依鏡頭清單對一批短片排序與篩選。
- 執行需求
- 以本機 Python 套件執行(需 Python 3.9+),並要求 ffmpeg 位於 PATH 中;轉錄需安裝 transcribe 附加元件,呼叫模型需安裝 anthropic、openai 或 google-genai 附加元件及對應服務商憑證。Vidgrid API 金鑰透過環境變數 VIDGRID_API_KEY 提供。
安裝
在 SourceWeft 中
- 開啟 儀表板中的 Vidgrid — eyes for video,將其新增到工作區。
- 為需要使用其工具的對話啟用該服務。
Desktop only,透過 STDIO。 STDIO 服務會啟動本機處理程序,因此需要 SourceWeft 桌面主機。
其他 MCP 客戶端
參照 儲存庫 中的啟動說明。
README
vidgrid
[PyPI] [Python] [License: MIT] [Downloads]
Convert video clips into annotated image grids for vision LLM analysis. One cell = one second, by default.
LLMs can't watch video, but they can analyze a single image. vidgrid samples
one frame per second from a video, tiles them into a numbered storyboard with
timestamps, and optionally sends the result to Claude, GPT, or Gemini with a
prompt. The result is something close to "my LLM just watched a video" for
the cost of a handful of image uploads.
The model
One cell = one second, by default. The auto-picker chooses the smallest
grid (biggest, most-legible cells) whose board count stays under
--max-boards (default 10). When that's not enough for a long clip, it
bumps the grid up; as a last resort, it reduces the sampling rate. Override
with --fps and --max-boards for full control.
- Grid size determines how many seconds fit in one photo
- Default sampling is 1fps; drops below 1fps only when needed to stay under the max-boards cap
- Videos over 5 minutes are rejected (chop them up first)
Quality degrades with bigger grids. Cells shrink, detail is lost, and the LLM has a harder time reading fine content like text or UI elements. Stick with 3×3 unless you specifically need to pack more seconds into one photo. 5×5 exists mostly as a "let me see what happens" option.
How many photos a video produces
At 1fps sampling, the board count at each grid size:
Bold = what auto picks — the smallest grid (biggest cells) that
keeps the board count under --max-boards (default 10).
¹ At the 5-min cap, even 4×4 exceeds 10 boards at 1fps, so auto drops
the sampling rate (≈1 cell per 1.9s) to land at the 10-board limit. Use
--fps 1.0 --max-boards 20 to preserve 1fps and accept more boards.
Most vision LLMs accept ~10–20 images per request, so auto's default ceiling of 10 keeps a full video inside a single model call.
Install
Requires Python 3.9+ and ffmpeg on your PATH.
Quick start
Three things you can do with it
1. Summarize a talk without watching it
vidgrid samples one frame per second, runs Whisper on the audio, sends the grid + transcript to Claude, and prints the answer. The model correlates frames and words via the burned-in timestamps.
2. Find a specific moment in a screen recording
Because cells are globally numbered (1, 2, 3...) and tagged with timestamps, the model can point you at the exact moment. No scrubbing.
3. Rank a pile of stock footage
Send the PNGs to Claude in a single request and ask it to rank or reject clips against your shot list. This is the workflow vidgrid was built for.
Portrait vs landscape
vidgrid keeps the grid shape square (N×N) regardless of source orientation and preserves the source aspect inside each cell. Landscape sources produce wide boards; portrait sources produce tall boards. Cells are never cropped.
Two-layer captions (default)
The default mode gives the LLM two correlated inputs: the rendered grid image AND the Whisper transcript as separate text. The model correlates them via the timestamps printed on each cell.
This beats burning captions into the image because:
- Frames keep their pixels for actual content
- Text is higher fidelity as tokens than as baked-in pixels
- The grid stays clean and shareable
Add --burn-captions if you want a self-contained image (useful for sharing
or offline analysis).
Caption file formats
vidgrid reads and writes three caption formats. The --captions flag
auto-detects from the file extension. The --transcript-format flag
controls what --transcribe writes.
JSON (default, Remotion-compatible):
SRT (SubRip subtitles):
TXT (plain timestamped text, one word per line):
Use any format as input, output, or both. You can mix — read an .srt and
write a .txt with --captions foo.srt --transcript-format txt.
Python API
Modules: vidgrid.probe, vidgrid.sample, vidgrid.compose,
vidgrid.captions, vidgrid.llm, vidgrid.presets.
Output structure
Single-board run:
Multi-board run:
Cells are numbered globally across boards. A 3-board run has cells 1–27 so the LLM can reference any frame without ambiguity.
Limits and caveats
- 5-minute hard cap on video length. Longer videos are rejected. Chop
them up with
ffmpeg -ss START -t 300 input.mp4 chunk.mp4. - No scene detection. v1 samples strictly 1 frame per second, uniform. No dedupe, no shifting — the spacing is always exactly 1 second.
- Variable-framerate videos may have sub-frame seek drift (≤1 frame), which is acceptable at 1fps sampling.
- Bigger grids hurt legibility. A 5×5 grid has cells ~300px wide; fine for people and objects, marginal for dense text or code. Stick with 3×3.
- LLM integration uses the official SDKs (anthropic, openai, google-genai) and won't be installed unless you request them as extras.
Prior art
- IG-VLM — research paper proving the grid trick works
- llm-video-frames — Simon Willison's per-frame approach
- vcsi — contact sheets without LLMs
- byjlw/video-analyzer — whisper + sequential frames
vidgrid's differentiator: 1 cell = 1 second, numbered cells, simple CLI, multi-provider LLM integration in one package.
License
MIT. The bundled Source Sans 3 font is licensed under SIL OFL 1.1.
來源:README.md,提交 f4f35bd
工具
0版本歷史
1- v0.1.0最新Sep 16, 2026
評分
已滿足適用檢查項的 50%
該評分衡量此收錄條目的完整程度,依據註冊中心條目、端點與公開來源計算得出。它不是對伺服器本身的評價,也不表示伺服器安全或目前可用:可連通性是帶日期的檢查結果,評分也不包含安裝量或使用者評價。
- 近 30 天內可連通25 分
請保持端點能夠回應 MCP 握手;SourceWeft 每 30 天探測一次。
- 已宣告認證方式10 分
請在註冊中心條目中宣告憑證請求標頭,或保持端點能夠回應探測,以便判定其認證方式。
- 已列出工具15 分
請讓伺服器在無憑證時回應 tools/list,或發布可在沙箱中無憑證啟動的軟體包。
- 描述必需15 分
- 圖示10 分
- 文件15 分
- 授權條款10 分