FFmpeg Sepia Filter Using Colorchannelmixer

This guide explains how to apply a vintage sepia tone effect to your videos using FFmpeg's powerful colorchannelmixer filter. By adjusting the red, green, and blue channel contributions, you can easily transform modern footage into a classic, warm-toned film style. You will find the exact FFmpeg command, the standard sepia formula parameters, and a breakdown of how the filter works.

The FFmpeg Sepia Command

To apply the sepia effect, run the following command in your terminal:

ffmpeg -i input.mp4 -vf "colorchannelmixer=rr=0.393:rg=0.769:rb=0.189:gr=0.349:gg=0.686:gb=0.168:br=0.272:bg=0.534:bb=0.131" -c:a copy output.mp4

How the Filter Works

The colorchannelmixer filter allows you to recalculate the color of every pixel by mixing the input Red, Green, and Blue (RGB) channels.

The configuration uses the standard matrix values for a sepia transformation:

  • Red Output (rr, rg, rb): Calculated as 39.3% of the input red, 76.9% of the input green, and 18.9% of the input blue. This boosts the warm red tone.
  • Green Output (gr, gg, gb): Calculated as 34.9% of the input red, 68.6% of the input green, and 16.8% of the input blue.
  • Blue Output (br, bg, bb): Calculated as 27.2% of the input red, 53.4% of the input green, and 13.1% of the input blue. Reducing the blue contribution ensures the final video has the characteristic yellowish-brown sepia appearance.

Command Breakdown

  • -i input.mp4: Specifies your source video file.
  • -vf "...": Applies the video filtergraph containing the colorchannelmixer and its coefficients.
  • -c:a copy: Copies the audio stream directly to the output file without re-encoding, which speeds up the process and preserves audio quality.
  • output.mp4: The resulting sepia-toned video file.