Video Frames

Extract frames or short clips from videos using ffmpeg. Quick thumbnails and frame capture.

The Video Frames skill wraps ffmpeg for a single, focused purpose: extracting frames and short clips from video files. While ffmpeg is an incredibly powerful (and complex) multimedia Swiss Army knife, this skill distills it down to the operations AI agents need most — grabbing thumbnails, extracting frames at specific timestamps, creating frame sequences, and cutting short clips. The value proposition is simplicity. ffmpeg's command-line syntax is notoriously arcane — even experienced developers Google the flags every time. This skill provides the patterns and recipes so the AI agent can construct the right ffmpeg commands without memorizing the manual. Need a frame at the 30-second mark? A thumbnail from the first frame? Every 10th frame as a sequence? The skill has the template. Frame extraction is particularly valuable for AI workflows. Want to analyze a video with a vision model? Extract key frames, send them to the image analysis tool, and you've turned a video into something an LLM can reason about. This is the bridge between video content and AI understanding — a pattern used by the camsnap and peekaboo skills for security camera analysis. The skill works with any video format ffmpeg supports (which is essentially all of them): MP4, MKV, AVI, MOV, WebM, and more. Output formats for frames include PNG (lossless), JPEG (smaller), and WebP. For clips, it supports re-encoding or stream copying (fast, no quality loss). ffmpeg must be installed separately — it's not bundled with OpenClaw. On macOS, `brew install ffmpeg` gets you a full-featured build. On Linux, the package manager version may lack some codecs — consider the static builds from ffmpeg.org for full codec support. Best suited for: anyone processing video files with AI, security camera workflows (extract → analyze), content creators needing thumbnails, developers building video processing pipelines, OpenClaw users who want their AI to 'see' video content.

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.png

Extract 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.png

Extract 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.mp4

Installation

brew install ffmpeg

Homepage: https://ffmpeg.org

Source: bundled