Logo: Video Color Grade

Video Color Grade

Organisatioun
WhiteTowerAI
video-color-grade

Use when footage needs color correction, white-balance or exposure repair, Log-to-Rec.709 conversion, named creative looks, skin-tone review, or a portable .cube LUT for a cut-as-code delivery.

Iwwersiicht

EditeurWhiteTowerAI
Repositorycut-as-code
Skill-Nummvideo-color-grade
Stären
31
Forks
1
Matgeliwwert Dateien
7
LizenzMIT
Linken
  • Instruktiounen am Markdown-Format

    Eng SKILL.md-Datei, déi de Modell bei Bedarf luet, soudatt nëmmen Token ufalen, wann eng Ufro tatsächlech dozou passt.

  • Funktionéiert mat all LLM

    KI-Skills si reng Markdown, keen ubidderspezifesche Code. Dofir funktionéiert dëse Skill mat GPT, Claude, Gemini, Grok oder engem lokale Modell.

  • 7 matgeliwwert Dateien

    Skripten, Virlagen a Referenzen, déi de Modell beim Schaffe liese kann. D'Dateie kënnen nëmme gelies ginn a ginn ni ausgeféiert.

  • Open Source

    WhiteTowerAI huet de Skill op GitHub verëffentlecht. Liest de Quelltext, ier Dir de Skill installéiert.

Installatioun

Installéiert de KI-Skill Video Color Grade an TypingMind, fir e mat all LLM ze benotzen, oder setzt en an en anere KI-Agent an, deen SKILL.md liest.

1

An TypingMind installéieren

TypingMind installéiert e Skill direkt aus sengem GitHub-Dossier — dobäi gëtt SKILL.md gelies, d'Ressourcedateie gi gebëndelt an d'Resultat gëtt lokal gespäichert.

  1. Maacht d'App op a gitt op Plugins → Skills.
  2. Wielt „Vu GitHub installéieren“.
  3. Pecht d'URL vum Skill-Dossier, déi hei drënner steet, an a bestätegt d'Installatioun.
    https://github.com/WhiteTowerAI/cut-as-code/tree/main/skills/video-color-grade
  4. Aktivéiert de Skill an all Chat, an deem Dir e benotze wëllt.
Plugins → Skills → Skill derbäisetzen → Iwwer eng GitHub-URL. Pecht dann d'URL vum Dossier an a klickt op Weider.
2

An engem anere KI-Agent installéieren

All KI-Agent, deen d'Format Agent Skills liest, kann dëse Skill benotzen — kopéiert den Dossier an d'Skill-Verzeechnes vun deem KI-Agent.

Claude Code — .claude/skills
git clone --depth 1 https://github.com/WhiteTowerAI/cut-as-code.git /tmp/cut-as-code
mkdir -p .claude/skills
cp -r /tmp/cut-as-code/skills/video-color-grade .claude/skills/video-color-grade
Start Claude Code nom Kopéieren nei, fir datt den neie Skill erkannt gëtt.

An TypingMind benotzen

Aktivéiert Video Color Grade an engem Chat vun TypingMind, an de Modell iwwerhëlt de Rescht. Den Numm an d'Beschreiwung stinn am System-Prompt. Soubal eng Ufro dozou passt, luet de Modell déi komplett Instruktioune selwer — Dir musst de Skill ni manuell opruffen, an et fale keng Token un, bis en tatsächlech benotzt gëtt.

De Modell luet Video Color Grade automatesch, soubal eng Ufro dozou passt.

Funktionéiert mat all KI-Modell

KI-Skills si reng Markdown-Instruktiounen amplaz vun ubidderspezifeschem Code. Dofir ass Video Color Grade net un de Modell gebonnen, fir deen de Skill geschriwwe gouf. Installéiert en eemol an TypingMind a benotzt e mat GPT-5, Claude, Gemini, Grok, DeepSeek, Mistral, Llama oder engem lokale Modell, deen Dir selwer bedreift — alles mat Ären eegenen API-Schlësselen.

  • Gëtt nëmme gelueden, wann et néideg ass

    De System-Prompt enthält nëmmen den Numm an d'Beschreiwung. D'Instruktioune gi bei der éischter passender Ufro gelueden, soudatt en onbenotzte Skill näischt kascht.

  • De Modell am lafende Chat wiesselen

    Well de Skill aus Instruktiounen amplaz vu Code besteet, funktionéiert en och no engem Modellwiessel — den nächste Modell liest déi selwecht SKILL.md-Datei.

Skill-Instruktiounen

Dëst ass den Inhalt vu SKILL.md, deen de Modell luet. Liest e virun der Installatioun — e Skill besteet aus Instruktiounen, déi Äre Modell befollegt.

Video Color Grade (assess → correct → looks → choose → LUT + apply)

Write the grade from scratch as code, generate several distinct named looks on the real footage, select one through explicit human choice or delegated agent judgment, then bake a portable .cube LUT and apply it to the full clip. No preset packs.

Core idea — correct, then style. Every look is corrective base + creative layer:

  • corrective base makes the footage honest — for flat LOG/HLG it's the log→Rec.709 conversion; for already-Rec.709 footage it's WB neutralize + exposure + mild contrast. Every look shares this base, so "neutral" stays meaningful and looks differ by intent.
  • creative layer is the look stacked on top (warm / cool / teal-orange / punchy / faded…).

Skin is the quality bar. On people — especially darker skin — teal_orange and cool_desat routinely throw a green/grey cast. Judge every look on faces first; keep midtone warmth, push the tint into shadows/highlights/background, prefer vibrance over raw saturation. Don't push the white balance all the way to neutral or skin goes lifeless.

Requirements: ffmpeg/ffprobe on PATH, Python with numpy + Pillow.

Contract

  • Every look = base + creative layer; the base is shared by all looks.
  • All looks render on the same representative frame (a fair, controlled comparison), labeled, at full resolution.
  • The full apply uses -c:a copy (audio never re-encoded → A/V sync identical) and keeps source duration, fps, dimensions.
  • Complete look selection before delivery. Use human mode when the user asked to choose; use agent mode without pausing when the user delegated the choice or requested an autonomous run. In both modes, preserve the rationale in the durable plan.

Project protocol workflow

Store the durable decision in work/color-grade/grade-plan.json:

json
{
  "schema_version": 1,
  "target": "base-video",
  "base": "eq=contrast=1.05",
  "looks": [{"name": "clean", "chain": "null"}],
  "selected_look": "clean",
  "selection_mode": "agent",
  "selection_rationale": "Neutral correction preserves natural skin and source lighting.",
  "selected_lut": "../../final/selected-color-look.cube",
  "evidence_refs": ["media:source"]
}

Use base-video by default so content cards and captions are not recolored. composite is valid only when intentionally grading already-composited pixels. Read shared work/understand/media.json and visual evidence. Generate review/02-color-grade/choose-color-look.jpg and review/02-color-grade/skin-tone-check.jpg; optionally generate the short selected-look-preview.mp4. Record the decision and evidence in review/02-color-grade/selected-look.md.

Set selection_mode to human after an explicit user choice. Set it to agent when the user delegates the decision or requests an uninterrupted workflow, and choose conservatively with skin tone, highlight retention, and neutral balance as the priorities. Always write a non-empty selection_rationale; do not pause in agent mode.

Bake the chosen LUT to final/selected-color-look.cube. When that LUT is shipped, set selected_lut in the grade plan so the shared renderer consumes that exact file. A baked full-look LUT already contains the corrective base; the renderer must apply lut3d alone, not base + lut3d.

Record the operation's exact input revisions in based_on, increment its integer revision when the plan or selected input changes, set the operation check to pass only after the review files are complete, and contribute the full protocol fields:

json
{
"target": {"sequence": "main", "scope": "base-video"},
"effects": {
  "changes_timeline": false,
  "changes_geometry": false,
  "changes_video_pixels": true,
  "changes_audio": false,
  "adds_track": null
},
"check": {
  "status": "pass",
  "report": "../review/02-color-grade/selected-look.md"
},
"render": {
  "kind": "video-filter",
  "target": "base-video",
  "plan": "color-grade/grade-plan.json"
}
}

The shared renderer validates that selected_look exists, applies the grade after timeline transforms and before overlays, and encodes the final video once:

powershell
python skills/video-understand/scripts/build_render_plan.py .
python skills/video-understand/scripts/render_project.py work/render/render-plan.json

Standalone compatibility inputs

  • The source video.
  • A looks.json (base + named looks); start from looks.example.json and retune the base from what assess.py reports.

All existing scripts continue to accept legacy looks.json. gradelib.load_spec() also accepts canonical grade-plan.json, so contact-sheet, clip, LUT, and standalone apply commands remain compatible during migration.

looks.json schema

jsonc
{
  "base": "<corrective base: log->Rec.709 conversion, OR WB+exposure+contrast for normal footage>",
  "looks": [
    { "name": "clean_neutral", "label": "1 · CLEAN NEUTRAL", "desc": "corrected only", "chain": "eq=contrast=1.02" },
    { "name": "teal_orange",   "label": "4 · TEAL & ORANGE", "desc": "cinematic",      "chain": "colorbalance=...,eq=..." }
    // a look's full ffmpeg filter = base + "," + chain. Set "prepend_base": false to use chain standalone.
  ]
}

Workflow

  1. Assess — never grade blind.

    python scripts/assess.py SOURCE.mp4 --out work/

    Reports log-vs-Rec.709, white-balance cast (signalstats U/V vs 128), exposure (Y), picks a representative frame (work/assess/frame.png), and suggests base tweaks. Retune looks.json base accordingly (e.g. warm cast → add a little blue; log → put the log→709 conversion in base).

    • The rep frame is picked by median luma, not by faces. On a single-shot talking-head that usually lands on a good face frame, but on B-roll-heavy / multi-shot footage it can pick a faceless frame — and then face_skin_check.png is useless (skin is the quality bar). Force a known face moment with --frame-time SECONDS.
    • The WB/exposure stats come from one ~10s signalstats window at 10% of duration — fine for constant light; for footage whose light changes, move/lengthen it with --win-start SECONDS / --win-dur SECONDS.
  2. Render the looks for choosing.

    python scripts/render_looks.py work/assess/frame.png looks.json --out work/looks

    Produces work/looks/looks_compare.png (original + every look, labeled, full-res) and face_skin_check.png (zoomed skin strip). LOOK at both. Skin is the bar — retune or drop any look that greys/greens skin, then re-render. Off-center subject? add --face-crop W:H:X:Y. Treat those PNGs as working intermediates; publish the approved review copies as review/02-color-grade/choose-color-look.jpg and review/02-color-grade/skin-tone-check.jpg.

  3. (optional) Motion previews of the top 2–3 so they're seen moving (audio kept):

    python scripts/make_clips.py SOURCE.mp4 looks.json --out work/clips \
      --pick clean_neutral,warm_filmic,teal_orange --with-original --ss 148 --t 8
  4. Select one look. Present the contact sheet and wait only when the user asked to choose. Otherwise select it in agent mode and continue without a decision pause. Write selected_look, selection_mode, and selection_rationale before delivery.

  5. After the pick — bake the LUT and apply to the full clip.

    python scripts/bake_lut.py looks.json --name CHOSEN \
      --out final/selected-color-look.cube --verify-frame work/assess/frame.png
    python scripts/apply_grade.py SOURCE.mp4 --looks looks.json --name CHOSEN --out out/graded.mp4
    #   or apply the delivered LUT: --lut final/selected-color-look.cube

    apply_grade.py verifies duration/audio are kept, prints the WB shift (U/V toward 128), and drops a spot frame to eyeball.

    • The apply re-encodes the video once (lossy); audio is -c:a copy. Quality/time are set by --crf (default 18) and --preset (default slow). slow is fine for small/ short clips, but on 1080p/4K hour-long footage it's a large, silent time cost — drop to --preset medium for delivery (or veryfast for a quick preview), slow only for final.
    • Match the delivered video to the delivered LUT: the chain (--name) and the baked 33³ .cube (--lut) can differ by up to ~5/255 on steep curves (bake_lut.py reports this max|d|). Invisible for most work, but if you're shipping the .cube and want the rendered video to match it exactly, apply with --lut final/selected-color-look.cube, not --name.

Design notes / gotchas

  • Grade the CLEAN cut, then composite overlays on top of the graded footage. If you must grade a video that already has burned-in captions/cards, do NOT trust assess.py: its WB/ exposure stats and frame pick are skewed by the graphics (dark top/bottom scrims drag Y down, bright caption text / teal accents skew U/V, and the frame pick can land on a caption-heavy frame) — you'd be correcting the overlays, not the footage. Reuse a base tuned on the clean footage, and expect the grade to tint the overlays, so use only a subtle/corrective look (clean_neutral); teal_orange/vintage_faded will visibly recolor the text/accents.
  • One look/LUT covers all related clips. Once you've picked a look, reuse the same looks.json / .cube across every related clip (e.g. clean cut + the overlaid version) — do NOT re-run the two-phase pick per clip.
  • Correct, then style. The base is the generalization of the deck's S-Log3→Rec.709 step. For normal footage the base is WB+exposure+contrast; for log footage put the conversion there.
  • Skin first. teal_orange/cool_desat are the usual skin offenders on darker subjects — keep midtones warm, tint shadows/highlights/bg, use vibrance. Don't neutralize U/V fully.
  • Labels are PIL PNGs overlaid by ffmpeg — never drawtext. On Windows the drawtext fontfile path (drive colon) is unreliable. Fonts are set at the top of gradelib.py.
  • Drive-colon paths break ffmpeg filtergraph options that take a path (lut3d, metadata=print:file=). The scripts run ffmpeg with cwd = the file's folder and reference it by basename. Keep this pattern for any new path-taking filter.
  • Outputs land in the --out dirs you pass (durable), not a system temp dir.
  • The face/skin strip uses a fixed centered upper-middle crop, not face detection. If the subject isn't roughly centered, pass --face-crop W:H:X:Y to render_looks.py or the skin strip will show the wrong region.
  • apply_grade.py's verify spot frame is at 20% of duration — a different frame than the one the looks were chosen on. If that 20% point is faceless, eyeball skin on another frame instead (or pass --frame-time to assess.py so the chosen frame is a known face moment).
  • The LUT bake is exact, because every filter here is a per-pixel point op: bake_lut.py pushes a 33³ identity grid through the real chain and self-checks against it (mean|d| should be well under 1/255; a few-level max|d| is just interpolation).
  • Selection before delivery, always. Human choice and delegated agent choice are both valid, but the plan must record which occurred and why.

Matgeliwwert Dateien

De Modell liest dës Dateie bei Bedarf, wärend de Skill gelueden ass. Si ginn als liesbar Dateie bereetgestallt a ginn ni ausgeféiert.

Heefeg gestallte Froen

Wat mécht de KI-Skill Video Color Grade?

Use when footage needs color correction, white-balance or exposure repair, Log-to-Rec.709 conversion, named creative looks, skin-tone review, or a portable .cube LUT for a cut-as-code delivery.

Firwat Video Color Grade op TypingMind benotzen?

Well Dir en eemol installéiert a mat all Modell benotze kënnt. Video Color Grade besteet aus einfachem Markdown amplaz vun ubidderspezifeschem Code. Dee selwechte Skill funktionéiert also mat GPT-5, Claude, Gemini, Grok oder engem lokale Modell – an Dir kënnt de Modell matzen am Chat wiesselen, ouni datt de Skill ophält ze funktionéieren. TypingMind benotzt Är eegen API-Schlësselen, sou datt Dir d'Ubidder direkt bezuelt, amplaz en Abonnement pro Benotzerplaz ze bezuelen. Är Skills a Chats bleiwen an Ärem eegene Späicher.

Wéi installéieren ech Video Color Grade an TypingMind?

Maacht an TypingMind Plugins → Skills → Vu GitHub installéieren op a setzt https://github.com/WhiteTowerAI/cut-as-code/tree/main/skills/video-color-grade an. TypingMind liest d'Datei SKILL.md, bëndelt déi zougehéiereg Dateien an installéiert dat Ganzt als Skill, deen Dir pro Chat aktivéiere kënnt.

Wéi eng KI-Modeller kënnen Video Color Grade benotzen?

All Modell, deen Dir an TypingMind verbënnt. KI-Skills sinn einfach Markdown-Instruktiounen an net ubidderspezifesche Code. Dofir kënne GPT, Claude, Gemini, Grok a lokal Modeller dëse Skill lueden, wann eng Ufro dozou passt.

Wéi vill KI-Modeller kann ech mat Video Color Grade benotzen?

Esou vill wéi Dir wëllt. Soulaang e Modell Skills ënnerstëtzt, kënnt Dir Video Color Grade domat benotzen – zum Beispill mat GPT, Claude, Gemini, Grok, DeepSeek, Mistral oder Llama – alles op TypingMind mat Ären eegenen API-Schlësselen.

Ass de KI-Skill Video Color Grade gratis?

Jo. WhiteTowerAI huet de Skill ënner der Lizenz MIT op GitHub publizéiert. Dir bezuelt nëmmen Ären eegene KI-Ubidder fir d'Token, déi Dir benotzt.

Wat si KI-Skills?

E KI-Skill ass e weiderverwendbare Pak vun Instruktiounen, deen engem KI-Modell bäibréngt, wéi en eng bestëmmt Aufgab erfëllt. E follegt dem oppenen Agent Skills-Format: eng Datei SKILL.md mat engem Numm an enger Beschreiwung, plus all Scripten, Virlagen oder Referenzdateien, déi de Modell eventuell brauch. De Modell liest d'Instruktiounen eréischt, wann Är Ufro zum Skill passt. En installéierte Skill kascht also näischt, bis e benotzt gëtt.

Wéi ënnerscheede sech KI-Skills vu Plugins oder MCP-Serveren?

E Plugin oder MCP-Server gëtt engem Modell nei Tools, déi en opruffe kann – Code, deen iergendwou leeft an e Resultat zeréckgëtt. E KI-Skill gëtt dem Modell dogéint Wëssen an eng Virgoensweis: wéi en eng Aufgab ugeet, wéi eng Schrëtt e maache soll a wéi eng gutt Ausgab ausgesäit. Skills bestinn aus einfachem Markdown, brauche kee Server, keen API-Schlëssel a kee Lafzäitëmfeld a funktionéiere mat all Modell.

Alleguer weisen

Elo Ären eegene KI-Aarbechtsberäich ariichten

Abonnéiert Iech op eisen Newsletter, fir iwwer nei Funktiounen an zukünfteg Gewënnspiller informéiert ze ginn 👇