Extract frames from a long video API: duration_out_of_range

Video frames fails duration_out_of_range for a source over 300 seconds. Cut a range under 300 seconds with video trim first, then extract frames from it.

4 min readSume
All posts

duration_out_of_range means the source clip is longer than 300 seconds. Video frames will not extract from it. Cut a range of 300 seconds or less with video trim, then run video frames on the new artf_ clip that trim returns.

Limits are from the video frames and video trim docs, read 2026-10-01. Runway's changelog, read the same day, lists Enhance Frame Rate with inputs of at most 300 seconds; that is the same number as the frames cap, but it is a different product with its own cap.

What are the length limits?

The caps differ per tool; video frames has the lowest source cap of the three.

Source and output length caps, per the Sume docs read 2026-10-01.
ToolSource capOutput cap
Video frames300 s (duration_out_of_range)24 frames per call
Video trim1800 s (source_duration_exceeded)900 s
Audio detach1800 s900 s

How do I get frames from a long video?

Pick the stretch you care about, trim it to 300 seconds or less, and use the result. Trim returns video_url as a new artf_ and never the source. Pass that URL to POST /v1/video-frames.

# 1. cut 0:00 to 4:00 (240 s)
curl -X POST https://api.sume.com/v1/video-trim \
  -H "Authorization: Bearer $SUME_API_KEY" \
  -H "Content-Type: application/json" \
  -H "Idempotency-Key: long-cut-001" \
  -d '{"video_url": "https://media.sume.com/artifacts/artf_demo/long.mp4", "start": 0, "end": 240}'

# 2. frames from the new clip (video_url from GET /v1/jobs/:id/result)
curl -X POST https://api.sume.com/v1/video-frames \
  -H "Authorization: Bearer $SUME_API_KEY" \
  -H "Content-Type: application/json" \
  -H "Idempotency-Key: long-frames-001" \
  -d '{"video_url": "https://media.sume.com/artifacts/artf_new/clip.mp4", "fps": 0.1}'

What other errors look similar?

invalid_source_url means the stored job has no usable video_url. frame_time_out_of_range means an at value falls outside [0, duration). And a source over 90 seconds can add the non-fatal warning low_confidence_long_video, which does not fail the job. For sampling across a long recording, read split a long video into short clips.

Sources

Related posts

More in Developers

All Developers posts

Written by Sume