Video Trim
Trim a video to an exact start and end, snapping each cut to a sentence boundary from your SRT so clips never break mid-word. Returns the clip plus a matching transcript, ready to caption.
How to use Video Trim
A compact decision guide for placing this pipeline in a workflow.
Best for
- Cutting long videos to an explicit window already chosen upstream
- Chaining after highlights: highlights picks the moment, video-trim slices it
- Producing a clean, sentence-aligned clip plus its matching transcript in one call
When to use
- Always after transcription + highlights (or any caller that already knows the window)
- Before captions, the returned transcript already lines up with the trimmed clip and feeds the captions step directly
Tips
- Pair with highlights (count=N, style=...) to get authoritative editorial picks
- Cuts are snapped to SRT segment boundaries, pass a slightly tight window and let snapping widen it to a full sentence
- The returned transcript already lines up with the trimmed clip, feed it straight into captions
Video Trim API
Call this pipeline from your own code. One request dispatches a run; the model is an input field, not a separate endpoint.
Get an API token- inputs
- 4
- required
- 4
- Pricing
- 0.1 credits
| Input | Type | default | Description |
|---|---|---|---|
end_sec | number | default— | Window end (exclusive). Must be greater than start_sec. |
start_sec | number | default— | Window start. Typically supplied by an upstream picker (e.g. highlights). |
transcript_url | string | default— | SRT transcript of the source, required. The window is snapped to its segment boundaries and the sliced SRT is returned for downstream captioning. |
video_url | string | default— | Source video to trim. |
Point any MCP client at pipe2 and your agent gets these tools. It finds this pipeline, reads the same schema above, then runs it.
list_pipelinesget_pipeline_schemarun_pipelineget_pipeline_run_statusrequest_upload
https://mcp.pipe2.ai/mcp {
"mcpServers": {
"pipe2ai": {
"url": "https://mcp.pipe2.ai/mcp",
"headers": { "Authorization": "Bearer YOUR_TOKEN" }
}
}
}Recipes using this pipeline
Show all recipesFrequently Asked Questions
How is the window chosen?
Why does it require a transcript?
Can it run without a transcript?
Does this cost credits?
What if the start or end time is outside the video?
Video Trim: Clean, Transcript-Aligned Cuts
Give Video Trim a video, its SRT transcript, and a start and end time. It cuts the clip to that window and nudges each edge to the nearest sentence boundary, so your clip never starts or ends mid-word, then hands back a matching transcript so the captions step needs no re-transcribing.
How It Works
- Snap to sentences: your start and end move to the nearest transcript boundary, so cuts never land mid-sentence
- Trim the video: the source is cut to that window with clean, frame-accurate edges
- Return the transcript: the matching slice of the SRT comes back aligned to the new clip, ready for captions
Pair It With Highlights
Video Trim doesn't choose which moment to keep, you give it the window. The highlights pipeline is built to pick those moments and hand the window straight to Video Trim for a clean cut.