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.

3 min readSume
All posts

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

Sume docs, read 2026-10-08
video-trimvideo-filter
Source cap1800 s300 s
Output0.2 to 900 sKeeps source geometry, frame rate, audio
Job price$0.02$0.02
Free checkNoYes, /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

All Media tools posts

Written by Sume