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.

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.
| Filter | What it does | Key option |
|---|---|---|
| despill | Removes a color cast from the picture | mix, 0 to 1 |
| chromakey | Turns a color into transparency | similarity, 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
- Swap the colours of a video by API: the swapuv chroma-swap look
swapuv exchanges a clip's U and V chroma channels and leaves brightness alone, a quick surreal colour look. How to run it in Sume's video filter.
- Turn a video into a line drawing: edgedetect in video-filter
Send edgedetect=low=0.08:high=0.3 to Sume's video-filter for an outline look on any hosted clip. Add negate for dark lines on white. One $0.02 job.
- video-inspect fast seek: sample_times vs requested_times on a Short
Why the still from a fast video-inspect can be earlier than the time you asked for, which field tells you the real instant, and when to use precise instead.
- Which ffmpeg filters does Sume's video filter allow? All 66
Sume's video filter accepts a fixed allowlist of 66 pixel filters in five groups: tone, blur, geometry, time, compositing. The list, the caps, and a free check.
Written by Sume