Use FFmpeg tiltsdr Filter to Apply Tilt Curves
The tiltsdr filter in FFmpeg is a specialized video
filter used to apply tilt curves to Standard Dynamic Range (SDR) video
signals, allowing you to adjust color, luminance, and contrast
distribution. This article provides a direct, practical guide on how to
configure and run the tiltsdr filter in your command-line
workflows, detailing its primary parameters and offering step-by-step
implementation examples.
To use the tiltsdr filter, you must pass it to FFmpeg’s
video filter graph using the -vf flag. The filter adjusts
the input video’s pixels according to a mathematical tilt curve, which
can stretch or compress highlights, midtones, and shadows depending on
the parameters you define.
Basic Syntax
The basic syntax for applying the filter is as follows:
ffmpeg -i input.mp4 -vf "tiltsdr=tilt=value" output.mp4Key Parameters
You can customize the behavior of the tilt curve using several key parameters:
tilt: Defines the slope or intensity of the tilt curve. A positive value tilts the curve to boost highlights and compress shadows, while a negative value tilts it in the opposite direction to darken highlights and lift shadows. (Default is typically0.0).black: Adjusts the black level offset, shifting the lower anchor point of the tilt curve.white: Adjusts the white level offset, shifting the upper anchor point of the tilt curve.
Practical Examples
1. Applying a Gentle Highlight Boost To apply a subtle positive tilt that enhances the brightness of highlights while keeping shadows relatively controlled, use a low positive tilt value:
ffmpeg -i input.mp4 -vf "tiltsdr=tilt=0.15" output.mp42. Correcting Contrast with Tilt and Black Level
Adjustments If you need to apply a negative tilt to soften
harsh highlights while simultaneously protecting your black levels from
crushing, you can combine the tilt and black
parameters:
ffmpeg -i input.mp4 -vf "tiltsdr=tilt=-0.1:black=0.05" output.mp43. Applying the Filter to Specific Color Channels If
your build of FFmpeg supports channel-specific routing for
tiltsdr, you can target individual color components to
correct color casts:
ffmpeg -i input.mp4 -vf "tiltsdr=tilt=0.2:white=0.95" output.mp4