ffmpeg filtergraph too long: video-filter's 2048 and 32 limits

A Sume video-filter filtergraph is capped at 2048 characters and 32 named filters. Past either, or with an unknown filter, you get invalid_filtergraph.

4 min readSume
All posts

A filtergraph sent to Sume's video-filter can be at most 2048 characters long and name at most 32 filters. Past either ceiling the request fails as invalid_filtergraph, the same stable code used for an empty graph, an unknown filter or a stream specifier.

Limits are from the Video filter docs, read 2026-10-01. Blackmagic's Resolve 21.1 notes describe assistants driving batch renders; a generated graph is the kind of input that grows past a cap.

What are the two ceilings?

They are independent: a short string of 33 tiny filters fails on count, and a few filters with huge expressions fail on length.

Filtergraph size budget worked from the docs' two limits, read 2026-10-01.
Filters in the graphAverage characters each, at mostBinding limit
8256Length (2048)
16128Length (2048)
3264Both
33n/aCount (32)

Does punctuation count?

The docs say 2048 chars, not 2048 characters of filter text, so assume labels, separators and option strings all count toward it. The averages above are arithmetic on that assumption.

How do I shorten a graph?

Move crops and dims into ops[], which has its own limit of 8 and does not count against the graph. Drop filters that repeat each other. Then re-check; see ops before filtergraph for the ordering rule.

The graph has no inputs, no outputs and no paths: the server wraps your string with the input and output itself.

How do I measure it before submitting?

POST /v1/video-filter/check is free and returns diagnostics. A program that passes can still fail on the worker for reasons like a bad expression, memory or time, which come back as 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",
    "filtergraph": "eq=brightness=0.05,hue=s=0.9,unsharp,fade=t=in:st=0:d=1"
  }'

Sources

Related posts

More in Developers

All Developers posts

Written by Sume