How to Use the FFmpeg Colortemperature Filter

Adjusting the color temperature of a video is essential for correcting improper white balance or establishing a specific artistic mood, such as a warm sunset or a cold, sterile environment. This guide provides a straightforward overview of how to use FFmpeg’s built-in colortemperature video filter, explaining its core parameters and demonstrating practical command-line examples to warm up or cool down your footage.

Understanding the Filter Parameters

The colortemperature filter works by adjusting the color temperature of an image using Kelvin (K) values. The filter accepts two primary options:

Basic Command Syntax

The basic syntax for applying the filter is as follows:

ffmpeg -i input.mp4 -vf "colortemperature=temperature=VALUE" output.mp4

Practical Examples

1. Warming Up a Video (Lowering Kelvin)

To make your video look warmer, reduce the temperature value below the 6500K baseline. This example sets the temperature to 4000 Kelvin:

ffmpeg -i input.mp4 -vf "colortemperature=temperature=4000" output.mp4

2. Cooling Down a Video (Increasing Kelvin)

To achieve a colder, blue-tinted look, increase the temperature value above 6500K. This example sets the temperature to 9000 Kelvin:

ffmpeg -i input.mp4 -vf "colortemperature=temperature=9000" output.mp4

3. Adjusting Temperature with Lightness Preservation

If you want to shift the color temperature while maintaining the original brightness and luminance of the video as much as possible, enable the pl parameter:

ffmpeg -i input.mp4 -vf "colortemperature=temperature=3500:pl=0.5" output.mp4