video

Compare original and translation side by side

🇺🇸

Original

English
🇨🇳

Translation

Chinese
Analyze the given video and answer the user's question (or summarize it if no question was asked). Always cite timestamps (
M:SS
) in your answer.
分析给定的视频并回答用户的问题(如果未提出问题,则总结视频)。回答中始终引用时间戳(
M:SS
)。

Route A — video-analyzer MCP tools available (preferred)

路径 A — 可用 video-analyzer MCP 工具(首选)

If the
video-analyzer
MCP server is connected in this session, call its tools directly — do not use the CLI:
  • General question or no question →
    analyze_video
    (detail
    "standard"
    )
  • "What happens at X:XX" / a specific moment →
    analyze_moment
    (time range) or
    get_frame_at
  • Question answerable from speech alone →
    get_transcript
    (fast, no download)
  • Title / duration / views / comments only →
    get_metadata
    (no download)
  • Motion or fast UI changes →
    get_frame_burst
Dense UI capture (terminal, dashboard, IDE, spreadsheet — the meaning is in small text): pass
maxWidth
on any of these tools. Emitted frames are capped at 800 px wide by default, which turns a 1920×1080 screencast into 800×450 and drops a 15 px UI font below what a vision model can read.
maxWidth: 0
keeps the source resolution; a value like
1568
is the middle ground. Native frames cost several times more context, so raise it for the close read, not for the overview.
如果当前会话已连接
video-analyzer
MCP server,请直接调用其工具——不要使用 CLI:
  • 常规问题或未提出问题 →
    analyze_video
    (detail
    "standard"
    )
  • “X:XX 时发生了什么”/某个具体时刻 →
    analyze_moment
    (时间范围)或
    get_frame_at
  • 仅凭语音即可回答的问题 →
    get_transcript
    (快速,无需下载)
  • 仅查询标题/时长/观看次数/评论 →
    get_metadata
    (无需下载)
  • 物体运动或快速变化的 UI →
    get_frame_burst
密集 UI 捕获(终端、dashboard、IDE、电子表格——关键信息是小字号文本):使用上述任一工具时都应传入
maxWidth
。输出帧的默认宽度上限为 800 px,这会将 1920×1080 的屏幕录制画面变成 800×450,使 15 px 的 UI 字体小到视觉模型无法辨认。
maxWidth: 0
会保留源分辨率;类似
1568
的值则是在两者之间取得平衡。原生帧会消耗数倍的上下文,因此仅在进行精细阅读时提高该值,而不是在概览时使用。

Route B — no MCP server (any agent with a shell)

路径 B — 无 MCP server(任何带 shell 的 agent)

Run the one-shot CLI via Bash (first run downloads the npm package — slow is not broken; progress streams on stderr):
bash
npx -y mcp-video-analyzer@latest analyze "<video-url-or-path>"
stdout is a single JSON document:
metadata
,
transcript
(timestamped entries),
ocrResults
(on-screen text),
timeline
,
warnings
, and
frames
— an array of
{ time, filePath, mimeType }
pointing to JPEG key frames on disk. Then:
  1. Parse the JSON from stdout.
  2. Read the
    frames[].filePath
    images (in parallel) when the question needs visuals.
  3. Answer from transcript + OCR + frames, citing timestamps.
Useful flags:
--detail brief|standard|detailed
(brief = metadata + transcript only, no frame extraction — the fast/cheap path),
--fields metadata,transcript
(filters the emitted JSON only; frames are still computed at standard detail),
--max-frames <1-60>
,
--max-width <px>
(frame width cap, default 800;
0
keeps source resolution — use it for dense UI captures whose payload is small text),
--language <code>
(force transcription language),
--out <dir>
(where frames are copied),
--force-refresh
. Run
npx -y mcp-video-analyzer@latest analyze --help
for the full list.
通过 Bash 运行一次性 CLI(首次运行会下载 npm package——速度慢并不代表出错;进度会流式输出到 stderr):
bash
npx -y mcp-video-analyzer@latest analyze "<video-url-or-path>"
stdout 是一个完整的 JSON 文档,包含
metadata
、
transcript
(带时间戳的条目)、
ocrResults
(屏幕文本)、
timeline
、
warnings
和
frames
。其中
frames
是由
{ time, filePath, mimeType }
组成的数组,指向磁盘上的 JPEG 关键帧。随后:
  1. 解析 stdout 中的 JSON。
  2. 当问题需要视觉信息时,并行读取
    frames[].filePath
    对应的图像。
  3. 根据 transcript、OCR 和 frames 回答问题,并引用时间戳。
实用参数:
--detail brief|standard|detailed
(brief = 仅包含 metadata + transcript,不提取帧——速度快、成本低)、
--fields metadata,transcript
(仅筛选输出的 JSON;在 standard detail 下仍会计算 frames)、
--max-frames <1-60>
、
--max-width <px>
(帧宽度上限,默认为 800;
0
表示保留源分辨率——适用于文本较小的密集 UI 捕获)、
--language <code>
(强制指定转录语言)、
--out <dir>
(帧复制到的目录)、
--force-refresh
。运行
npx -y mcp-video-analyzer@latest analyze --help
可查看完整参数列表。

Prerequisites & degradation

先决条件与降级处理

  • Node.js 22.12+ (required).
    ffmpeg
    is bundled — no install needed.
  • Platform URLs (YouTube, Instagram, TikTok, …) require
    yt-dlp
    on PATH; direct
    .mp4/.webm/.mov
    URLs and local files work without it. Loom transcript, metadata, and comments need no
    yt-dlp
    either. Loom frames usually do — Loom serves most videos as separate DASH video+audio streams that only
    yt-dlp
    fetches and merges; a CDN fallback covers some videos without it.
  • The tool never fails on partial results: the
    warnings
    array carries actionable hints (yt-dlp install,
    YTDLP_COOKIES_FROM_BROWSER
    for Instagram/age-restricted, missing Whisper backend). Relay relevant warnings to the user instead of treating them as errors.
  • An empty transcript alongside a "silent audio" warning means the video genuinely has no speech (common for muted Reels/Stories) — that is content, not a failure.
  • Only
    http(s)
    URLs to public addresses are accepted. A URL on
    localhost
    , a private/LAN range, a
    .local
    name, a UNC share, or a non-HTTP scheme is rejected up front with a message saying so — that is a deliberate refusal, not a transient error, so do not retry it or try to work around it. When the user really does want a video from their own network, tell them to restart the server with
    MCP_ALLOW_PRIVATE_URLS=1
    . Cloud metadata endpoints stay blocked even then.
  • Node.js 22.12+(必需)。
    ffmpeg
    已捆绑,无需另行安装。
  • 平台 URL(YouTube、Instagram、TikTok 等)要求系统 PATH 中提供
    yt-dlp
    ;直接使用
    .mp4/.webm/.mov
    URL 或本地文件时无需安装。Loom 的 transcript、metadata 和 comments 同样不需要
    yt-dlp
    ,但通常提取 Loom frames 需要它——Loom 会将大多数视频作为独立的 DASH 视频流和音频流提供,而只有
    yt-dlp
    能获取并合并这些流;对于部分视频,也可以通过 CDN fallback 在没有
    yt-dlp
    的情况下处理。
  • 即使结果不完整,该工具也不会直接失败:
    warnings
    数组会提供可操作的提示,例如安装
    yt-dlp
    、为 Instagram/受限年龄内容设置
    YTDLP_COOKIES_FROM_BROWSER
    ,以及缺少 Whisper backend。应将相关警告告知用户,而不是将其视为错误。
  • 如果 transcript 为空,同时出现“silent audio”警告,则表示视频确实没有语音,这在静音的 Reels/Stories 中很常见——这属于内容本身,并非执行失败。
  • 仅接受指向公开地址的
    http(s)
    URL。位于
    localhost
    、私有/LAN 地址范围、
    .local
    名称、UNC 共享路径或使用非 HTTP scheme 的 URL 会被预先拒绝,并返回相应说明。这是有意执行的拒绝,并非临时错误,因此不要重试或尝试绕过。如果用户确实需要分析其自有网络中的视频,应告知用户使用
    MCP_ALLOW_PRIVATE_URLS=1
    重启 server。即使这样,云元数据端点仍会被阻止。