# Video Processing

> Tools and techniques for extracting keyframes and processing video files using FFmpeg.

- Skill: `cxcscmu/video-processing` (Agent Skill)
- Install (CLI): `npx get-skill add cxcscmu/video-processing`
- Raw SKILL.md: https://api.skillmd.com/api/skills/cxcscmu/video-processing/raw
- Safety review: pending
- Works with: Claude Code, Claude.ai, OpenAI Codex
- Category: Coding & Dev Tools
- Author: cxcscmu (https://skillmd.com/u/cxcscmu)
- Updated: 2026-11-24
- Page: https://skillmd.com/skills/cxcscmu/video-processing

---


# Video Processing with FFmpeg

FFmpeg is a powerful tool for video manipulation. For this task, we focus on extracting keyframes.

## Extraction of Keyframes

To extract keyframes from a video file, use the following command:

```bash
ffmpeg -i input_video.mp4 -vf "select='eq(pict_type,I)'" -vsync vfr output_prefix_%03d.png
```

### Parameters:
- `-i`: Input file path.
- `-vf "select='eq(pict_type,I)'"`: Filter to select only I-frames (keyframes).
- `-vsync vfr`: Variable frame rate to ensure output frames are not duplicated.
- `output_prefix_%03d.png`: Output pattern for extracted images.

## Performance Tips
- Use `-q:v 2` to maintain high quality if needed.
- Ensure the output directory exists before running the command.

