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.

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.
| Tool | Source cap | Output cap |
|---|---|---|
| Video frames | 300 s (duration_out_of_range) | 24 frames per call |
| Video trim | 1800 s (source_duration_exceeded) | 900 s |
| Audio detach | 1800 s | 900 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
- Video frames job succeeded but one frame url is null
If one instant fails to extract, video frames returns that entry with url null and the job still finishes ready. Filter the null entries and ask again for them.
- Extract frames from video at fps: mid-bin times, 24 frame cap
Sume video frames turns fps into mid-bin timestamps (0.5/fps, 1.5/fps, and so on), caps the result at 24 frames, and accepts fps above 0 up to 2.
- Extract video frames to images: PNG or JPEG before an upscale
Video frames returns jpeg by default or png for lossless inspection, at the source size unless you set max_edge. Pick png when the stills feed an upscaler.
- Video starts on a black frame: fix the first Timeline segment
A render that opens on black usually has a fade or a late first clip. Timeline 1.0 refuses a first start other than 0 and any first-segment transition.
Written by Sume