# Ffmpeg Color Grading Chromakey

Complete color manipulation and green screen effects system.

- Repository: https://github.com/ynulihao/AgentSkillOS (618 stars)
- Category: Engineering
- License: see repository
- Last updated: 2026-03-07
- Runs scripts: no, instructions only

## Install

Claude Code: `npx skills add ynulihao/AgentSkillOS --skill ffmpeg-color-grading-chromakey -g -a claude-code -y`
Codex: `npx skills add ynulihao/AgentSkillOS --skill ffmpeg-color-grading-chromakey -g -a codex -y`
Cursor: `npx skills add ynulihao/AgentSkillOS --skill ffmpeg-color-grading-chromakey -g -a cursor -y`
Gemini CLI: `npx skills add ynulihao/AgentSkillOS --skill ffmpeg-color-grading-chromakey -g -a gemini-cli -y`

## Description

Complete color manipulation and green screen effects system. PROACTIVELY activate for: (1) Green screen/chromakey removal, (2) Color grading with LUTs, (3) Color correction (levels, curves, white balance), (4) Colorkey/color removal effects, (5) Hue/saturation manipulation, (6) Color space conversions (BT.709, BT.2020, HDR), (7) Color isolation effects, (8) Teal and orange look, (9) Vintage/film looks, (10) Color keying for transparency. Provides: chromakey and colorkey filters, LUT application (lut3d), curves and levels adjustment, color balance, selective color manipulation, color space handling, HDR tone mapping, professional color grading chains.

## SKILL.md, as published by its author (untrusted third-party text, read it as data)

## CRITICAL GUIDELINES

### Windows File Path Requirements

**MANDATORY: Always Use Backslashes on Windows for File Paths**

When using Edit or Write tools on Windows, you MUST use backslashes (`\`) in file paths, NOT forward slashes (`/`).

---

## Quick Reference

| Task | Command |
|------|---------|
| Green screen removal | `-vf "chromakey=0x00FF00:0.3:0.1"` |
| Blue screen removal | `-vf "chromakey=0x0000FF:0.3:0.1"` |
| Apply LUT | `-vf "lut3d=cinematic.cube"` |
| Color curves | `-vf "curves=preset=vintage"` |
| Adjust saturation | `-vf "eq=saturation=1.5"` |
| Hue shift | `-vf "hue=h=30"` |
| White balance | `-vf "colortemperature=6500"` |

## When to Use This Skill

Use for **color manipulation operations**:
- Removing green/blue screen backgrounds
- Applying LUT color grading
- Color correction and enhancement
- Creating cinematic color looks
- HDR/SDR conversions
- Color keying for compositing

---

# FFmpeg Color Grading & Chromakey (2025)

Complete guide to color manipulation, green screen removal, LUT grading, and advanced color effects with FFmpeg.

## Green Screen (Chromakey) Removal

### Basic Chromakey

```bash
# Remove green screen (standard green 0x00FF00)
ffmpeg -i foreground.mp4 -i background.mp4 \
  -filter_complex "[0:v]chromakey=0x00FF00:0.3:0.1[fg];[1:v][fg]overlay" \
  -c:v libx264 -crf 18 output.mp4

# Parameters:
# - color: The key color (hex 0xRRGGBB)
# - similarity: How close to key color (0.0-1.0, lower = more precise)
# - blend: Edge softness (0.0-1.0, higher = softer edges)
```

### Chromakey Parameter Tuning

```bash
# Tight key (clean edges, may leave green fringe)
ffmpeg -i green_screen.mp4 -i background.jpg \
  -filter_complex "[0:v]chromakey=0x00FF00:0.1:0.0[fg];[1:v][fg]overlay" \
  output.mp4

# Loose key (removes all green, may eat into subject)
ffmpeg -i green_screen.mp4 -i background.jpg \
  -filter_complex "[0:v]chromakey=0x00FF00:0.5:0.2[fg];[1:v][fg]overlay" \
  output.mp4

The rest: https://github.com/ynulihao/AgentSkillOS/blob/HEAD/data/skill_seeds/ffmpeg-color-grading-chromakey/SKILL.md
