extract_frames
Extract frames from video files by specifying total frames or time intervals, saving each with unique UUID filenames for analysis or processing.
Instructions
Extract frames from a video file and save each frame with a unique UUID filename.
Behavior:
- If number_of_frames is provided, extracts that many frames evenly across the video.
If requested frames exceed total frames available, caps at total frames.
- If timestamp_offset is provided (and number_of_frames is None), extracts frames
at every given second interval.
- If neither is provided, defaults to extracting one frame per second.
- number_of_frames takes priority if both are provided.
Params: input_video_path (str): Path to the input video file. number_of_frames (Optional[int]): Total number of frames to extract evenly across the video. timestamp_offset (Optional[int]): Time interval in seconds between frames.
Returns: List[str]: List of file paths for the extracted frames with UUID-based filenames.
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": {
"input_video_path": "<input_video_path>"
},
"name": "extract_frames"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| input_video_path | Yes | ||
| number_of_frames | No | ||
| timestamp_offset | No |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
| result | Yes |