Infery.ai
← All tools

Trim video

Video

video.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 modalityVideo file (URL)
Output modalityVideo file (GCS URL)
Max input duration30 min
Max input size5 GB

Parameters

ParamRequiredDescription
startyesStart time in seconds (non-negative)
endyesEnd 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 format
  • video.concat — join multiple trimmed clips together
  • video.pipeline — chain trim with other operations in one step

Examples

First 30 seconds

{
  "start": 0,
  "end": 30
}