What You Will Learn

  • Commands for changing hue, saturation, and brightness with the hue filter
  • The meaning and value range of each parameter h, s, and b
  • How to apply the filter for grayscale conversion
  • How to vary color dynamically using hue expressions

Tested with: FFmpeg 6.1 (verified against real FFmpeg)

Target OS: Windows / macOS / Linux


Basic Commands

Rotate the Hue

ffmpeg -i input.mp4 -vf "hue=h=90" output.mp4

h=90 rotates the hue by 90 degrees. The value ranges from -180 to 180 (radians can also be specified).

Adjust Saturation

ffmpeg -i input.mp4 -vf "hue=s=2.0" output.mp4

s is the saturation multiplier. The default is 1.0; 0 produces grayscale, and 2.0 makes colors more vivid. For tone-by-tone color shaping, combine this with tone curve color correction using curves.

Adjust Brightness

ffmpeg -i input.mp4 -vf "hue=b=0.3" output.mp4

b is the brightness offset. It ranges from -10 to 10, with a default of 0. If you also need contrast and gamma control, reach for adjusting brightness and contrast with eq.


Parameter Reference

ParameterDescriptionDefaultRange
hHue rotation angle (degrees)0-180 to 180
HHue rotation angle (radians)0Any
sSaturation multiplier10.0 to 10.0
bBrightness offset0-10 to 10

h and H cannot be specified at the same time. Use one or the other.


Specifying Multiple Parameters at Once

ffmpeg -i input.mp4 -vf "hue=h=45:s=1.5:b=0.1" output.mp4

You can specify multiple parameters at once by separating them with colons (:).


Grayscale Conversion

Setting saturation to 0 performs a grayscale conversion.

ffmpeg -i input.mp4 -vf "hue=s=0" output.mp4

You can achieve an equivalent result with the colorchannelmixer filter, but hue=s=0 is the simplest.


Dynamic Hue Changes (Animated Effects)

The hue filter lets you specify parameters that change over time using FFmpeg expressions.

ffmpeg -i input.mp4 -vf "hue=h=120*sin(t/5)" output.mp4

t is the current timestamp (in seconds). The command above makes the hue vary sinusoidally over time.


Applying to Still Images

ffmpeg -i input.jpg -vf "hue=h=180:s=1.2" output.jpg

This can be applied not only to video but also to still images.


Common Usage Examples

Warming Up the Color

ffmpeg -i input.mp4 -vf "hue=h=-15:s=1.2:b=0.05" output.mp4

Rotating the hue slightly in the negative direction and raising the saturation produces a warmer look.

Inverting the Color (Complementary Color)

ffmpeg -i input.mp4 -vf "hue=h=180" output.mp4

Rotating the hue by 180 degrees produces the complementary color.


Things to Note

  • The hue filter operates in the YCbCr color space. Processing that involves RGB conversion may trigger color space conversions before and after hue.
  • Specifying a large value for saturation (s) causes clipping and saturates the colors.
  • b (brightness) is an additive offset, not a multiplier. If you also need contrast or gamma control, use the eq filter.

Measured Example

This example slightly increases saturation and rotates hue by 15 degrees on a 1080p/30fps, 2-minute H.264 video:

ffmpeg -i input.mp4 \
  -vf "hue=h=15:s=1.15:b=0.02" \
  -c:v libx264 -crf 23 -preset medium -c:a copy \
  output.mp4

hue is relatively light, but it still changes video frames, so the video must be re-encoded. On a typical 8-core desktop, processing is often around 1–2x real time.

Large hue rotations change the overall color distribution and can move file size by a few percent at the same CRF. High saturation can also make compression noise or banding more visible, so start around s=1.1 to 1.3.

For real footage with skin tones, hue rotation becomes unnatural quickly. For correction work, stay around h=-10 to 10; for effects, preview a short segment before applying it to the full video. hue is not a full white-balance tool, so use curves or colorbalance when neutral whites and grays matter. Results vary by environment.


  • eq — adjust brightness, contrast, and gamma
  • curves — tone-curve-based color correction
  • colorchannelmixer — per-channel color mixing
  • colorbalance — color adjustment for shadows, midtones, and highlights