Trim video longer than 15 minutes: video_trim_range_empty

Video trim refuses a range with end at or before start, or longer than 900 seconds, as video_trim_range_empty. Cut a long source in 15-minute ranges.

4 min readSume
All posts

video_trim_range_empty means the range you asked for is empty or too long: end is at or before start, or the range is longer than 900 seconds. 900 seconds is 15 minutes, so a single trim output can be exactly 15 minutes and no more. A longer source is fine up to 1800 seconds; you cut it in more than one range.

Limits are from the video trim docs, read 2026-10-01. Blackmagic's Resolve 21.1 release notes, read the same day, mention an updated trim editor with frame-level adjustments in the viewer; that is an editor feature and says nothing about Sume's limits.

Which requests return which code?

The docs give separate stable codes for the range mistakes, so read the code rather than the status alone.

Video trim range refusals, per the Sume docs read 2026-10-01.
RequestCode
Neither end nor durationvideo_trim_range_required
Both end and durationvideo_trim_range_conflict
end is at or before startvideo_trim_range_empty
Range longer than 900 svideo_trim_range_empty
Source longer than 1800 ssource_duration_exceeded (worker)

What are the numbers to stay inside?

start is seconds from the source start and must be at least 0. duration is 0.2 to 900. Output must be at least 0.2 seconds and at most 900 seconds. An end past the source does not fail: it clamps and the result carries the warning trim_clamped_to_source. The source cap is 1800 seconds, enforced by the worker after the file is inspected.

How do I trim a 25-minute video?

Submit one job per range, each with its own Idempotency-Key. A 25-minute source (1500 s) is under the source cap, so two ranges work, for example 0 to 900 and 900 to 1500.

curl -X POST https://api.sume.com/v1/video-trim \
  -H "Authorization: Bearer $SUME_API_KEY" \
  -H "Content-Type: application/json" \
  -H "Idempotency-Key: trim-part-2" \
  -d '{
    "video_url": "https://media.sume.com/artifacts/artf_demo/long.mp4",
    "start": 900,
    "end": 1500
  }'

Does this match the other media tools?

Audio detach uses the same 900-second output cap and a code of its own; see audio detach and the 900-second cap. The length limits across trim, detach, inspect, filter and compose are collected in source length limits.

Sources

Related posts

More in Developers

All Developers posts

Written by Sume