Configure Kelvin in FFmpeg colortemperature Filter
This article provides a quick guide on how to use the
colortemperature filter in FFmpeg to adjust the color
temperature of a video using Kelvin values. You will learn the exact
command syntax, the available parameters, and how different Kelvin
values affect the visual warmth or coolness of your output video.
The colortemperature Filter Syntax
To adjust the color temperature in FFmpeg, you use the video filter
flag (-vf) followed by the colortemperature
filter. The filter accepts temperature values measured in Kelvin
(K).
The basic command structure is:
ffmpeg -i input.mp4 -vf "colortemperature=temperature=6500" output.mp4Key Parameters
temperature(ort): Specifies the target color temperature in Kelvin.- Value Range:
1000to40000 - Default Value:
6500(representing standard daylight, D65)
- Value Range:
mix: Specifies how much of the filtered result is mixed with the original video.- Value Range:
0.0(no change) to1.0(fully filtered) - Default Value:
1.0
- Value Range:
Practical Examples
1. Applying a Warm Golden-Hour Look (Low Kelvin)
To make your video appear warmer, lower the Kelvin value below the 6500K neutral baseline. Setting it to 4000K introduces warm, orange/yellow tones.
ffmpeg -i input.mp4 -vf "colortemperature=t=4000" -c:a copy output_warm.mp42. Applying a Cool Cinematic Look (High Kelvin)
To make your video appear cooler, raise the Kelvin value above 6500K. Setting it to 9000K introduces cool, blue tones.
ffmpeg -i input.mp4 -vf "colortemperature=temperature=9000" -c:a copy output_cool.mp43. Adjusting Intensity with the Mix Parameter
If the color shift is too intense, you can blend the original video
with the temperature-adjusted video using the mix
parameter. The following command sets a warm 3500K temperature but only
applies it at 50% intensity:
ffmpeg -i input.mp4 -vf "colortemperature=t=3500:mix=0.5" -c:a copy output_blended.mp4