extract_frames
Extract individual frames from a video using one of four flexible extraction modes. The returned frames can be used directly by the AI for detailed visual analysis.
Parameters
Section titled “Parameters”| Parameter | Type | Required | Description |
|---|---|---|---|
videoPath | string | ✓ | Path to the video, file:// URI, or remote URL |
mode | string | ✓ | Extraction mode: even, interval, timestamps, or scene |
count | number | mode=even | Number of evenly-spaced frames to extract (min 1, max 100) |
intervalSec | number | mode=interval | Extract one frame every N seconds (min 0.1) |
timestamps | number[] | mode=timestamps | Array of timestamps in seconds (e.g. [15, 90, 165]) |
sceneThreshold | number | mode=scene | Scene change sensitivity 0.1–0.9 (default: 0.3). Lower = more sensitive |
maxImages | number | — | Max frames to embed in the response (default: 10, max 100). Use with offset for pagination. |
offset | number | — | Number of frames to skip before returning results (default: 0). Use for paginated access: offset=10, 20, etc. |
Extraction Modes
Section titled “Extraction Modes”even — Evenly-spaced frames
Section titled “even — Evenly-spaced frames”Extract N frames distributed evenly across the full video duration. Good for a quick visual overview.
“Extract 10 evenly-spaced frames from
./recording.mp4”
interval — Fixed time interval
Section titled “interval — Fixed time interval”Extract one frame every N seconds.
“Get a frame every 30 seconds from
./webinar.mp4”
timestamps — Specific timestamps
Section titled “timestamps — Specific timestamps”Extract frames at exact timestamps you specify, as seconds (e.g. [15, 90, 165]).
“Extract frames at 0:15, 1:30, and 2:45 from
./tutorial.mp4”
scene — Scene change detection
Section titled “scene — Scene change detection”Extract frames at detected scene cuts. The sceneThreshold (0.1–0.9, default: 0.3) controls sensitivity:
- Lower values (e.g.,
0.1) → more sensitive, detects subtle cuts - Higher values (e.g.,
0.8) → less sensitive, only major transitions
“Extract frames at scene changes from
./film.mp4”
Usage Examples
Section titled “Usage Examples”"Extract 5 frames from ./demo.mp4""Get a frame every 10 seconds from ./lecture.mp4""Show me frames at 0:00, 0:30, 1:00, and 2:00 from ./clip.mp4""Extract scene-change frames from ./video.mp4""Extract 20 frames from ./video.mp4 starting at 5 minutes in"Pro Tier
Section titled “Pro Tier”Pro users can extract frames at higher resolution and with higher maximum counts. Free tier caps maxImages output.