Analyze-Video-Skill
Health Uyari
- License — License: NOASSERTION
- Description — Repository has a description
- Active repo — Last push 0 days ago
- Low visibility — Only 5 GitHub stars
Code Basarisiz
- child_process — Shell command execution capability in scripts/build-docx.js
- os.homedir — User home directory access in scripts/build-docx.js
- process.env — Environment variable access in scripts/build-docx.js
- fs module — File system access in scripts/build-docx.js
Permissions Gecti
- Permissions — No dangerous permissions requested
Bu listing icin henuz AI raporu yok.
Paste a video link and get a timestamped Word report with screenshots, or download its captions or a best-quality copy of the video or audio. Agent skill for Claude Code, Codex, and other agents.
/analyze-video
Paste a video link. Get a timestamped Word report with screenshots, captions, and concrete visual analysis.
/analyze-video is a skill for any AI coding agent that can run shell commands (Claude Code, Codex, and others). It turns YouTube, Vimeo, TikTok, X, Twitch, and local videos into polished .docx reports. It uses yt-dlp, ffmpeg, contact sheets, optional Whisper transcription, and a guarded, token-efficient frame-selection workflow. Need only the subtitles? It can also download SRT, VTT, or plain-text captions without the report, or save a verified best-quality copy of the video or just its audio.
Install in 60 seconds in the Claude app, Claude Code, Codex, or any agent that loads skills from a folder.
Why people use it
- Video to report: drop in a URL or local file and get a structured Word document.
- Screenshots included: reports embed selected frames with descriptive captions, one per row or two-up side by side.
- Timestamped analysis: transcript evidence and visuals are organized by time range.
- Best-quality copies: save a verified local copy as MKV or edit-friendly MP4, or just the original audio track, with no re-encoding. Picks YouTube's higher-bitrate Premium stream when one is offered, and checks free space first.
- Saved defaults: remember your usual answers (frame counts, save folder, PDF, appendices, download format) and confirm them in one question.
- Open Filmmaker Toolkit export: optionally package timestamped analysis and frame references as an
.oft.jsonproject. - Token efficient: contact sheets let the AI scan the whole video before reading only the important frames.
- Long-video ready: runs can resume, reuse extracted frames, reuse cached downloads, and emit progress files.
- Accessible output: embedded frames and contact sheets carry required alt text for screen readers.
- Privacy-aware: video processing is local; audio only leaves the machine if optional Whisper fallback is enabled.
Each document is named after the video plus the word analysis (for example how-to-bake-bread-analysis.docx) and records the exact source link or file path it analyzed. Before building, the skill asks whether you want contact sheets and the full transcript appended inside the document, kept as standalone files next to it, and whether you want a PDF alongside the .docx.
How it works
- Download or resolve the source video with yt-dlp or a local path.
- Fetch captions when available, or optionally transcribe audio with Whisper.
- Extract frames at smart intervals.
- Build contact sheets so the AI can preview many frames cheaply.
- Select representative frames with timestamps and chunk awareness.
- Validate the docx spec so stale frame/contact-sheet paths fail before build.
- Write the analysis from visuals plus transcript evidence.
- Export a
.docxwith embedded frames, captions, source metadata, and optional appendices/PDF.
One video or a whole batch works. Long videos are automatically chunked so the workflow stays manageable.
Use it from any MCP client (experimental)
scripts/mcp_server.py exposes the pipeline as MCP tools: prepare (download, frames, transcript, contact sheets), captions, validate (spec paths and alt text) and get_image (return a frame or contact sheet). Building the .docx is not exposed yet.
pip install "mcp<2"
python3 scripts/mcp_server.py # stdio; point your client's MCP config at this command
Just want the captions?
Ask "download the captions for " and the skill skips the report entirely. Or run it directly (only yt-dlp is required):
python3 scripts/captions.py --source "<url>" --out-dir ~/Downloads # English SRT
python3 scripts/captions.py --source "<url>" --langs es,fr --format srt,txt # pick languages and formats
python3 scripts/captions.py --source "<url>" --list # see available languages
python3 scripts/captions.py --source clip.mp4 --format srt,txt # local file: its .srt/.vtt, else Whisper
Formats: srt (default), vtt, txt (clean timestamped transcript), or all. Add --no-auto for uploader captions only. Files are named <title> [<id>].<lang>.<ext>.
Just want a high-quality local copy?
Ask for a download-only run to skip frames, contact sheets, and the Word report. Choose a destination, MKV (any supported source codecs), edit-friendly MP4 (H.264 + AAC streams only), or audio only, and optional captions:
python3 scripts/download.py --best \
--source "<url>" --out-dir ~/Downloads/video-copy \
--container mkv --audio-lang original --subs none \
--temp-dir "$HOME/dltmp"
The command reports the selected streams before downloading, verifies the final codecs/resolution/fps and measured video bitrate with ffprobe, and runs a short decode test. It asks for explicit approval before downloading a result below 720p. MP4 never re-encodes video; if compatible H.264/AAC streams are unavailable, the command stops with an explanation.
Partial files and merges stay in --temp-dir until the download finishes, and only the finished file is moved to --out-dir, so point --temp-dir at a folder that is not synced by a cloud service (Dropbox, iCloud, OneDrive).
For audio only, use --container audio to save the original audio track as served (usually m4a or opus) with no re-encode, or --container mp3 to convert to mp3 (lossy). Audio-only downloads report the measured codec, bitrate, sample rate and channels, and skip the 720p check.
The clever bits
Contact sheets save tokens
Every frame the AI reads costs tokens. Instead of reading 100+ frames individually, the skill tiles frames into contact sheets. The AI scans those overviews, picks the frames that actually matter, and only reads those at full resolution.
Accessible by default
Word documents are not accessible unless someone makes them so. This skill bakes it in: every embedded frame and contact sheet carries required alt text.
Built for long videos
Big videos used to time out and restart from zero. Now the skill picks up where it left off: extracted frames are reused when the source and settings have not changed (pass --force to redo them), each extraction config gets its own directory, and status.json plus manifest_partial.json record progress. Downloaded videos are cached once per URL and reused across runs; the cache prunes itself by age and size. Repeated end-card promos or static outros can be detected and trimmed with --trim-static-outro. Long videos also sample frames straight from the source's keyframes when they are spaced far enough apart to stay visually distinct, which removes most of the decoding work without changing the frames you get; --keyframe-sampling never turns it off. Want a faster, cheaper pass? --quick trims the frame budget and skips contact-sheet preview.
Install in 60 seconds
Pick the route for where you use AI. Each one installs the same skill.
Claude app (claude.ai or Claude desktop)
- Download
analyze-video.skillfrom the latest release. - Upload it in Claude's skill settings.
- Ask Claude to analyze a video. The first run checks for the tools it needs and installs what's missing.
To update, download the newest .skill file and upload it again. YouTube often blocks downloads from cloud computers, so if a YouTube link fails in the Claude app, see When a site blocks the download. Local files and most other sites work as usual.
Claude Code
One command (Claude Code 2.1.275 or later):
/plugin install analyze-video --marketplace evillollive/analyze-video-skill
On older versions, add the marketplace first, then install:
/plugin marketplace add evillollive/Analyze-Video-Skill
/plugin install analyze-video@Analyze-Video-Skill
To get new releases later, run /plugin marketplace update Analyze-Video-Skill.
Codex and other agents
The .skill file from the latest release is a zip of the skill folder, so any agent that loads skills from a folder can use the unzipped analyze-video/ directly. Or run it from a clone of this repository (Codex reads the plugin files here):
git clone https://github.com/evillollive/Analyze-Video-Skill.git
cd Analyze-Video-Skill
python3 scripts/setup.py
The setup script checks or installs:
- Python 3.9+
- Node.js and npm
- ffmpeg and ffprobe
- yt-dlp
- A supported JavaScript runtime (Deno or Node.js) for full-quality YouTube extraction; setup installs/checks Deno when needed.
- the
docxnpm module used by the Word document builder - optional LibreOffice support if you want PDF versions
Whisper keys are optional. Without a key, videos with native captions still get transcript-aware analysis, and captionless videos fall back to frames-only analysis.
To enable Whisper fallback for videos without captions:
python3 scripts/setup.py --set-key groq <YOUR_KEY>
# or:
python3 scripts/setup.py --set-key openai <YOUR_KEY>
Keys are stored in ~/.config/analyze-video/.env with owner-only permissions.
Try it
Ask naturally:
Analyze this video and write me a report: https://youtu.be/abc
Make a doc from these three videos with screenshots.
Just look at the 2:30 to 3:15 section of this clip.
Save just the audio from this video to my Downloads folder.
What's in the box
Analyze-Video-Skill/
├── SKILL.md # Core instructions an agent follows
├── references/ # Detail the agent reads only when needed
│ ├── downloads.md # Best-copy mode, caption options, download failures
│ ├── environments.md # Time limits, sandboxes, synced folders, Windows
│ ├── docx-spec.md # Full document spec, appendices, PDF, cleanup
│ ├── pipeline-options.md # Outputs, manifest fields, resuming, caching
│ ├── oft-export.md # Open Filmmaker Toolkit export
│ └── lenses.md # Filmmaker breakdown, content summary, reference review
├── CHANGELOG.md # What changed and when
├── LICENSE # AGPL-3.0, always open source
├── commands/
│ └── analyze-video.md # Slash-command definition
├── hooks/ # Silent plugin hooks
├── scripts/
│ ├── process.py # Main pipeline entry point
│ ├── captions.py # Standalone caption/subtitle downloader (SRT/VTT/TXT), URLs or local files
│ ├── defaults.py # Saved answers to the skill's questions
│ ├── download.py # Download logic, format choice, failure classification
│ ├── ytdlp.py # The one place that talks to yt-dlp; update-and-retry policy
│ ├── health_check.py # Checks YouTube still offers full quality (no download)
│ ├── cache_utils.py # Self-pruning download + transcript caches
│ ├── frames.py # Frame extraction and contact sheets
│ ├── transcribe.py # VTT parser and deduper
│ ├── whisper.py # Groq/OpenAI Whisper client
│ ├── env_utils.py # Shared config reader
│ ├── setup.py # First-run installer and preflight checks
│ ├── host_env.py # Host fingerprint and setup state helpers
│ ├── build-docx.js # Word document renderer
│ ├── export_oft.py # Open Filmmaker Toolkit project exporter
│ ├── mcp_server.py # Optional MCP server (prepare, captions, validate, get_image)
│ ├── select_frames.py # Picks frames: even coverage without look-alikes, or by tile number
│ ├── validate_spec_paths.py # Fails fast on stale/missing asset paths
│ ├── lint_spec_quality.py # Spec structure/content quality guard
│ ├── run_guarded_pipeline.py # Orchestrates setup, process, selection, and build gates
│ └── build-skill.sh # Packages the .skill bundle
├── docs/
│ ├── SHARING.md # Launch/share checklist and copy
│ └── assets/demo-preview.svg # Lightweight visual preview
├── tests/ # parsing, math, setup, guardrail, and security tests
└── templates/
└── caption_guide.md # Writing style guide for frame captions
Privacy & security
Everything runs locally on your machine. Here's exactly what goes where:
Stays on your computer:
- The video file, extracted frames, contact sheets, manifests, and final
.docx - Your config at
~/.config/analyze-video/.envwith owner-only permissions - Downloaded source videos cached at
~/.cache/analyze-video/downloads/ - Whisper transcripts cached at
~/.cache/analyze-video/transcripts/
The download cache manages itself: at the end of each run it evicts entries older than 14 days and trims total size back under 5 GB, least-recently-used first. It never removes a download an active run is using. Tune limits with ANALYZE_VIDEO_CACHE_MAX_AGE_DAYS and ANALYZE_VIDEO_CACHE_MAX_GB (set either to 0 to disable that limit), or wipe the cache with:
python3 scripts/setup.py --clear-cache
If a download is interrupted (a runner timeout, a dropped connection, or Ctrl-C), re-running the exact same command picks up where it stopped instead of re-fetching the whole video. Pass --force to discard the partial data and start the download over.
Downloads are also sized to what the pipeline actually uses. Frames are rendered at --resolution pixels wide (512 by default) and embedded in the document at roughly 640 pixels, so any source pixels beyond that are downloaded and then thrown away by the scaler. process.py caps the source width yt-dlp selects at max(854, --resolution), which on a 16:9 video means a 480p stream instead of 720p: roughly half to a third of the bytes, with no visible change to the frames or the document. Capping on width rather than height is what keeps portrait video honest, since a 9:16 clip needs a taller stream to reach the same frame width. Sites that do not report format widths are unaffected. Pass --download-max-width 0 to fetch the best available stream, or a specific pixel width to set your own budget; a cached download made under a narrower budget is never reused for a wider request.
Transcripts are cached too, because transcribing is the most expensive non-download step: it decodes the whole video's audio, uploads it, and pays for a Whisper API call. A repeat run on the same video and range reuses the stored result and skips all three. Entries are keyed by the source file's identity plus the requested range and backend/model, so a re-downloaded or edited video always re-transcribes. They are tiny, so they are kept for 90 days (ANALYZE_VIDEO_TRANSCRIPT_CACHE_MAX_AGE_DAYS, 0 to disable) and cleared by --clear-cache along with the downloads. Use --force to re-transcribe and overwrite the entry, or --no-download-cache to keep a run fully self-contained.
Sent to an API only when needed:
- Extracted audio to Groq or OpenAI Whisper, only when captions are missing and you configured a key
Never by default:
- Source video upload
- Platform login
- Cookie access
- Posting or account mutation
When a site blocks the download
Some sites block unauthenticated download tools with login prompts, bot checks, age gates, members-only access, rate limits, or regional restrictions. The skill classifies those failures and gives a specific next step instead of repeatedly retrying. Public YouTube requests use JS-enabled default,web_safari,tv clients first, then fall back to android,ios,web and yt-dlp's own defaults. Detected SABR-only or unexpectedly capped 360p results are retried; if still degraded, the skill stops and reports the quality issue instead of silently accepting it. setup.py checks for Deno or Node.js and requests yt-dlp's EJS challenge scripts.
If you can already watch the video in your own browser and want the skill to use that authorized session, retry with one of yt-dlp's cookie options:
python3 scripts/process.py --source "<url>" --out-dir /tmp/video \
--cookies-from-browser safari
or:
python3 scripts/process.py --source "<url>" --out-dir /tmp/video \
--cookies /path/to/cookies.txt
The skill should not spoof watch sessions, forge tokens, or automate hidden browser playback to bypass bot detection. If browser cookies are not appropriate, download or screen-record the video yourself and pass the local file path.
Note that --cookies-from-browser only works when yt-dlp runs on the same machine and OS as the browser. If you're running the skill in a sandbox or remote environment, it cannot read your local browser cookie store, so run the download host-side and pass the resulting local file. If you already downloaded a video this way and it lost captions, recover the transcript without re-downloading:
python3 scripts/process.py --captions-only --source "<url>" --out-dir /tmp/video
Keeping yt-dlp working
YouTube changes its player every few weeks, and yt-dlp usually ships a fix within days. The skill keeps up on its own:
- Every yt-dlp call goes through
scripts/ytdlp.py, so the rest of the skill never depends on how yt-dlp is installed or invoked. - When a download, caption fetch, or format check fails in a way an update can fix (a broken signature or challenge, a missing format, or a 360p-only result), the skill updates yt-dlp to the latest stable build and retries, then tries the nightly build if that wasn't enough. Login walls, private videos, region locks, and rate limits never trigger an update, since updating can't fix them. Set
ANALYZE_VIDEO_NO_YTDLP_UPDATE=1to turn this off. setup.py --checknotes when the installed yt-dlp is more than 45 days old. Update by hand withpython3 scripts/setup.py --update-ytdlp(add--nightlyfor the nightly build).- Each download's
.source.jsonrecords the yt-dlp version and JavaScript runtime that produced it. python3 scripts/health_check.pyasks YouTube which formats a known 1080p video offers, without downloading, and exits non-zero if full quality is gone. Run it from the machine that does the downloads, since cloud servers are often blocked by YouTube's bot check.
Direct links to a media file or an HLS/DASH manifest (.mp4, .webm, .m3u8, .mpd, etc.) still download with ffmpeg alone when yt-dlp is missing or fails. For anything else, the fallback is always available: download the video yourself and pass the local file path.
Contributing
Found a bug or have an idea? Issues and pull requests are welcome. To run the scripts by hand, see the manual script workflow.
License
AGPL-3.0-or-later. See LICENSE.
Yorumlar (0)
Yorum birakmak icin giris yap.
Yorum birakSonuc bulunamadi