Reduce green spill on a subject: despill in Sume video-filter

To remove a green cast from a person shot against a green backdrop, send despill=type=green:mix=0.6 to Sume's video-filter. One $0.02 job per clip.

4 min readSume
All posts

To remove green spill from a subject in a Sume-hosted clip, send despill=type=green:mix=0.6 as the filtergraph of a video-filter job. despill pulls the green tint back out of skin, hair and clothing edges that picked it up from a green backdrop. One job costs $0.02 and returns a new MP4.

The filter is a color correction, not a key. It does not make the background transparent, so use it when the green is still in the picture and the subject looks sickly.

What is spill and what does despill change?

Spill is the green light that bounces off a backdrop onto the person in front of it. The FFmpeg documentation says despill removes the spill of the selected color on the selected plane. Its options include type (green or magenta, default green), mix from 0 to 1 (default 0.5), and expand from 0 to 1 (default 0) that widens the mask.

Raise mix to correct more of the cast. Raise expand only if the tint reaches areas the mask misses; large values start to desaturate the rest of the frame.

How is it different from chromakey?

chromakey turns a color into transparency. Sume's output is an MP4, so a keyed region is not a useful deliverable on its own; the stored guide on chroma keying covers that route. despill leaves every pixel opaque and only shifts color. Both are on the allowlist, and you can chain them in one graph, but for a plain MP4 the despill-only pass is the safer first step.

Two green-screen filters on Sume's video-filter allowlist (Sume docs and FFmpeg docs, read 2026-10-12)
FilterWhat it doesKey option
despillRemoves a color cast from the picturemix, 0 to 1
chromakeyTurns a color into transparencysimilarity, 0.001 to 1

How do I send it?

Import the clip so that video_url is a media.sume.com URL, then submit with an Idempotency-Key. The check endpoint is free and returns the compiled filters before you pay for the encode. Poll the job and read the result for the new video_url.

curl -X POST https://api.sume.com/v1/video-filter \
  -H "Authorization: Bearer $SUME_API_KEY" \
  -H "Content-Type: application/json" \
  -H "Idempotency-Key: despill-001" \
  -d '{
    "video_url": "https://media.sume.com/artifacts/artf_demo/clip.mp4",
    "filtergraph": "despill=type=green:mix=0.6:expand=0.1"
  }'

What are the limits?

The source must be 300 seconds or shorter, the graph at most 2,048 characters and 32 named filters, and the API refuses any ffmpeg flag such as vf or crf with ffmpeg_fields_rejected: the server compiles the command. Review a few frames of the result with video frames before you apply the same graph to a long batch.

A practical routine is to run two versions, one at mix=0.4 and one at mix=0.8, then compare a still from each. Because the source is never overwritten, both results sit beside the original and you keep whichever looks natural. Skin should look warm, not gray; if it turns gray, the mix is too high. At $0.02 a job, testing both costs four cents. After you pick, apply the same graph to the rest of the footage, remembering that each source clip must be 300 seconds or shorter.

Sources

Related posts

More in Media tools

All Media tools posts

Written by Sume