Skip to main content
Glama

vid2md

Let Claude (or any LLM) "watch" videos for a fraction of the tokens.

vid2md turns a video into compact Markdown, the way MarkItDown does for documents:

  • Transcript from existing captions: YouTube/Vimeo/etc. captions via yt-dlp, or subtitles embedded in / next to a local file. No audio processing, no tokens, seconds to run.

  • On-screen text without vision tokens: slides, titles, code and labels are read with ffmpeg scene-change keyframes + local Tesseract OCR, de-duplicated and interleaved with the transcript by timestamp.

  • Fallback: no captions? Transcribes locally with faster-whisper (optional).

  • Chapters, title, channel and duration included. Works as a CLI, an MCP server and a Claude Code plugin (skill + MCP).

Example: a 19-minute lecture with slides becomes ~5,500 tokens of Markdown, versus tens of thousands of tokens to send keyframes as images.

### What are neurons?

> πŸ–Ό **On screen [03:00]**
> Neuron β€” that holds a number

**[02:43]** As the name suggests neural networks are inspired by the brain, but let's break that down...

Install

System dependencies: ffmpeg and (for --frames) tesseract with the language packs you need.

# Arch
sudo pacman -S ffmpeg tesseract tesseract-data-eng tesseract-data-por
# Debian/Ubuntu
sudo apt install ffmpeg tesseract-ocr tesseract-ocr-eng tesseract-ocr-por
# macOS
brew install ffmpeg tesseract tesseract-lang

Then the tool itself:

pipx install git+https://github.com/samvanderhagen/vid2md
# optional local transcription when a video has no captions:
pipx install "vid2md[whisper] @ git+https://github.com/samvanderhagen/vid2md"

Related MCP server: claude-real-video

Use

vid2md "https://www.youtube.com/watch?v=VIDEO_ID"           # transcript only
vid2md "https://www.youtube.com/watch?v=VIDEO_ID" --frames  # + on-screen text
vid2md lecture.mp4 --frames -o lecture.md                   # local file

Option

What it does

-f, --frames

OCR on-screen text (downloads the video at ≀720p for URLs)

-l, --lang pt

Preferred transcript language

--ocr-lang eng+por

Tesseract languages

--keep-frames DIR

Save the unique keyframes, so the model can look at only the 1–2 it really needs

--scene 0.3 / --max-gap 20

Keyframe sensitivity / sample at least every N seconds

--description

Include the video description

--cookies-from-browser firefox

Reuse your browser's YouTube login if YouTube says "confirm you're not a bot" (also --cookies FILE, or env VID2MD_COOKIES_FROM_BROWSER)

--no-whisper, --whisper-model small

Control the local transcription fallback

Use with Claude Code

As a plugin (skill that teaches Claude to use vid2md + the MCP server):

/plugin marketplace add samvanderhagen/vid2md
/plugin install vid2md@vid2md

Or only the MCP server:

claude mcp add vid2md -- vid2md-mcp

Then just paste a video link and ask for a summary. Claude Desktop / other MCP clients: run vid2md-mcp as a stdio server.

How it saves tokens

  1. Captions first. Platforms already have the transcript; fetching it costs nothing.

  2. Rolling auto-captions de-duplicated. YouTube auto-captions repeat each line twice; they are merged into timestamped paragraphs.

  3. Frames β†’ text locally. Only frames where the scene changes (or every 20 s) are OCR'd; noise and repeated slides are dropped.

  4. Images only when needed. With --keep-frames, the model can open a single frame instead of the whole video.

Limitations

  • OCR reads text, not diagrams, faces or math notation; check the saved frame when it matters.

  • Auto-captions and OCR contain errors.

  • Respect the platforms' terms and copyright: use it for videos you are allowed to process.

License

MIT

Available Tools

1 tool
video_to_markdownA

Convert a video into compact Markdown WITHOUT spending vision tokens.

Uses the platform's captions (YouTube etc.) or embedded/sidecar subtitles; falls back to local Whisper if installed. With frames=True it also extracts on-screen text (slides, code, labels) using scene-change keyframes + local Tesseract OCR, interleaved with the transcript by timestamp.

Args: source: video URL (anything yt-dlp supports) or absolute path to a local video file. frames: also OCR on-screen text. Slower (downloads the video at <=720p). Use when visuals matter. lang: preferred transcript language code, e.g. "en" or "pt". keep_frames_dir: save the unique keyframes here so you can view only the few you really need. description: include the video description. cookies_from_browser: only if YouTube blocks requests ("confirm you're not a bot"): reuse the user's browser login, e.g. "firefox" or "chrome". Ask the user first.

Inputs: source (required), lang, frames, description, +2 more. Returns: result

Tool Schema Changelog

Recent tool additions, removals, and schema changes observed during successful MCP inspections.

Loading tool schema changelog…

    TDQS

    A4.2/5.0

    Scored across 1 tool

    Disambiguation5/5

    There is only one tool, so there is no possibility of misselection or overlapping purpose. Its single function β€” video to Markdown conversion β€” is clearly stated and distinct.

    Naming Consistency5/5

    The single name video_to_markdown is clear, descriptive, and uses standard snake_case verb_object convention. With one tool there is no convention mixing, and the name conveys the action and target.

    Tool Count4/5

    A single tool is slightly thin, but the server's domain (video-to-Markdown extraction) is narrow enough that one richly parameterized tool covers it. The options (frames, lang, cookies, description) are sensibly folded into arguments rather than split into extra tools.

    Completeness4/5

    The surface covers both URL and local-file sources, caption/subtitle/Whisper fallbacks, OCR of keyframes, and language selection β€” the core lifecycle of the stated purpose. Minor gaps exist, such as no way to list available transcript languages or inspect keyframes without saving them to a directory first.

    Maintenance

    ActivityMaintained
    ResponsivenessNo recent community issues

    Related MCP Connectors

    Related MCP Servers

    • A
      license
      Not graded
      quality
      D
      maintenance
      Enables AI assistants to watch YouTube videos by extracting frames at scene changes and visual references, pairing each frame with the exact words spoken at that timestamp. Provides dense frame-transcript interleaving for any model.
      7
      MIT
    • A
      license
      A
      quality
      C
      maintenance
      Enables AI clients to watch local video files or YouTube/Bilibili and other supported URLs, receiving timestamped transcripts, subtitles, searchable text and keyframe contact sheets. Runs fully offline with local speech recognition and bundled ffmpeg, so no API key or cloud upload is needed.
      6
      81 PyPI
      14
      MIT