How to Apply Sepia LUT in FFmpeg using lut3d

This guide explains how to apply a sepia Look-Up Table (LUT) to a video using the FFmpeg command-line tool. You will learn the exact syntax for the lut3d video filter, how to reference your LUT file, and how to execute the command to generate a professionally color-graded sepia video.

To apply a 3D LUT (typically in .cube format) to a video in FFmpeg, you must use the lut3d video filter. This filter maps the colors of your input video to the target sepia color space defined by your LUT file.

Prerequisites

Before starting, ensure you have: 1. FFmpeg installed on your system. 2. A sepia 3D LUT file (usually with a .cube extension).

The FFmpeg Command

Open your terminal or command prompt and run the following command:

ffmpeg -i input.mp4 -vf "lut3d=sepia.cube" -c:a copy output.mp4

Command Breakdown

Adjusting Interpolation (Optional)

By default, FFmpeg uses tetrahedral interpolation to map the colors, which is highly accurate and recommended for most 3D LUTs. If you need to specify the interpolation method manually, you can use the interp option:

ffmpeg -i input.mp4 -vf "lut3d=file=sepia.cube:interp=tetrahedral" -c:a copy output.mp4

Available interpolation options include: * tetrahedral (Default, best quality) * trilinear * pyramid * prism