How to Adjust Video Color Temperature with FFmpeg

This article provides a quick guide on how to use the colortemperature filter in FFmpeg to modify the color temperature of your videos. You will learn the basic command syntax, how the temperature scale works in FFmpeg, and how to use key parameters to make your video look warmer or cooler.

The colortemperature filter in FFmpeg allows you to adjust the color temperature of a video source using Kelvin (K) values. The default neutral temperature is 6500K (representing standard daylight D65). Adjusting this value alters the balance between warm (red/orange) and cool (blue) tones in your video.

Basic Syntax

The basic syntax for the colortemperature filter is as follows:

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

Alternatively, you can use the short-form parameter t instead of temperature:

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

Key Parameters

Practical Examples

1. Making a Video Warmer

To give your video a warm, golden-hour look, lower the temperature below the 6500K neutral point. This example sets the temperature to 4000K:

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

2. Making a Video Cooler

To give your video a cold, blue, or sci-fi aesthetic, raise the temperature above the 6500K neutral point. This example sets the temperature to 9500K:

ffmpeg -i input.mp4 -vf "colortemperature=t=9500" output.mp4

3. Adjusting Filter Intensity

If the color shift is too intense, you can use the mix parameter to blend the temperature adjustment with the original footage. This example applies a cool 8000K temperature but only mixes it at 50% intensity:

ffmpeg -i input.mp4 -vf "colortemperature=t=8000:mix=0.5" output.mp4