Skip to content
FramesField
SKILL.md Developer / Local Tooling SKILL.md
Verified Nov 29, 2026

FFmpeg Film Grain and LUT Match Skill

How to install this SKILL.md

Install into .claude/skills/, .cursor/skills/, or .agents/skills/ below whenever you splice footage from two different AI video engines and want them to look filmed on the exact same camera sensor.

Installable SKILL.md rulebook for unifying mismatched AI video clips (Gemini Omni Flash, Kling 4.0, Runway Gen-4 Turbo, Runway Gen-4.5, Wan 2.2) into one cohesive camera look via subtle Rec.709 contrast matching, .cube 3D LUT application, restrained organic 35mm film grain (noise=alls=7:allf=t+u), and strict yuv420p delivery.

Compatible agent hosts
Claude Code Cursor Codex
Target tool: FFmpeg · License: MIT
  1. STEP 01
    Install the grain & LUT matching SKILL.md

    Pick Claude Code, Cursor, or Codex below to save the pure raw SKILL.md file.

  2. STEP 02
    Ask your agent to unify a multi-engine edit

    Run over assembled clips from mixed models (e.g., Gemini Omni Flash + Runway Gen-4 Turbo) with or without a .cube LUT file.

  3. STEP 03
    Export cohesive Rec.709 footage

    Adds subtle temporal film grain that erases plastic AI smoothness and aligns contrast, black point, and yuv420p color tags.

1. Install for your tool

Pick the app you use below for the exact verified command or config—zero manual guessing.

Direct raw file (SKILL.md) ↓
Claude Code (.claude/skills/) bash
Installs into .claude/skills/ffmpeg-grain-lut-match/SKILL.md.
mkdir -p .claude/skills/ffmpeg-grain-lut-match
curl -fsSL https://framesfield.com/raw/skills/ffmpeg-color-grade-and-grain-match-skill -o .claude/skills/ffmpeg-grain-lut-match/SKILL.md

2. Inspect or download the full SKILL.md file

This is the exact raw file served at /raw/skills/ffmpeg-color-grade-and-grain-match-skill.

FFmpeg Film Grain and LUT Match Skill SKILL.md
---
name: ffmpeg-grain-lut-match
description: Unify AI video clips generated across mixed engines (Gemini Omni Flash, Kling 4.0, Runway, Wan 2.2) using restrained Rec.709 color balance, optional .cube 3D LUTs, organic temporal film grain, and explicit BT.709 yuv420p metadata tags in FFmpeg.
---

# FFmpeg Multi-Model Color Matching & Organic Grain Protocol

When blending shots from different AI video engines, differences in skin smoothing, saturation, and noise floor make cuts feel synthetic. Apply this deterministic finishing pass AFTER concatenation (never add grain twice to the same clip):

## 1. Default Editorial Unifying Pass (No External LUT Required)
Slightly reins in oversaturated AI greens/oranges (`saturation=0.96`), anchors contrast (`1.03`), and overlays subtle uniform temporal 35mm-style grain (`alls=6` to `8`, `allf=t+u`):
```bash
ffmpeg -y -i assembled_master.mp4 \
  -vf "eq=contrast=1.03:saturation=0.96:brightness=0.01,noise=alls=7:allf=t+u,format=yuv420p" \
  -c:v libx264 -preset slow -crf 18 \
  -colorspace bt709 -color_primaries bt709 -color_trc bt709 \
  -c:a copy -movflags +faststart \
  unified_rec709_master.mp4
```

## 2. Applying a Studio `.cube` 3D LUT at Controlled Strength
Never bake heavy creative LUTs at 100% blind opacity—allow blending with the original footage (e.g., `50%` LUT opacity via `split` + `blend` or restrained neutral LUT) followed by uniform grain:
```bash
ffmpeg -y -i assembled_master.mp4 \
  -filter_complex "
    [0:v]split=2[orig][tolut];
    [tolut]lut3d=file=studio_rec709.cube:interp=tetrahedral[lutted];
    [orig][lutted]blend=all_expr='A*0.5+B*0.5',noise=alls=6:allf=t+u,format=yuv420p[vout]
  " \
  -map "[vout]" -map 0:a? \
  -c:v libx264 -preset slow -crf 18 \
  -colorspace bt709 -color_primaries bt709 -color_trc bt709 \
  -c:a copy -movflags +faststart \
  graded_lut_master.mp4
```

## 3. Restraint & Compression Rules
- Keep `noise=alls` strictly between `5` and `9` (`>12` looks noisy and destroys H.264 bitrate efficiency on YouTube/Reels).
- Always set `-crf 17` or `-crf 18` when adding grain so the H.264 encoder preserves fine texture instead of smearing grain into macroblocks.
- Always tag `-colorspace bt709 -color_primaries bt709 -color_trc bt709` so macOS QuickTime and Chrome render identical gamma.

3. Test it right away (sample prompt & result)

Sample prompt / input
"Our 30s spot mixes Gemini Omni Flash talking shots with Runway Gen-4 Turbo B-roll and the B-roll looks slightly too glossy. Unify the assembled master with subtle Rec.709 film grain."
What happens when it runs
- Applies single finishing pass (`eq=contrast=1.03:saturation=0.96`, `noise=alls=7:allf=t+u`, explicit BT.709 color metadata) at `-crf 18` while stream-copying the already-leveled `-14 LUFS` audio track (`-c:a copy`).
- Preserves crisp texture without bitrate macroblocking or QuickTime gamma shift.

What you need & known limits

Requirements

  • FFmpeg installed locally (works cleanly with stock macOS Homebrew ffmpeg and Windows Gyan.FFmpeg)
  • Optional: any standard .cube 3D LUT file exported from DaVinci Resolve

Watch out for

  • Never apply grain BEFORE scaling or upscaling—always apply grain as the final post-conform pass right before final delivery encode
  • Heavy grain increases final MP4 file size; verify upload limits if targeting strict ad-network file caps

Frequently Asked Questions

Why does adding a tiny amount of uniform film grain make mixed AI clips match better?
Each video model (Gemini Omni Flash, Kling 4.0, Runway, Wan 2.2) has its own micro-texture and denoising smoothness. Laying one shared temporal grain layer across every cut creates a consistent 'camera sensor' floor that masks engine switches.
Why include -colorspace bt709 -color_primaries bt709 -color_trc bt709?
Without explicit BT.709 signaling tags, macOS QuickTime and Safari often misinterpret gamma curves and make your exported video look washed out compared to DaVinci Resolve or Chrome.
Use this page in AI tools or notes
raw .md