Trim before crop: how the 300 s filter limit sets the order
Video filter accepts sources up to 300 seconds while video trim accepts 1800. For a 20-minute clip, trim first, then crop: two jobs, $0.04.

Trim first, then crop. Video filter rejects sources over 300 seconds, while video trim accepts 1800, so a 20-minute recording has to be cut down before it can be cropped to 9:16. Two jobs, $0.02 each, total $0.04 (Video trim, Video filter).
Limits side by side
| video-trim | video-filter | |
|---|---|---|
| Source cap | 1800 s | 300 s |
| Output | 0.2 to 900 s | Keeps source geometry, frame rate, audio |
| Job price | $0.02 | $0.02 |
| Free check | No | Yes, /check |
The chain
Cut 240 seconds out of the recording, then use the new video_url from the trim result as the filter input.
# 1. trim
curl -X POST https://api.sume.com/v1/video-trim \
-H "Authorization: Bearer $SUME_API_KEY" \
-H "Content-Type: application/json" \
-H "Idempotency-Key: chain-trim" \
-d '{"video_url": "https://media.sume.com/artifacts/artf_demo/webinar.mp4", "start": 600, "duration": 240}'
# 2. crop the result (use video_url from step 1)
curl -X POST https://api.sume.com/v1/video-filter \
-H "Authorization: Bearer $SUME_API_KEY" \
-H "Content-Type: application/json" \
-H "Idempotency-Key: chain-crop" \
-d '{"video_url": "https://media.sume.com/artifacts/artf_demo/trimmed.mp4", "ops": [{"op": "crop", "x": 0.3418, "y": 0, "width": 0.3164, "height": 1}]}'Error you avoid
Cropping the full 20-minute file would fail with output_duration_exceeded. Trimming first also means you pay to process only the part you keep.
What the trim step can change
Trim defaults to precision: "exact", a frame-accurate re-encode. keyframe is a stream copy that can start a GOP early, so re-base your times against actual_start_seconds in the result. If end runs past the source it clamps and the result carries a trim_clamped_to_source warning.
Both outputs are new media.sume.com artifacts and the source is never modified, so a failed crop does not cost you the trimmed file. Run POST /v1/video-filter/check on the trimmed URL first; it is unbilled.
Sources
Related posts
More in Media tools
- Dim a background clip under text: video filter dim amounts
The Sume video-filter dim op multiplies luma by an amount between 0 and 1; black stays black and chroma is untouched. Amount table, request and the $0.02 price.
- Exact or keyframe video trim: which to pick and what changes
Sume video-trim defaults to a frame-accurate exact re-encode; keyframe is a stream copy that can start a GOP early. How to choose and re-base the times.
- Extract 6 thumbnail candidates from a clip with video-frames
Send POST /v1/video-frames with an at list of up to 24 timestamps and get durable image URLs at source size. Python polling example, formats and limits.
- video-frames fps limit: 24 frames, fps up to 2, what it covers
Sume video-frames takes fps from just above 0 up to 2 and caps each call at 24 frames at mid-bin times. Table of sample times and the span 24 frames reach.
Written by Sume