← All tools
Trim video
Videovideo.trim
in: videoout: video
Extract a time range from a video.
Pricing
- Price
- 6.25 cr / second
Prices in credits (1 credit = $0.01).
Trim Video
Extract a time range from a video by specifying start and end positions in seconds.
When to use
- Cut a clip from a longer recording (e.g. extract the first 30 seconds).
- Remove unwanted segments from the beginning or end of a video.
- Prepare clips before transcoding or concatenating.
Inputs & outputs
| Input modality | Video file (URL) |
| Output modality | Video file (GCS URL) |
| Max input duration | 30 min |
| Max input size | 5 GB |
Parameters
| Param | Required | Description |
|---|---|---|
start | yes | Start time in seconds (non-negative) |
end | yes | End time in seconds (must be > start) |
Examples
Extract first 30 seconds
{
"type": "video.trim",
"input": { "video_url": "gs://infery-prod-media/example/input.mp4" },
"params": { "start": 0, "end": 30 }
}
Extract a mid-section clip
{
"type": "video.trim",
"input": { "video_url": "gs://infery-prod-media/example/input.mp4" },
"params": { "start": 60, "end": 120 }
}
Related capabilities
video.transcode— re-encode the trimmed clip to a target formatvideo.concat— join multiple trimmed clips togethervideo.pipeline— chain trim with other operations in one step
Examples
First 30 seconds
{
"start": 0,
"end": 30
}