Extract a frame from a file
extract_frame_from_fileExtract a single frame from a video or image file at a chosen time, return it for viewing, and optionally save it as JPEG or PNG.
Instructions
Decode one frame of a video file (or load an image file) and return it as an image so you can look at it, followed by its time, size and saved_path. Optionally saves it as JPEG or PNG. To see a frame of a sequence with its effects use capture_frame instead; for many frames of a file at once use make_contact_sheet_of_file. You get the frame that is on screen at time (the result reports its exact start time); a time at or past the end returns the last frame with a note. Works on the file on disk with ffmpeg, not on the timeline; Premiere Pro is not needed. ffmpeg and ffprobe must be installed (see check_ffmpeg), else FFMPEG_NOT_FOUND.
Tool call template
Replace each placeholder with a value matching the input schema. Only required parameters are included; add optional parameters as needed.
{
"id": 1,
"jsonrpc": "2.0",
"method": "tools/call",
"params": {
"arguments": {
"path": "<path>"
},
"name": "extract_frame_from_file"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| path | Yes | Absolute path of the media file on this computer. | |
| time | No | Position of the frame in file time (seconds from the start of the file). Default 0. Ignored for still images. | |
| format | No | Image format when output_path is not given. Default jpeg. With output_path the extension decides. | |
| quality | No | JPEG quality 1-100. Default 90. | |
| max_width | No | Scale the frame down to at most this width in pixels, keeping the aspect ratio; never scaled up. Default 1280. Pass the source width for full resolution. | |
| overwrite | No | Replace output_path if it already exists. Default false: an existing file makes the tool fail with FILE_EXISTS. | |
| output_path | No | Absolute path (.jpg, .jpeg or .png) to also save the frame to; missing folders are created. Omit to only look at it. | |
| timeout_seconds | No | Stop ffmpeg and fail with TIMEOUT after this many seconds. Default 120. |