Video filter limits: 8 ops, 2048 characters, 32 filters, 300 s

Video filter refuses a ninth op, a graph past 2,048 characters or 32 filters, and a source past 300 s. Each has its own code, and the free check catches most.

5 min readSume
All posts

Video filter has four limits that decide whether a program runs: at most 8 ops, a filtergraph of at most 2,048 characters, at most 32 named filters inside it, and a source of at most 300 seconds. The first three are caught by the free check endpoint, POST /v1/video-filter/check, before any job is created. The 300-second limit is enforced by the worker, so check the clip length yourself.

What fails, where and how

The table lists each limit with the stable code the docs give for it. An encode job costs $0.02, and the check is unbilled.

Video filter limits, Sume docs read 2026-10-09. Encode price $0.02 per job; check is free.
LimitValueCode or resultCaught by check
Ops per request8video_filter_too_many_opsYes
Filtergraph length2,048 charactersinvalid_filtergraphYes
Named filters in graph32invalid_filtergraphYes
Stream specifiers like [0:v]not allowedinvalid_filtergraphYes
dim amountabove 0, at most 1video_filter_amount_out_of_rangeYes
Source length300 soutput_duration_exceededNo, worker

Ops and filtergraph together

Ops run first, in order, then the filtergraph. Only two op types exist: dim, which multiplies luma by an amount in (0, 1], and crop, a rectangle in fractions of the frame where x plus width and y plus height stay at most 1. Anything else belongs in the filtergraph, which is filters only, with no inputs, outputs or file paths.

  • trim and setpts are not on the allowlist; use video trim for ranges.
  • drawtext, subtitles, movie and lut3d are not allowed.
  • The server wraps your graph with its own input and output labels.

Check, then encode

A passing check returns valid true, an estimate and next_action submit_video_filter. A program that passes can still fail on the worker for memory or time, and you then get a structured job error.

curl -X POST https://api.sume.com/v1/video-filter/check \
  -H "Authorization: Bearer $SUME_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "video_url": "https://media.sume.com/artifacts/artf_demo/talk.mp4",
    "ops": [
      { "op": "crop", "x": 0.21875, "y": 0, "width": 0.5625, "height": 1 },
      { "op": "dim", "amount": 0.8 }
    ]
  }'

Budget

Because the check is free and the encode is $0.02, testing ten program variants costs nothing until you submit the winner. A batch of 500 encodes is $10.00.

A worked example

A program with 8 ops is valid, and a program with 9 is rejected with video_filter_too_many_ops before any job exists. Because dim multiplies luma, two dims of 0.5 and 0.8 combine to 0.4, so there is rarely a reason to chain more than one. Crop fractions follow the same logic: a 16:9 frame cropped to a centered square at 1080 pixels high needs a width of 0.5625 and an x of 0.21875, as in the check request above.

If a check returns fix_program_and_recheck, read diagnostics[] first. It names the token that failed, and for an unknown filter it also gives the allowlist, so you do not need to guess which names are permitted.

Sources

Related posts

More in Media tools

All Media tools posts

Written by Sume