trim_video
Scope: generate:media. Cut a window out of any publicly accessible video URL and host the trimmed clip — no manual upload required. The server downloads the source, runs ffmpeg -c copy (lossless stream-copy, no re-encode), uploads the trimmed MP4, and returns a public url you can pass straight into generate_media as a source_media_urls value. ARGS: source_url (required — public video URL); start_s (default 0); end_s (required — must be > start_s; range capped at 60s). USE WHEN: a model needs a short reference clip (Gemini Omni Video expects ≤10s; Kling Motion Control caps at 30s) and the user's source is longer than the cap. WHICH WINDOW IS THE USER'S CALL: when the source exceeds the cap, ASK the user which segment to keep (in the Kubeez chat UI, emit the trim_request block instead) and only then trim. Never silently pick a window yourself — agents defaulting to the opening seconds of a long clip discard the moment the user actually wanted. Auto-trim ONLY when the user already named the moment ('use the part at 1:20') or explicitly told you to choose. RETURNS: { url, size_bytes, duration_s, start_s, end_s, elapsed_s }. ERRORS: invalid_trim_range, missing_source_url, source_too_large (provider cap, currently 500 MB), trim_too_long (>60s output), source_fetch_failed (source URL 4xx / unreachable), ffmpeg_failed, processor_timeout, processor_unavailable.
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": {
"source_url": "<source_url>",
"end_s": "<end_s>"
},
"name": "trim_video"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| end_s | Yes | ||
| start_s | No | ||
| source_url | Yes |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
No arguments | |||