AI Video Frame
Year
2024
Stack
Python FFmpeg OpenCV
Contributions
Backend CLI Algorithm
Links
Overview
ai-video-frame is a tool for extracting meaningful frames from video files using AI-powered scene change detection.
Instead of dumping every N-th frame, ai-video-frame analyzes the video stream and picks frames at semantically significant moments — scene cuts, motion peaks, and visual changes.
What it does
- Scene-change detection via perceptual hashing
- Configurable sensitivity threshold
- Outputs as JPEG/PNG with timestamps in filenames
- CLI and Python API
Usage
ai-video-frame extract input.mp4 --output ./frames --threshold 0.3
Configuration
| Option | Default | Description |
|---|---|---|
--threshold | 0.3 | Scene change sensitivity (0–1) |
--format | jpeg | Output format (jpeg or png) |
--max-frames | unlimited | Cap on extracted frames |
How it works
- Decode video with FFmpeg
- Compute perceptual hash (pHash) for each frame
- Compare consecutive hashes — flag frames above threshold as scene boundaries
- Write flagged frames to disk