Skip to main content

video-analyzer

tests PyPI

Let Claude watch short videos from a link: Instagram Reels, YouTube Shorts, X and TikTok (anything yt-dlp supports). Free, local, no API keys.

demo

Paste a link into Claude and ask anything: "summarise this Reel", "why does the hook work?", "fact-check her stock claim", "what do this channel's 10 most-viewed Shorts have in common?"

How it works

link ─► yt-dlp download ─► ffmpeg ─┬─► audio ─► Whisper (local) ─► timestamped transcript
                                   └─► keyframes spread over the video, snapped to scene cuts (first = hook, last = ending)
                                                │
              caption + views/likes + transcript + keyframe images ─► Claude analyses
  • Runs on your machine. Transcription is local (faster-whisper); no API keys, no server.
  • Claude does the thinking. The tool returns raw material; Claude reads the transcript and looks at the keyframes, so music-only Reels with text overlays work too.
  • Whole channels. List a YouTube channel's or TikTok profile's videos (by views) and compare them.
  • Cached. The same link isn't processed twice.

Example

From the demo video (a 15s Reel with text cards and a voice-over), the tool returns a transcript plus these keyframes, one per text card:

keyframes

Claude then answers from both, e.g.:

Gist: a productivity listicle: "3 habits that save 2 hours a day". Hook (0–3s): the promise "save 2 hours a day" spoken and on screen at once. Structure: hook → 3 numbered tips (email twice a day, 2-minute rule, plan tomorrow tonight) → "Follow for more" CTA, about 3s per card.

Install

You need uv and ffmpeg. On macOS: brew install uv ffmpeg (Linux: your package manager's ffmpeg, plus uv). The first run downloads the Whisper speech model (about 1.6 GB).

Claude Code (plugin)

/plugin marketplace add Mahanteshambi/video-analyzer
/plugin install video-analyzer@video-analyzer

Start a new session, then paste a link, or run /video-analyzer:analyze-reel <url> hook.

Claude Desktop (or any MCP client)

Add this to ~/Library/Application Support/Claude/claude_desktop_config.json and restart Claude (use the full path from which uvx; desktop apps don't see your shell PATH):

{
  "mcpServers": {
    "video-analyzer": {
      "command": "/opt/homebrew/bin/uvx",
      "args": ["--from", "vidlens", "video-analyzer-mcp"]
    }
  }
}

Terminal

uvx --from vidlens video-analyzer "https://www.instagram.com/reel/XXXXXXXXX/"
uvx --from vidlens video-analyzer "https://www.youtube.com/@somechannel" --list 10 --popular

Tools

Tool Returns
analyze_video(url, max_frames=None, refresh=False) metadata, caption, timestamped transcript, keyframe images
get_transcript(url) metadata, caption and transcript as JSON (no images, cheaper)
list_videos(url, limit=10, sort="recent") a YouTube channel's Shorts (or playlist, TikTok profile) with views; sort="popular" for most viewed. Not Instagram/X profiles

Settings (environment variables)

Variable Default Purpose
VIDEO_ANALYZER_WHISPER_MODEL large-v3-turbo small = 480 MB download but slower and much worse on mixed-language speech; tiny/base = smallest
VIDEO_ANALYZER_COOKIES_BROWSER unset chrome, safari or firefox: use your logged-in session when a site asks for login or rate-limits
VIDEO_ANALYZER_CACHE ~/.cache/video-analyzer where results and keyframes are stored
VIDEO_ANALYZER_MAX_DURATION 900 refuse videos longer than this (seconds)

For Claude Desktop, put these in an "env": { ... } block next to "args".

Troubleshooting

  • Instagram says login required / rate-limited: set VIDEO_ANALYZER_COOKIES_BROWSER=chrome and be logged in to Instagram in that browser. Update yt-dlp often: uv lock --upgrade-package yt-dlp && uv sync.
  • ffmpeg not found: brew install ffmpeg.
  • Transcript of a music-only video is empty: expected. Claude uses the keyframes and caption.

Development

git clone https://github.com/Mahanteshambi/video-analyzer && cd video-analyzer
uv sync --group dev
uv run pytest                                      # unit tests on generated sample videos
uv run python scripts/smoke_mcp.py <url-or-file>   # end-to-end through the MCP protocol

Responsible use

This tool downloads publicly accessible videos for personal analysis, on your machine, with your connection. Platforms' terms of service (including Instagram's) restrict automated access. You are responsible for how you use it. Respect creators' copyright; don't republish their content. For personal use.

MIT licensed.

Metadata

Release files for vidlens 0.1.1

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for vidlens 0.1.1
File Size Uploaded Provenance Actions
vidlens-0.1.1.tar.gz 163.1 kB Without provenance Details for vidlens-0.1.1.tar.gz

Built distribution (wheel)

Table of built distributions (wheels) for vidlens 0.1.1
File Interpreter ABI Platform Actions
vidlens-0.1.1-py3-none-any.whl Python 3 none any Details for vidlens-0.1.1-py3-none-any.whl

Total release size: 180.2 kB

Release files / vidlens-0.1.1.tar.gz

Download URL vidlens-0.1.1.tar.gz
Size 163.1 kB
Tags Source
SHA-256 checksum
How to use checksums
cca55255e08b7f6a48cc322b3be4a0bcf0458e988d928734aec2383620a8cdcb
BLAKE2b-256 checksum
How to use checksums
789210d2d2d762b5e143bab150cce3d7db8ab5ba70e813f89079d6b6d0de40bc
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via uv/0.13.13 {"installer":{"name":"uv","version":"0.13.13","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"Ubuntu","version":"26.04","id":"resolute","libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":true}

Release files / vidlens-0.1.1-py3-none-any.whl

Download URL vidlens-0.1.1-py3-none-any.whl
Size 17.1 kB
Tags Python 3
SHA-256 checksum
How to use checksums
3265b16c7923f282381e3cbb9221b9425217ba0b3ed3e3b40a2d315c5ba54623
BLAKE2b-256 checksum
How to use checksums
490f79daebf8cc4cced3009430eb75787d9c85c1834ea5552a3d7389d5901c07
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via uv/0.13.13 {"installer":{"name":"uv","version":"0.13.13","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"Ubuntu","version":"26.04","id":"resolute","libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":true}

Security for vidlens 0.1.1

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

No provenance found

None of the files in this release were uploaded with provenance metadata.

A note on package security

PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.

To learn more about protecting yourself from malicious actors, visit our package security documentation.

Release history Release notifications | RSS feed

This release

0.1.1 This release

2 release files No provenance

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page