crop_video
Crop videos to specific dimensions and positions using FFmpeg. Specify width, height, and offset coordinates to extract desired portions from video files.
Instructions
Crop a video using ffmpeg-python.
Params: input_video_path: Path to input video (required) safe_crop: If True, allows exact cropping (ignores mod-2 restrictions). Default: False height: Output height (default: 480) width: Output width (default: 640) x_offset: Top-left X coordinate of crop (default: 0) y_offset: Top-left Y coordinate of crop (default: 0)
Returns: str: Path to the cropped video.
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": "crop_video"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| input_video_path | Yes | ||
| safe_crop | No | ||
| height | No | ||
| width | No | ||
| x_offset | No | ||
| y_offset | No |