How to Grade Video Using HaldCLUT in GIMP
Grading video footage using GIMP relies on the HaldCLUT method, a workflow that translates 3D color lookup tables (LUTs) into a 2D matrix image format, typically a lossless PNG. By pairing an identity HaldCLUT with a representative video frame inside GIMP, you can use GIMP’s native color tools to manipulate the image, export the modified HaldCLUT, and apply that exact color transform across the entire video sequence using a command-line tool like FFmpeg.
1. Generate an Identity HaldCLUT
An identity HaldCLUT is a neutral color grid where every pixel represents a coordinate in 3D color space. To generate a standard level-8 identity HaldCLUT (a 512×512 PNG representing a 64×64×64 3D LUT), run the following FFmpeg command:
ffmpeg -f lavfi -i haldclutsrc=8 -frames:v 1 identity.png2. Extract a Reference Video Frame
Extract an uncompressed frame from the video to serve as your visual reference for grading:
ffmpeg -ss 00:01:30 -i input.mp4 -frames:v 1 reference.png3. Apply Adjustments in GIMP
- Open both
reference.pngandidentity.pngin GIMP. - Paste the identity HaldCLUT onto a new layer within the reference frame document, or place them side-by-side in a single canvas.
- Apply your color corrections (such as Curves, Levels, Color Balance, and Saturation) to the canvas.
- Ensure the identical color adjustments applied to your reference frame are also applied directly to the HaldCLUT layer. Avoid spatial filters (like blurs, sharpening, or vignettes), as HaldCLUTs only map pure pixel-to-pixel color transformations.
(Note: If you have an existing 3D .cube file, you
can apply it directly to the identity HaldCLUT using tools like FFmpeg
or ImageMagick prior to opening it in GIMP for further
fine-tuning).
4. Export the Modified HaldCLUT
Select only the graded HaldCLUT layer and export it as an
uncompressed, 8-bit or 16-bit RGB PNG (e.g.,
graded_lut.png). Ensure that no resizing, compression
artifacts, or dithering are applied to this layer during export, as
exact pixel values are required for accurate color reproduction.
5. Apply the Graded HaldCLUT to the Video
Map the exported HaldCLUT back across the entire source video using
FFmpeg's haldclut filter:
ffmpeg -i input.mp4 -i graded_lut.png -filter_complex "[0:v][1:v]haldclut" -c:v libx264 -crf 18 -c:a copy output.mp4FFmpeg reads the color shifts baked into graded_lut.png
and replaces the corresponding color coordinates across every frame of
input.mp4, matching your final GIMP grade seamlessly.