Video Frames
Extract frames or short clips from videos using ffmpeg. Quick thumbnails and frame capture.
Tags: video, ffmpeg, frames, media, extraction
Category: Media
Use Cases
- Video analysis: extract frames → send to vision AI for content understanding
- Thumbnail generation: create preview images for video files
- Security camera analysis: extract frames from recorded clips for AI review
- Content creation: grab specific frames for blog posts or social media
- Scene detection: extract keyframes to identify scene changes
- Timelapse review: extract one frame per minute/hour for quick visual summary
Tips
- Use `-ss` BEFORE `-i` for fast seeking: `ffmpeg -ss 00:01:30 -i video.mp4 -frames:v 1 frame.png`
- Extract one frame per second: `ffmpeg -i video.mp4 -r 1 frames/frame-%04d.png`
- For thumbnails, extract the first frame: `ffmpeg -i video.mp4 -frames:v 1 thumbnail.jpg`
- Use `-vf 'select=eq(ptype\,I)'` to extract only keyframes (I-frames) — great for scene detection
- Combine with the image analysis tool to let AI 'watch' videos frame by frame
- For clips without re-encoding (fast): `ffmpeg -ss 10 -i video.mp4 -t 5 -c copy clip.mp4`
- Scale output: `ffmpeg -i video.mp4 -vf 'scale=640:-1' -frames:v 1 thumb.jpg` for consistent sizes
- Use `-q:v 2` for high-quality JPEG output (lower number = higher quality)
Known Issues & Gotchas
- ffmpeg must be installed — `brew install ffmpeg` on macOS, `apt install ffmpeg` on Linux
- Linux package manager ffmpeg may lack codecs — use static builds from ffmpeg.org if needed
- Fast seeking (-ss before -i) is much faster than accurate seeking (-ss after -i) for large files
- Extracting every frame from a long video creates thousands of files — always set a frame rate limit
- JPEG output loses quality — use PNG for lossless frame extraction when quality matters
- Stream copy (-c copy) for clips is fast but can't cut on exact frames — only on keyframes
- Large video files need significant disk space for extracted frames — plan storage accordingly
- Some video codecs require specific ffmpeg builds — check `ffmpeg -codecs` for available support
Alternatives
- CamSnap
- gifgrep (sheet command)
- OpenCV (Python)
- Summarize (video mode)
- ffmpeg-cli skill
Community Feedback
Fastest way to extract frames using ffmpeg? Use fast seeking to go to the desired time index and extract a frame. The -ss flag before -i enables fast seeking.
— Stack Overflow
Learn how to extract one or more thumbnails from a video with FFmpeg. Understand benefits and drawbacks of selecting I-frame thumbnails vs. arbitrary frame extraction.
— Mux Articles
Extract frames or short clips from videos using ffmpeg. 82 stars, 29.1k downloads. One of the most-installed media skills on ClawHub.
— LLMBase
Effortlessly extract frames and thumbnails from videos using the Video Frames skill. Automate FFmpeg captures directly from your AI assistant.
— MCP Market
Configuration Examples
Extract a single frame
# Frame at specific timestamp (fast seeking)
ffmpeg -ss 00:01:30 -i video.mp4 -frames:v 1 -q:v 2 frame.jpg
# First frame as thumbnail
ffmpeg -i video.mp4 -frames:v 1 thumbnail.pngExtract frame sequences
# One frame per second
mkdir -p frames
ffmpeg -i video.mp4 -r 1 frames/frame-%04d.png
# One frame every 10 seconds
ffmpeg -i video.mp4 -r 0.1 frames/frame-%04d.png
# Only keyframes (I-frames)
ffmpeg -i video.mp4 -vf "select=eq(pict_type\,I)" -vsync vfr frames/key-%04d.pngExtract short clips
# 5-second clip starting at 1:30 (fast, no re-encode)
ffmpeg -ss 00:01:30 -i video.mp4 -t 5 -c copy clip.mp4
# Same with re-encoding (exact timing)
ffmpeg -i video.mp4 -ss 00:01:30 -t 5 -c:v libx264 -crf 23 clip.mp4
# Extract and scale
ffmpeg -ss 30 -i video.mp4 -t 10 -vf 'scale=1280:-1' -c:v libx264 clip_720p.mp4Installation
brew install ffmpegHomepage: https://ffmpeg.org
Source: bundled