video-frames
Extract frames from video files using ffmpeg for AI/LLM analysis.
Skill by tdragon6
Install
Works with Claude Code, Claude apps, Codex, Cursor, Gemini CLI, GitHub Copilot, VS Code, OpenCode, Goose, Windsurf. Read the repository before you give any tool access to your data.
npx agentmarket install skill/tdragon6-video-frames
Asks which of your tools to add it to (Claude Code, Codex, Cursor, VS Code, Windsurf, Gemini CLI, Claude Desktop) and shows the change first. See https://agentmart.dev/cli.
Get the weekly diff
The weekly diff: one email a week with new agent tools, notable updates and grade changes, plus security alerts for tools you follow. Double opt-in, one-click unsubscribe.
About
Use cases: ml, writing
Reviews
Write a reviewNo reviews yet. Installed it? Reviews come from verified installers only. How reviews work
Permissions
What this skill can do and what it asks for, from its SKILL.md. Checked Oct 25, 2026.
- Tools
- No tools found
- Secrets
- None asked for
- Install scripts
- None found
- Runs as
- Python package
Network hosts it talks to 1
codeload.github.com· found in install command
Files it touches
~/.claude/skills/video-frames
What's inside
- Skill name
video-frames- Description
- Extract frames from video files using ffmpeg for AI/LLM analysis. Use when (1) the user asks to analyze, describe, or summarize a video file, (2) the user wants to extract frames or screenshots from a video, (3) the user provides a video file (.mp4, .mov, .avi, .mkv, .webm, etc.) and asks questions about its visual content, (4) the user wants to identify scenes, objects, or events in a video, (5) the user wants timestamps overlaid on extracted frames for temporal reference. Converts video into JPEG frames that can be attached to LLM prompts as images. Requires ffmpeg on PATH. Supports scene-change detection, model-aware optimization (Claude/OpenAI/Gemini), quality presets (efficient/balanced/detailed/ocr), grayscale and high-contrast OCR mode, and automatic FPS calculation via --max-frames.
- License
- MIT
- Instructions
- 223 lines in SKILL.md · view on GitHub
Before installing
- Ships executable scripts
Files (3)
- SKILL.md
- llm-image-specs.md · references/
- extract_frames.py · scripts/
SKILL.md (first lines)
# Video Frames Extract frames from video files using ffmpeg, producing JPEG images optimized for LLM vision analysis. Supports multiple frame-selection strategies (fixed FPS, scene detection, target frame count), quality presets, model-aware dimension optimization, and OCR enhancements. ## Prerequisites ffmpeg and ffprobe must be installed and on PATH: ```bash brew install ffmpeg # macOS ``` ## Workflow 1. Receive a video file path from the user 2. Run `scripts/extract_frames.py` to extract JPEG frames 3. Parse the JSON output for frame paths, resolution, and token estimates 4. Read the extracted frames as image attachments for analysis 5. Answer the user's question about the video content 6. Clean up temp directories when done ## Quick Start The simplest invocation -- extracts 1 frame/second at balanced quality: ```bash python3 scripts/extract_frames.py video.mp4 ``` For most use cases, use `--max-frames` to let the script auto-calculate FPS: ```bash python3 scripts/extract_frames.py video.mp4 --max-frames 30 ``` This is the **preferred approach** over manually setting `--fps`, since it adapts to any video length and keeps the frame count predictable. ## Presets Four quality presets control resolution, JPEG quality, and image processing: | Preset | Max dim | Quality | Extras | Best for | | ----------- | ------- | ------- | ----------------------------------- | -------------------------- | | `efficient` | 768px | 5 | -- | Bulk frames, long videos | | `balanced` | 1024px | 3 | -- | General analysis (default) | | `detailed` | 1568px | 2 | -- | Fine detail, small objects | | `ocr` | 1568px | 1 | grayscale + high contrast + sharpen | Text/document extraction | ```bash # Long video, keep costs low python3 scripts/extract_frames.py long_video.mp4 --max-frames 20 --preset efficient # Need to read text in a screencast python3 scripts/extract_frames.py screencast.mp4 --max-frames 40 --preset ocr ``` Quality (1=best, 31=worst) and max dimension can be overridden independently: ```bash python3 scripts/extract_frames.py video.mp4 --preset balanced --quality 1 --max-dimension 1568 ``` ## Scene-Change Detection Instead of extracting at a fixed rate, detect visual scene changes and extract one frame per scene. This is ideal for videos with distinct segments (presentations, edited footage, tutorials). ```bash python3 scripts/extract_frames.py video.mp4 --scene-threshold 0.3 ``` - `--scene-threshold` (float, 0.0-1.0): Sensitivity. Lower = more sensitive, detects smaller changes. Start with `0.3` (the default when the flag is used). - `--min-scene-interval` (float, default: 1.0): Minimum seconds between detected scenes. Prevents burst detections during rapid cuts. **Note:** `--fps` and `--scene-threshold` are mutually exclusive. `--max-frames` can only be used with `--fps` mode, not scene detection. ```bash # Presentation with clear slide transitions python3 scripts/extract_frames.py presentation.mp4 --scene-threshold 0.2 # Action footage -- less sensitive, min 2s apart python3 scripts/extract_frames.py action.mp4 --scene-threshold 0.5 --min-scene-interval 2.0 ``` ## Model-Aware Optimization Use `--target-model` to resize frames to dimensions that align with a specific model's tile boundaries, minimizing wasted tokens: | Model | Max dim | Rationale | | ----------- | ------- | ---------------------------------------------- | | `claude` | 1568px | Max native resolution before auto-resize | | `openai` | 768px | Aligned to 512px tile grid (shortest side 768) | | `gemini` | 768px | Aligned to 768px tile boundaries | | `universal` | 768px | Sweet spot across all models (default) | ```bash # Optimized for Claude -- maximum detail python3 scripts/extract_frames.py video.mp4 --max-frames 30 --target-model claude # Optimized for GPT-4o -- efficient tile packing python3 scripts/extract_frames.py video.mp4 --max-frames 30 --target-model openai ``` `--target-model` sets the max dimension unless `--max-dimension` is explicitly provided (CLI override takes priority). See `references/llm-image-specs.md` for detailed token formulas, tile calculations, and optimal dimension tables for each model. ## OCR and Grayscale Mode For videos containing text (screencasts, presentations, documents, terminal recordings): ```bash # Full OCR pipeline via preset python3 scripts/extract_frames.py screencast.mp4 --preset ocr --max-frames 40 # Manual OCR flags (can combine with any preset) python3 scripts/extract_frames.py video.mp4 --grayscale --high-contrast ``` - `--grayscale`: Converts frames to grayscale. Reduces file size ~60% with no OCR accuracy loss.
From tdragon6/weAgentSlim, MIT.
More from tdragon6/weAgentSlim
- 0.448score
high-agency
tdragon6
Builds sustained high agency through internalized standards, identity anchoring, cross-session learning, and self-recovery — all delivered in corporate PUA…
SkillDFreshness: D★ 2Claude Code +9 - 0.431score
reply-check
tdragon6
当你思考和处理完用户请求,准备回复用户最终结果时,你需要调用此技能,检查回复是否合规,若不合规,你需要重新调整回复内容,直到回复合规为止
SkillDFreshness: D★ 2Claude Code +9
Signals
- Stars
- 2
- Forks
- 2
- Open issues
- 0
- Last commit (this folder)
- Mar 24, 2026 (7 months ago)
- Last release
- Mar 28, 2026 (7 months ago)
From GitHub (fetched Oct 24, 2026).
Details
- License
- MIT
- Repository
- github.com/tdragon6/weAgentSlim
- First seen
- Oct 24, 2026
- Last checked
- Oct 24, 2026
- Source
- GitHubgithub-graphql
More from tdragon6
- 0.448score
high-agency
tdragon6
Builds sustained high agency through internalized standards, identity anchoring, cross-session learning, and self-recovery — all delivered in corporate PUA…
SkillDFreshness: D★ 2Claude Code +9 - 0.431score
reply-check
tdragon6
当你思考和处理完用户请求,准备回复用户最终结果时,你需要调用此技能,检查回复是否合规,若不合规,你需要重新调整回复内容,直到回复合规为止
SkillDFreshness: D★ 2Claude Code +9
Cite this page
video-frames skill. Agent Mart. https://agentmart.dev/skills/tdragon6-video-frames (last updated 2026-10-24)