Getting it into your agent
One page per mod, every tool's command on it. A separate URL per tool would split the same page into five that compete with each other.
npx agentmods add skills/cxcscmu/skilllearnbench/ffmpeg-keyframe-extractionnpx skills add cxcscmu/SkillLearnBench --skill ffmpeg-keyframe-extractiongit clone --depth 1 https://github.com/cxcscmu/SkillLearnBenchWrote this? Show the measurements
A badge with what this costs and how it scanned, read live from this page, so it follows the numbers instead of freezing them. Markdown for a README, HTML for a documentation site or a project page.
[](https://agentmods.dev/skills/cxcscmu/skilllearnbench/ffmpeg-keyframe-extraction)<a href="https://agentmods.dev/skills/cxcscmu/skilllearnbench/ffmpeg-keyframe-extraction"><img src="https://agentmods.dev/badge/skills/cxcscmu/skilllearnbench/ffmpeg-keyframe-extraction.svg" alt="Measured on agentmods" height="20"></a>What it costs to keep this loaded
Counted locally with the o200k_base tokenizer, which is exact for GPT models; Claude uses its own tokenizer and its counts differ. Treat this as one consistent yardstick across the catalogue rather than a bill. Prices are per million input tokens.
| Model | Per session | Once invoked |
|---|---|---|
| Fable 5.1 | $0.00029 | $0.00661 |
| Opus 5 | $0.00015 | $0.00331 |
| Sonnet 5 | $0.00006 | $0.00132 |
| Haiku 4.5 | $0.00003 | $0.00066 |
Grade B, and why
ffmpeg-keyframe-extraction scanned grade B with 2 findings against 26 rules in 11 categories — prompt injection, anti-refusal, data exfiltration, privilege escalation, supply chain, agent snooping, system-prompt leakage, SSRF and excessive agency — measured 3d ago.
A static scan of the body, not an audit. Every finding is printed with the line that produced it so you can judge whether it matters here. A mod is markdown that instructs an agent; that is exactly why what it instructs is worth reading.
Asks for rootmediumPrivilege escalation
A mod that escalates privileges can change anything on the machine, not only the project.
sudo apt-get install ffmpeg Runs shell commandslowCapability
Expected in a hook, worth knowing in a rule or an instructions file.
result = subprocess.run(cmd, capture_output=True, text=True) How it starts
The opening of the file, as written. The whole thing — 86 lines — stays where its author put it; the contents beside it link to each section on GitHub.
FFmpeg Keyframe Extraction
Overview
FFmpeg can extract keyframes (I-frames) from video files. Keyframes are complete frames that don't depend on other frames for decoding, making them ideal for analysis and detection tasks.
Installation
# Ubuntu/Debian
sudo apt-get install ffmpeg
# macOS
brew install ffmpeg
Usage
Extract All Keyframes from Video
ffmpeg -i input.mp4 -vf "select=eq(pict_type\,I)" -vsync 0 output_%03d.png
Parameters:
-i input.mp4: Input video file-vf "select=eq(pict_type\,I)": Filter to select only I-frames (keyframes)-vsync 0: Output one image per keyframe (important for proper numbering)output_%03d.png: Output pattern with zero-padded frame numbers (001, 002, etc.)
Extract Keyframes with Frame Rate Control
ffmpeg -i input.mp4 -vf "fps=1/5,select=eq(pict_type\,I)" -vsync 0 output_%03d.png
This extracts at most 1 keyframe every 5 seconds.
Check Video Information
ffprobe -v error -show_entries format=duration -of default=noprint_wrappers=1:nokey=1:noprint_wrappers=1 video.mp4
Output Naming Convention
When using output_%03d.png:
- Frame 1:
output_001.png - Frame 2:
output_002.png - Frame 100:
output_100.png
Python Integration
import subprocess
import os
def extract_keyframes(video_path, output_dir, output_prefix="keyframes"):
"""Extract keyframes from video file"""
os.makedirs(output_dir, exist_ok=True)
output_pattern = os.path.join(output_dir, f"{output_prefix}_%03d.png")
cmd = [
'ffmpeg',
'-i', video_path,
'-vf', 'select=eq(pict_type\\,I)',
'-vsync', '0',
output_pattern
]
result = subprocess.run(cmd, capture_output=True, text=True)
if result.returncode != 0:
raise RuntimeError(f"FFmpeg error: {result.stderr}")
# Return list of extracted frames
frames = sorted([
os.path.join(output_dir, f)
for f in os.listdir(output_dir)
if f.startswith(output_prefix)
])
return frames
What this file has done since we first saw it
Hashed on every crawl. A supply-chain change to an agent config is a question of when, not whether, so the history is kept rather than the latest state alone.
- 3d ago First seen · 86 lines · 29 tokens per session scan B 1b35935327d7
ffmpeg-keyframe-extraction is a skill published in the GitHub repository cxcscmu/SkillLearnBench (83 stars, last pushed 1mo ago), licensed MIT. It adds 29 tokens to every session and 661 once invoked, about $0.0001 per session on Opus 5. A static security scan graded it B with 2 findings (asks for root, runs shell commands). No closer match exists in the catalogue, so it is treated as the original; first seen 2026-09-03.
Other skills, from other repositories
image-generation
Generate images from text prompts (and optionally edit/remix input images). Use when the user asks to create, generate, draw, render, or edit an image, illustration, logo, icon, diagram, or photo.
openai-vision
Analyze images and multi-frame sequences using OpenAI GPT vision models.
gemini-count-in-video
Analyze and count objects in videos using Google Gemini API (object counting, pedestrian detection, vehicle tracking, and surveillance video analysis).
video-frame-extraction
Extract frames from video files and save them as images using OpenCV.
gemini-video-understanding
Analyze videos with Google Gemini API (summaries, Q&A, transcription with timestamps + visual context, scene/timeline detection, video clipping, FPS control, multi-video comparison, and YouTube URL analysis).
Automatic Speech Recognition (ASR)
Transcribe audio segments to text using Whisper models. Use larger models (small, base, medium, large-v3) for better accuracy, or faster-whisper for optimized performance. Always align transcription timestamps with diarization segments for accurate speaker-labeled subtitles.