Fix a yellow or blue color cast in a video by API (colortemperature)

Sume's video filter allowlists colortemperature, a Kelvin value from 1000 to 40000 with a default of 6500. Warm or cool a clip and mix it in part.

4 min readSume
All posts

To warm or cool a clip, run colortemperature in the filtergraph of Video filter. It takes a temperature in Kelvin from 1000 to 40000, with a default of 6500, and a mix from 0 to 1 that blends the result with the original. On a mid-gray test frame with ffmpeg 9.0.1, 4000 came out warm and 9000 came out cool, so a yellow-looking clip is the one to try above 6500. Treat the direction as something to confirm on your own frame.

Which colortemperature options are there?

Options of colortemperature as listed in the FFmpeg filter documentation, read 2026-10-01.
OptionWhat it does
temperatureKelvin, 1000 to 40000, default 6500.
mixMix with the filtered output, 0 to 1, default 1. Use 0.5 to apply half the shift.
plAmount of lightness preserved, 0 to 1, default 0.

How do I test a correction before I pay for it?

The check is free. Run a candidate such as 7500, encode a short clip with it, and compare against the source. Because the encode bills per job, not per second, trim first with video trim so each test is a few seconds long, then apply the winning value to the full clip.

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/interview.mp4",
    "filtergraph": "colortemperature=temperature=7500:mix=0.8"
  }'

Is this the same as white balance in a camera app?

No. A camera app can sample a gray card and solve for the cast. This filter applies the number you give it, so the correction is a guess you tune by eye. For a gentler tint without Kelvin math, see sepia or blue tint with colorbalance, which uses channel-level controls.

What if only one shot in a long video has the cast?

Cut that range out with video trim, run the filter on the piece, and put it back with Timeline 1.0. A mix below 1 keeps a heavy-handed correction from looking obvious when the neighbouring shots are fine.

What does a filter job cost and where are the limits?

The docs list $0.02 per encode job, with a source of at most 300 seconds, a filtergraph of at most 2048 characters and 32 named filters. The /v1/video-filter/check route runs the same allowlist and source checks for free and returns valid and next_action; a graph that passes can still fail on the worker (bad expression, memory, time), which comes back as a structured job error.

Sources

Related posts

More in Developers

All Developers posts

Written by Sume