Dim a 20-minute video: trim to four 300 s pieces, then filter, $0.16

Video filter takes sources up to 300 seconds, video trim up to 1,800. A 20-minute video needs four trims and four filter jobs: 8 x $0.02 = $0.16.

5 min readSume
All posts

A 20-minute (1,200 second) video is too long for video filter, whose source limit is 300 seconds, but it is inside video trim's 1,800-second source limit. Cut it into four 300-second pieces with four trim jobs, then run one filter job on each piece. That is 8 jobs at $0.02, or $0.16 in total, with no provider inference, since both routes only run ffmpeg on the worker.

The three limits that decide the order

Each route has its own ceiling. Trim reads a source of up to 1,800 seconds and writes an output of 0.2 to 900 seconds. Filter reads a source of at most 300 seconds. If you filter first, the job fails with output_duration_exceeded on the worker.

Limits from the Sume docs pages, read 2026-10-09. Prices are the public per-job rates.
RouteSource limitOutput limitPriceFailure code past the limit
Video trim1,800 s900 s$0.02 per jobsource_duration_exceeded
Video filter300 skeeps source length$0.02 per joboutput_duration_exceeded
Video filter checksame program checksnone, not a jobfreereturns diagnostics

The four cuts

Use start with duration, and set precision to exact so each piece begins where you asked. Keyframe precision can start a GOP early, which would leave pieces that overlap. The ranges for a 1,200 second source are 0 to 300, 300 to 600, 600 to 900 and 900 to 1,200.

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-trim-part-2" \
  -d '{
    "video_url": "https://media.sume.com/artifacts/artf_demo/long.mp4",
    "start": 300,
    "duration": 300,
    "precision": "exact"
  }'

Then filter and reassemble

Each trim result has a new video_url that you can pass to POST /v1/video-filter with an ops array such as a dim of 0.45. You can run POST /v1/video-filter/check on each program first, which does not create a job or reserve credits. To put the four pieces back in order, Timeline 1.0 prices a render at $0.10 per output minute, rounded up, so a 20-minute result is $2.00.

The extra cost of the split is the $0.08 for four trims, not the filter jobs, which you would pay once per piece anyway. If you only need to dim the first five minutes, one trim and one filter is $0.04.

If the video is 35 minutes

A 35-minute video is 2,100 seconds, which is past video trim's 1,800-second source limit and fails with source_duration_exceeded. You would have to split the source before importing it, or work from separate exports. Anything under 30 minutes works in the flow above, with seven 300-second pieces needed for 2,100 seconds of material, and a cost of 14 jobs x $0.02 = $0.28 if all of it were in range.

Sources

Related posts

More in Media tools

All Media tools posts

Written by Sume