← ScenarioCONTENT HISTORY

Update to Scenario

Snapshot Nov 25, 2026 · 18:15 UTC · version 0.2.2

Collection source: downloaded plugin package.

WHAT CHANGED

First saved snapshot

No earlier snapshot is available to establish a change.

Save Scenario and check future changes in Following.

Up to 3 plugins free · no card required.

Compare saved observations

Download comparison JSON
Full technical diff · 0 changed fields
Full snapshot data
{
  "description": "Use when color grading, color correcting, or relighting an existing video or still with deterministic code instead of a generative model: cinematic looks (teal and orange, film stock, bleach bypass, noir, duotone, faded 70s), golden hour, blue hour or day-for-night, log footage (S-Log3) to Rec.709, matching a reference image's colors, black and white with one kept or swapped color, .cube LUT export, a look comparison grid, or a grading showreel.",
  "included_files": [
    {
      "relative_path": "README.md",
      "size_in_bytes": 2143
    },
    {
      "relative_path": "assets/looks_library.json",
      "size_in_bytes": 14373
    },
    {
      "relative_path": "examples/looks.json",
      "size_in_bytes": 8587
    },
    {
      "relative_path": "references/keying.md",
      "size_in_bytes": 5404
    },
    {
      "relative_path": "references/looks.md",
      "size_in_bytes": 4825
    },
    {
      "relative_path": "references/ops.md",
      "size_in_bytes": 4295
    },
    {
      "relative_path": "references/relight.md",
      "size_in_bytes": 3735
    },
    {
      "relative_path": "scripts/grade.py",
      "size_in_bytes": 10816
    },
    {
      "relative_path": "scripts/inspect_frame.py",
      "size_in_bytes": 5100
    },
    {
      "relative_path": "scripts/match.py",
      "size_in_bytes": 2489
    },
    {
      "relative_path": "scripts/media.py",
      "size_in_bytes": 4561
    },
    {
      "relative_path": "scripts/render_looks.py",
      "size_in_bytes": 6713
    },
    {
      "relative_path": "scripts/showreel.py",
      "size_in_bytes": 16502
    },
    {
      "relative_path": "scripts/spatial.py",
      "size_in_bytes": 9223
    }
  ],
  "name": "scenario-video-color-grade",
  "skill_md_contents": "---\nname: scenario-video-color-grade\ndescription: \"Use when color grading, color correcting, or relighting an existing video or still with deterministic code instead of a generative model: cinematic looks (teal and orange, film stock, bleach bypass, noir, duotone, faded 70s), golden hour, blue hour or day-for-night, log footage (S-Log3) to Rec.709, matching a reference image's colors, black and white with one kept or swapped color, .cube LUT export, a look comparison grid, or a grading showreel.\"\nlicense: MIT\n---\n\n# Scenario Video Color Grade\n\n## Overview\n\nEvery grade here is math the agent writes, measures, and tunes; no generative model touches the\npixels. Per-pixel color operations bake into a 33³ `.cube` LUT that ffmpeg applies. Spatial\noperations (relight, keyed or masked selective color) run per frame in numpy before the LUT. Results\nare exact, identical on every frame, and editable: the LUTs load in Premiere, After Effects, and\nResolve. Framing, motion, and frame count are kept, so a seamless loop stays seamless.\n\nScenario supplies two preset LUT tool models and the segmentation masks that make selective color\nexact. New footage is out of scope. Connection and the core loop: the `scenario` skill. Running the\nLUT tool models on long clips (cost follows the clip, `wait=false`): `scenario-video-editing`. Music\nfor a reel: `scenario-audio`. If a sibling skill named here is missing from your available skills,\nload it with `skill_get` (Scenario MCP) or ask the user to install it\n(https://github.com/scenario-labs/skills#install); unattended, proceed from tool schemas and flag\nthe gap.\n\nThe scripts run locally with `python3` and need ffmpeg, numpy, scipy, and Pillow. Each prints its\nusage when run without arguments, refuses to overwrite outputs without `--force`, and never calls\nScenario. Paths below are relative to this skill's folder.\n\n## Two routes: a Scenario preset, or your own recipe\n\nScenario's 3D Color LUT tool models apply one preset (`lutStyle`, about 150 at authoring time) at an\nopacity (`lutIntensity`): film-stock emulations, log-to-Rec.709 conversions for the common camera\nlog formats, print-film conversions, and creative looks. `model_scenario-postprocessing-lut` grades\nimages and `model_scenario-postprocessing-lut-video` grades video. Both ids are fixed: each is\nScenario's single deterministic tool for the operation, so discovery would only re-derive it. The\nvideo tool keeps frame count and timing.\n\nUse a preset first when:\n\n- **The footage is log.** Pick the preset for the camera's log format. It covers far more cameras\n  than the local `decode_log` op, which reads S-Log3 only.\n- **A preset look is the ask** (a film stock, a print emulation), or the grade must stay inside\n  Scenario: no local ffmpeg or Python, a node in a Scenario workflow, many images.\n\nWrite a recipe when the look must be tuned or invented, needs position (masks, relight, vignette,\ngrain, halation), must match a reference, must ship as a `.cube` file, or feeds a reel. The tool\nmodels take only their own presets, never a custom `.cube`. The routes chain: convert log on\nScenario, then grade its Rec.709 output with a recipe that drops `decode_log`.\n\nRunning a preset:\n\n1. `model_schema_get` on both ids and read `lutStyle`'s allowed values; never guess them. Shortlist\n   only values the video tool lists too.\n2. Try two or three presets on one still with the image tool. Names do not say which input a preset\n   expects, so compare similar ones (two print emulations of one stock) side by side.\n3. `upload_asset` the clip, price it with `model_run` and `dry_run=true`, run the pick, `jobs_wait`,\n   then `asset_download`.\n4. `ffprobe` the result: at authoring time the video tool could return MPEG-4 Part 2. Re-encode for\n   the web with\n   `ffmpeg -i in.mp4 -c:v libx264 -crf 18 -pix_fmt yuv420p -movflags +faststart -c:a copy out.mp4`.\n\n## Quick reference\n\n- [render_looks.py](scripts/render_looks.py): applies looks to a video (one mp4 per look, audio\n  copied) or to one frame (PNG stills plus a labeled `grid.jpg`), and writes `luts/<key>.cube`.\n- [inspect_frame.py](scripts/inspect_frame.py): `grid` (pixel coordinates), `sample` (hue,\n  saturation, and brightness percentiles of rectangles), `key` (red overlay of what a selective key\n  keeps, with blob sizes).\n- [match.py](scripts/match.py): measures a reference image for the `match` op, a Reinhard transfer\n  in CIE Lab.\n- [showreel.py](scripts/showreel.py): a reel of every look, with a typed name panel, wipes on one\n  continuous clip, a grid finale, and an optional end card and music.\n- [grade.py](scripts/grade.py), [spatial.py](scripts/spatial.py), [media.py](scripts/media.py): the\n  color ops and LUT writer, relight and keying, ffmpeg I/O. The scripts above import them.\n- [looks_library.json](assets/looks_library.json): 21 tuned starting looks, including day-for-night,\n  keyed black and white, a reference match, and four relight presets.\n- [looks.json](examples/looks.json): twelve tuned looks, with mask-based black and white plus one\n  color and a reference match that needs `match.py` first.\n- [ops.md](references/ops.md), [looks.md](references/looks.md), [keying.md](references/keying.md),\n  [relight.md](references/relight.md): every op, how each library look is built, keys and masks,\n  relighting.\n\n## Steps\n\n1. **Look at the source.** `ffprobe` it and pull three or four frames from different moments. Note\n   whether it is log (milky, flat), normal, or already graded. The looks were tuned on a soft,\n   slightly desaturated source; on a contrasty one, cut saturation and contrast by about a third.\n   Note the light direction and the key objects' colors.\n2. **Set up `looks.json`.** Copy the library or the example set next to the clip, then keep, rename,\n   add, or delete looks. A look holds `name` and `settings` (the reel's two label lines), optional\n   `relight`, optional `selective`, `ops` (baked into the LUT), and optional `vignette`, `grain`,\n   and `halation`. They apply in that order. Keys sort the outputs; keys starting with `_` are\n   notes.\n3. **Still test before any video.**\n   `python3 scripts/render_looks.py clip.mp4 --looks looks.json --out still_test --frame 40`, then\n   open `grid.jpg`. Check that every look differs from the source, none clips or turns skin orange,\n   and skin stays believable outside the stylized looks. Iterate here: a still takes seconds, a\n   render minutes. Test two frames on a moving clip.\n4. **Keyed looks: measure, then preview.** `inspect_frame.py grid` for full-resolution coordinates\n   (the still-test `grid.jpg` tiles are downscaled), `sample` on the object and what shares its\n   color (skin, lips, ground), then `key ... --frame 10 90 160` for the overlay: red on a gray frame\n   marks what is kept. The separating dimension is often brightness or saturation, not hue. For an\n   exact result, use object masks (worked example).\n5. **Relight** at 0.3 to 1 stop, from the side that already holds the highlights. It changes light\n   character, never geometry or cast shadows: tell the user so.\n6. **Match a reference** with\n   `python3 scripts/match.py clip.mp4 reference.jpg match/reference.json [--crop w:h:x:y]`, then use\n   `{\"op\": \"match\", \"stats\": \"match/reference.json\"}`. Re-measure whenever the source changes.\n   Matching the same kind of scene at another hour is a convincing time-of-day change.\n7. **Render** with\n   `python3 scripts/render_looks.py clip.mp4 --looks looks.json --out renders [--only k1,k2]`.\n   - Pure color looks go straight through ffmpeg.\n   - Relit and keyed looks took about 1 to 2 s per 1080p frame together at authoring time, so run\n     long clips in the background.\n   - A look whose mask or match stats are missing is skipped with a message.\n   - Verify that each render's frame count equals the source's, and sweep keyed and relit renders\n     for flicker, skin, and edges.\n8. **Reel (optional)**:\n   `python3 scripts/showreel.py --renders renders --looks looks.json --source 00_ungraded --out reel.mp4 --order k1,k2 --music track.mp3`.\n   Put a dramatic look (duotone, noir) second or third, and prefer a clip that loops cleanly. The\n   reel normalizes music to about -18 LUFS. The reel carries no branding by default. Add an end card\n   only when the user asks, with their own `--credit` text or `--logo` (a white transparent PNG).\n9. **Deliver** the renders, `renders/luts/*.cube` (in Premiere: Lumetri, Creative, Look), the grid,\n   and the reel. Name the looks with spatial parts: their LUT alone is only the color, so an editor\n   needs a mask too.\n\n## Worked example: black and white with one kept color\n\nThe grading is local; only the masks come from Scenario, and the mask job never changes a pixel.\n\n1. `recommend` with the need in the user's words, for example \"segment one object across every frame\n   of a video\". Pick a video segmentation member, `model_schema_get` it, and build the parameters\n   from its schema.\n2. `upload_asset` the exact clip you grade. Price with `model_run` and `dry_run=true`, then run once\n   per object with a short noun phrase as the text prompt (\"red leather jacket\", \"red fuel pump\").\n   `jobs_wait`, then `asset_download` each mask video into `masks/`.\n3. Overlay each mask's outline on two or three full-resolution frames. Its frame count must equal\n   the clip's.\n4. Give the look a `selective` block. A mask entry with a `key` keeps only the keyed color inside\n   that object, so the white panels of a red pump stay gray:\n\n```json\n\"selective\": {\n  \"masks\": [{\"path\": \"masks/jacket.mp4\"},\n            {\"path\": \"masks/pump.mp4\", \"key\": {\"center\": 11, \"width\": 18, \"min_sat\": 0.28, \"max_val\": 0.62}}],\n  \"weights\": [0.3, 0.55, 0.15], \"sat\": 1.7, \"val\": 1.05\n}\n```\n\n5. Still test, then render. To swap the color (red to gold), add `\"shift\": 34` to the same block.\n\nAt authoring time, twelve looks on an 8-second loop cost 112 CU in all: two masks and the reel's\nmusic. The grades themselves cost nothing.\n\n## Common mistakes\n\n- **Writing a recipe a preset already covers.** Log conversion and film-stock emulations are\n  `lutStyle` presets: check them first.\n- **Shipping the video LUT tool's output unchecked.** Re-encode MPEG-4 Part 2 to H.264 for the web.\n- **A color key alone for one kept color.** Skin, lips, and warm backgrounds share the object's\n  color and turn up colored at the edges. Use masks plus a key inside the object whenever the object\n  sits near skin.\n- **Hue-only keys.** A teal car reflecting a warm sky has almost no teal pixels, and lips share a\n  red jacket's hue. Separate by brightness or saturation, set `min_area`, and preview. If it still\n  leaks, tell the user it needs a mask.\n- **Heuristic region masks (\"change only the sky\").** Hair, columns, and motion blur leak through.\n  Offer a graduated filter or a reference match instead.\n- **One source's tuning on another.** Re-run the still test on every new source.\n- **Trademarks as look names.** Keep movie titles and film-stock brands out of public names; use\n  descriptive ones (\"Scorched Desert\", \"Vintage Slide\").\n- **`-shortest` with audio slightly shorter than the video.** ffmpeg drops the last frame and the\n  loop breaks. The scripts avoid it; keep it that way in custom commands.\n- **Grading alone.** Grading is taste: show grids and short previews, and iterate on what the user\n  points at.\n"
}

SHA-256 of public snapshot: 6367ee07fd2505b1ddf9a8c734a234e15a81f311e7c24f76e4b8d9c56898c816