---
agent:
  instructions: "Use this search API to find relevant content across this site with keywords or natural-language queries, instead of crawling individual pages. Results are returned in Markdown."
  endpoint: "https://framesfield.com/.well-known/search?q={query}"
  method: "GET"
  documentation: "https://developers.cloudflare.com/ai-search/how-to/search-for-agents/"
title: "FFmpeg Film Grain and LUT Match Skill"
description: "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."
canonical: "https://framesfield.com/skills/ffmpeg-color-grade-and-grain-match-skill"
---

# FFmpeg Film Grain and LUT Match Skill

> 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.

- **Canonical URL:** https://framesfield.com/skills/ffmpeg-color-grade-and-grain-match-skill
- **Raw Payload URL:** https://framesfield.com/raw/skills/ffmpeg-color-grade-and-grain-match-skill
- **Asset Type:** SKILL.md
- **Compatible Hosts:** Claude Code, Cursor, Codex
- **Target Creative Tool:** FFmpeg
- **License:** MIT
- **Last Verified:** 2026-11-29
- **Source Reference:** https://ffmpeg.org/ffmpeg-filters.html#noise

## Setup & Install

```bash
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

```

## Copyable Asset (SKILL.md)

````markdown
---
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.
````

## Example Input

```text
"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."
```

## Expected Output

```text
- 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.
```

## 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

## Known Limits

- 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

## Implementation Notes

## Pair with our Cinematography & Continuity guides

Combine this post-production finish with [Guide 05: Consistent Characters, Product Placement & Brand Assets](/guides/consistent-characters-and-brand-assets-guide) and verify your finished master using [Skill 12: Video QA and Broadcast Delivery Subagent](/skills/video-qc-delivery-agent).
