Watch Video

io.github.marwanm7moud由 GitHub 账号 marwanm7moud 发布v0.2.0更新于 Nov 7, 2026

Let an AI watch a video: timestamped transcript, scene-selected keyframes and exact frames. Local.

已验证STDIO仅桌面媒体与设计AI 与机器学习

概览

AI 生成的概览

本地 MCP 服务器,让助手“观看”本地文件或网址视频,返回带时间戳的转写文本和场景选取的关键帧,并可再取精确帧。

可以做什么
  • 获取视频概览:元数据、章节、完整转写文本和关键帧拼图,可选开启 OCR 读取画面文字
  • 按指定时间点提取精确帧,或在某个时间段内均匀取帧
  • 检测硬切镜头与每分钟切换次数,用于判断节奏或画面变化
  • 读取某段转写文本,或按词语、短语搜索转写并返回时间戳
  • 检查检测到的工具、GPU 和当前使用的转写配置
适用场景
适合让助手总结视频内容或回答关于视频的问题,包括幻灯片、代码、图表、界面等画面信息;也适合私密录像或不愿上传到云端服务的场景。
运行要求
以本地 Python 包运行(需 Python 3.10+),PATH 中需有 ffmpeg 和 ffprobe,以 stdio 方式注册。无需 API 密钥或账号。首次转写会下载约 650 MB 的 Parakeet 模型;Whisper 与 OCR 为可选组件。可选配置包括 VIDEO_MCP_CACHE、VIDEO_MCP_LANG、VIDEO_MCP_THREADS 和 VIDEO_MCP_AVX512。
安装前请注意
帧和转写结果会缓存在本地缓存目录,占用磁盘空间,需手动清理。CPU 上的长视频转写负载较重;设置 VIDEO_MCP_AVX512=1 会带来非常高的持续负载。帧是抽样得到的,转写可能听错人名和术语,画面上的精确文字应以高清帧确认。仅处理你有权访问和处理的视频,并遵守各网站条款与版权。

安装

在 SourceWeft 中

  1. 打开 控制台中的 Watch Video,将其添加到工作区。
  2. 为需要使用其工具的对话启用该服务。

Desktop only,通过 STDIO。 STDIO 服务会启动本地进程,因此需要 SourceWeft 桌面宿主。

其他 MCP 客户端

参照 仓库 中的启动说明。

README

watch-video

Let Claude (or any MCP client) watch a video. Give it a local file or a URL (YouTube and 1,500+ other sites via yt-dlp) and it gets a timestamped transcript plus a handful of scene-selected keyframes, then drills into exact frames only when needed. No cloud transcription, no API keys.

text
> Watch https://www.youtube.com/watch?v=jNQXAC9IVRw and tell me what he says about the elephants.
$ video-cli overview https://www.youtube.com/watch?v=jNQXAC9IVRw --max-frames 8# Me at the zooduration: 00:19transcript: platform-subs:en, language=en, 6 segments, took 0.4skeyframes: 3 scene-selected at 00:00, 00:05, 00:11total time: 6.7s
## Transcript[00:01] All right, so here we are, in front of the elephants[00:05] the cool thing about these guys is that they have really... really really long trunks and that's cool[00:16] and that's pretty much all there is to sayIMAGE: ~/.cache/video_mcp/Youtube_jNQXAC9IVRw/sheets_8/sheet_01.jpg
Claude: He stands in front of the elephants (00:01) and says the cool thing about them istheir really long trunks (00:05). That is the whole video (00:16).

Why this one

watch-videoCloud video APIs (e.g. Gemini)Transcript-only tools
Sees the screen (code, slides, charts, UI)Yes: keyframes, hi-res frames, OCRYesNo
Runs locally, nothing uploadedYesNo: the video goes to the providerVaries
API key or accountNoneRequired, billed per useVaries
Videos without captionsLocal Parakeet / WhisperYesOften fails
Token cost of the visual pass~20 frames per contact sheet (cost of ~1.5 images)Billed by video lengthNone (no visuals)
Private recordings (meetings, bug repros)Safe: never leave the machineUploadedVaries

It ships as two parts:

  • video MCP server with seven tools (below).
  • watch-video skill that teaches Claude the cheap-first workflow: overview, then frames, then ranges.

How it works

StepWhat happens
TranscriptPlatform subtitles if the video has them (seconds), else Parakeet TDT 0.6B v3 (int8, CPU, 25 European languages), else faster-whisper large-v3-turbo (other languages, GPU or language="auto").
KeyframesDecodes only keyframes at thumbnail size, drops repeats and static slides, then fills the largest time gaps. The selection adapts to how much the video changes (screencast vs. action).
Contact sheetsLabelled frames tiled into grids: about 20 frames for the token cost of 1.5 full frames. Black bars are cropped automatically.
Drill-downget_frames seeks to exact timestamps at 1280 px (readable code and charts). For URLs it seeks into the stream without downloading the whole video.

Everything is cached under ~/.cache/video_mcp, so repeat calls are instant.

Measured on a mid-range CPU (i5-11400, no GPU): 35.7-minute local video overview in about 2.6 minutes; YouTube video with subtitles in about 7 seconds; a drill-down frame in about 0.5 seconds.

Install

Requirements: Python 3.10+ and ffmpeg (including ffprobe) on your PATH.

Claude Code: one command (plugin)

Installs the MCP server and the skill together. Needs uv for uvx.

text
/plugin marketplace add marwanm7moud/watch-video/plugin install watch-video@watch-video

Any agent: package, server, skill

bash
pipx install watch-video-mcp          # or: uv tool install watch-video-mcp / pip install watch-video-mcp# optional extras: Whisper (non-European languages / GPU) and OCR (on-screen text as text)pipx install "watch-video-mcp[whisper,ocr]"# latest from GitHub instead of PyPI:pip install git+https://github.com/marwanm7moud/watch-video

No install needed to try the CLI: uvx --from watch-video-mcp video-cli hw.

Install ffmpeg with winget install Gyan.FFmpeg (Windows), brew install ffmpeg (macOS) or sudo apt install ffmpeg (Linux). The first transcription downloads the Parakeet model (about 650 MB).

Register the MCP server

Claude Code:

bash
claude mcp add video --scope user -- video-mcp

Claude Desktop (claude_desktop_config.json) or any other MCP client:

json
{ "mcpServers": { "video": { "command": "video-mcp" } } }

If video-mcp is not on your PATH, use the full path to the executable or python -m video_mcp.server.

Install the skill

The skill works with or without the MCP server: it falls back to video-cli and installs it on first use. Copy the skill folder so your agent knows when and how to use the tools:

bash
# macOS / Linuxmkdir -p ~/.claude/skills && cp -r skills/watch-video ~/.claude/skills/# Windows (PowerShell)Copy-Item -Recurse skills\watch-video $HOME\.claude\skills\

Then ask Claude: "Watch https://youtu.be/... and summarize it", or "At what point do they explain the stop-loss, and what does the chart show then?"

Tools

ToolUse
video_overview(source, max_frames=40, ocr=False)Start here: metadata, chapters, full transcript, contact sheets. ocr=True adds on-screen text.
get_frames(source, timestamps, hi_res=True)Exact frames ("12:30", "1:02:05" or seconds), up to 20.
scan_range(source, start, end, count=12)Evenly spaced frames in one sheet, to follow motion or a demo.
find_cuts(source, start, end, threshold=0.2)Hard cuts (shot or screen changes) and cuts per minute, for pacing.
get_transcript(source, start, end)Transcript slice.
search_transcript(source, query)Timestamped hits for any of the words, exact phrase first; plus on-screen text after an ocr=True overview.
check_hardware()Detected tools, GPU and the transcription profile in use.

Command line

The same operations work without MCP:

bash
video-cli overview video.mp4 --max-frames 16video-cli overview demo.mp4 --ocr          # also read code/slides on screenvideo-cli frames https://youtu.be/... 12:30 13:05video-cli range video.mp4 10:00 10:30 --count 12video-cli cuts ad.mp4                       # hard cuts + cuts per minutevideo-cli search video.mp4 "stop loss"video-cli hw

Configuration

VariableDefaultEffect
VIDEO_MCP_CACHE~/.cache/video_mcpCache directory (delete it to reclaim space).
VIDEO_MCP_LANGenDefault transcription language; auto detects it with Whisper.
VIDEO_MCP_THREADS4 (CPU)Threads for CPU transcription.
VIDEO_MCP_AVX512unsetSet to 1 to let Whisper use AVX-512 (faster, but a very heavy sustained load).

On CPU the server runs below normal priority, one heavy job at a time, with Whisper held to AVX2, so a long transcription does not freeze your desktop.

Limitations

  • English is assumed unless you pass language. Parakeet covers 25 European languages on CPU (language="de", "fr", "es", ...). Other languages (Arabic, Chinese, Japanese, Hindi, ...) need Whisper, which is slow on CPU.
  • Frames are sampled, not every frame is analysed; the transcript can mishear names and terms. The skill tells Claude to cite timestamps and confirm exact on-screen text with a hi-res frame.
  • Use it only on videos you are allowed to access and process; respect each site's terms and copyright.

Development

bash
pip install -e ".[dev]"ruff check .pytest

License

MIT. See LICENSE.

来源:README.md,提交 399bda3

工具

0
SourceWeft 曾在隔离沙箱中以无凭据方式启动该软件包一次,以列出其工具,但未能完成:该软件包类型无法在沙箱中运行。

版本历史

1
  1. v0.2.0最新Oct 31, 2026

评分

已满足适用检查项的 50%

该评分衡量此收录条目的完整程度,依据注册中心条目、端点与公开来源计算得出。它不是对服务器本身的评价,也不表示服务器安全或当前可用:可连通性是带日期的检查结果,评分也不包含安装量或用户评价。

  • 近 30 天内可连通25 分

    请保持端点能够响应 MCP 握手;SourceWeft 每 30 天探测一次。

  • 已声明认证方式10 分

    请在注册中心条目中声明凭据请求头,或保持端点能够响应探测,以便判定其认证方式。

  • 已列出工具15 分

    请让服务器在无凭据时响应 tools/list,或发布可在沙箱中无凭据启动的软件包。

  • 描述必需15 分
  • 图标10 分
  • 文档15 分
  • 许可证10 分