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.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| input_video_path | Yes | ||
| number_of_frames | No | ||
| timestamp_offset | No |