sample_frames
Extract frames from a video at a fixed rate, explicit timestamps, or scene changes, then return image paths and inline previews so an agent can verify what happened on screen.
Instructions
Sample frames from a video so the agent can actually view what happened: either at a fixed rate (fps) or at explicit timestamps. Writes PNG frames to a folder and returns their paths, plus the first few frames inline so the model can view them directly (disable with returnImages: false).
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| fps | No | Sample this many frames per second (mode 'fps'). | |
| mode | No | How to pick frames. 'scenes' returns only frames where the screen changed (plus the first frame), strongest changes first up to maxFrames, which is usually the cheapest way to review a recording. Defaults to 'fps' or 'timestamps' depending on which of those is given. | |
| input | Yes | Path to the source video file. | |
| dedupe | No | Mode 'fps': drop frames that are nearly identical to the previous one (default false). | |
| maxFrames | No | Most frames this call may write (default 100, max 1000). In fps mode a rate that would exceed it is lowered so the frames still span the whole video. | |
| outputDir | No | Optional folder for the frames. Defaults to SCREENCAST_HOME/frames/<id>. | |
| timestamps | No | Explicit second offsets to grab one frame at each (mode 'timestamps'). | |
| returnImages | No | Also return the frames inline as images the model can view directly (default true). Only the first maxInlineImages frames are embedded. | |
| maxImageWidth | No | Downscale inline images to at most this width (default 1280). | |
| sceneThreshold | No | Mode 'scenes': how much the frame must change to count, 0-1 (default 0.1; raise it to keep only big changes). | |
| maxInlineImages | No | How many frames to embed inline (default 8, max 20). Every frame is still written to disk and listed by path. |