video-frame-extractor
Extract frames from video files using ffmpeg for visual analysis. Use this skill whenever the user provides a video file (screen recording, simulator capture…
от CarlosDanielDev★ 31 звезда на GitHub
Установить video-frame-extractor в Claude Code и Claude Desktop
Зарегайся, чтобы установить скилл
Создай бесплатный аккаунт, чтобы открыть команду установки и сохранить скилл в библиотеку.
- Открой команду установки в одну строку
- Сохраняй скиллы в синхронизируемую библиотеку
- Уведомления, когда скиллы обновляются
Об этом скилле
Video Frame Extractor
Extract frames from video recordings using ffmpeg so the agent can visually inspect what happened. UI glitches, layout shifts, and animation bugs happen in milliseconds — too fast for a human to screenshot but trivial for an LLM to spot once the frames are laid out.
How It Works
- User provides a video path (and optionally a second video for comparison)
- You run ffmpeg to extract frames into a temp directory
- Frames are named with timestamps so the agent can navigate the timeline
- The agent reads the frames and identifies what's going on
You are a frame extraction tool. Extract frames, organize them, and let the main agent do the analysis. Do not interpret what you see in the frames — just deliver them.
Quick Reference
Basic extraction (whole video)
# Create output directory
OUTPUT_DIR=$(mktemp -d)/frames
mkdir -p "$OUTPUT_DIR"
# Extract at 5 fps (good balance between coverage and file count)
ffmpeg -i "<video_path>" -vf "fps=5" -frame_pts 1 "$OUTPUT_DIR/frame_%04d.png" -y 2>&1
# Rename frames with actual timestamps
# fps=5 means each frame is 0.2s apart
for f in "$OUTPUT_DIR"/frame_*.png; do
num=$(echo "$f" | grep -o '[0-9]\{4\}' | tail -1)
# Frame numbers start at 1, convert to seconds
sec=$(echo "scale=2; ($num - 1) * 0.2" | bc)
mv "$f" "$OUTPUT_DIR/sec_${sec}s.png"
done
echo "Frames extracted to: $OUTPUT_DIR"
Custom time range
# Extract frames between specific timestamps
# -ss = start time, -to = end time
ffmpeg -i "<video_path>" -ss <start> -to <end> -vf "fps=5" -frame_pts 1 "$OUTPUT_DIR/frame_%04d.png" -y 2>&1
Higher FPS for fast animations
# Use 10-15 fps when analyzing rapid transitions or animations
ffmpeg -i "<video_path>" -vf "fps=15" -frame_pts 1 "$OUTPUT_DIR/frame_%04d.png" -y 2>&1
Two-video side-by-side comparison
# Extract frames from both videos
OUTPUT_A=$(mktemp -d)/video_a
OUTPUT_B=$(mktemp -d)/video_b
mkdir -p "$OUTPUT_A" "$OUTPUT_B"
ffmpeg -i "<video_a_path>" -vf "fps=5" -frame_pts 1 "$OUTPUT_A/frame_%04d.png" -y 2>&1
ffmpeg -i "<video_b_path>" -vf "fps=5" -frame_pts 1 "$OUTPUT_B/frame_%04d.png" -y 2>&1
# Create side-by-side composites
COMPARE_DIR=$(mktemp -d)/comparison
mkdir -p "$COMPARE_DIR"
# Get the lesser frame count to avoid mismatches
COUNT_A=$(ls "$OUTPUT_A"/frame_*.png 2>/dev/null | wc -l | tr -d ' ')
COUNT_B=$(ls "$OUTPUT_B"/frame_*.png 2>/dev/null | wc -l | tr -d ' ')
COUNT=$(( COUNT_A < COUNT_B ? COUNT_A : COUNT_B ))
for i in $(seq -f "%04g" 1 $COUNT); do
sec=$(echo "scale=2; ($i - 1) * 0.2" | bc)
ffmpeg -i "$OUTPUT_A/frame_${i}.png" -i "$OUTPUT_B/frame_${i}.png" \
-filter_complex "[0]pad=iw+10:ih[left];[left][1]hstack" \
"$COMPARE_DIR/compare_sec_${sec}s.png" -y 2>/dev/null
done
echo "Comparison frames: $COMPARE_DIR"
echo "Video A frames: $OUTPUT_A"
echo "Video B frames: $OUTPUT_B"
Flags
The user can control extraction with these flags. Parse them from the user's message:
| Flag | Purpose | Default |
|---|---|---|
| Time range | -ss 2 -to 5 or "from 2s to 5s" or "between 2-5 seconds" |
Whole video |
| FPS | "at 10fps" or "15 frames per second" | 5 fps |
| Compare | Second video path provided, or "compare", "side by side" | Off |
| Output dir | "save to /path" | System temp dir |
Execution Steps
Validate input: Check the video file exists. Run
ffprobeto get duration and resolution:ffprobe -v quiet -print_format json -show_format -show_streams "<video_path>" 2>&1Decide FPS: Default to 5. If user asks for more detail or video is short (<3s), bump to 10-15. If video is long (>30s) and no time range given, consider dropping to 2-3 fps to avoid excessive frames.
Extract frames: Use the appropriate command from above.
Rename with timestamps: So the agent reading the frames knows exactly when each frame occurred in the video.
Report: Print the output directory path and frame count. If comparison mode, print all three directories (video A, video B, comparison).
Frame Count Guidelines
LLMs have limits on how many images they can process effectively. Keep total frame count reasonable:
| Video Duration | Recommended FPS | Approx Frames |
|---|---|---|
| < 3 seconds | 10-15 | 15-45 |
| 3-10 seconds | 5 | 15-50 |
| 10-30 seconds | 3-5 | 30-150 |
| 30-60 seconds | 2-3 | 60-180 |
| > 60 seconds | Require time range from user | — |
For videos over 60 seconds without a specified time range, ask the user to narrow down the section of interest. Processing an entire long video wastes tokens and dilutes focus.
Output Structure
/tmp/tmp.XXXXXX/frames/
├── sec_0.00s.png
├── sec_0.20s.png
├── sec_0.40s.png
├── sec_0.60s.png
├── ...
└── sec_N.NNs.png
For comparison mode:
/tmp/tmp.XXXXXX/comparison/
├── compare_sec_0.00s.png # Side-by-side A|B
├── compare_sec_0.20s.png
└── ...
/tmp/tmp.XXXXXX/video_a/
├── fra
Разрешённые инструменты
Инструменты, которые скиллу разрешено вызывать.
- 01
Bash - 02
Read - 03
Glob - 04
Write
FAQ
Что делает скилл video-frame-extractor?
Extract frames from video files using ffmpeg for visual analysis. Use this skill whenever the user provides a video file (screen recording, simulator capture, device recording) and wants to analyze visual issues like layout shifts, animation glitches, flickering, crash moments, or any UI behavior that is hard to describe in words. Also trigger when the user wants to compare two videos side by side. Trigger on mentions of: video analysis, screen recording analysis, frame extraction, layout shift detection, visual glitch, UI flicker, animation bug, video comparison, ffmpeg frames.
Как установить скилл video-frame-extractor?
Скопируй папку скилла в ~/.claude/skills (вкладка Claude Code выше делает это одной командой), либо поставь как плагин.
Скилл video-frame-extractor запускает скрипты?
Нет, скилл состоит только из инструкций (SKILL.md), без исполняемых скриптов.
Похожие скиллы
skill-creator
AnthropicCreate new skills, modify and improve existing skills, and measure skill performance. Use when users want to create a skill from scratch, edit, or optimize an…
discernment-nudge
AnthropicAfter you give a substantive answer or draft that the user may act on — advice or recommendations, drafted artifacts such as goals, plans, pitches, proposals…
data-consolidate
AnthropicJoins the plant's scheduled exports and connector data into one working dataset — ERP items (NetSuite or Infor M3), sales orders, production work orders…
inspection-to-capa
AnthropicRuns the quality chain end to end: writes the nonconformance against the requirement it violates, searches history at the moment of writing to say whether…