/media-os:ffmpeg-lut-grade [lut-file] [input]from media-os
Applies LUTs (.cube, .3dl, Hald CLUT) and color grades video via ffmpeg filters: colorbalance, selectivecolor, colormatrix, colorlevels, colorchannelmixer, hue.
Ships in media-os. Installing the plugin adds it to Claude Code.
What the skill costs in Claude's context, stage by stage
Name and description: Claude knows it exists.
SKILL.md joins the conversation and stays.
Read when SKILL.md points to them; scripts run unread.
Context: $ARGUMENTS
lut3d with interp=tetrahedral)haldclut) → Step 2 (-filter_complex [0][1]haldclut)colormatrix).cube, .3dl, or Hald CLUT PNG and need to bake the look into a render.Do not use this skill for HDR → SDR tone-mapping (see ffmpeg-hdr-color), denoise
(ffmpeg-denoise-restore), or generic video filters like scale/crop
(ffmpeg-video-filter).
Decide by asset, not vibe:
| You have | Use |
|---|---|
.cube or .3dl file | lut3d=file='look.cube':interp=tetrahedral |
1D LUT (.cube with LUT_1D_SIZE) | lut1d=file='look.cube' |
| Hald CLUT PNG (graded identity image) | [0][1]haldclut=interp=tetrahedral (filter_complex) |
| Need R/G/B tint per zone | colorbalance (shadows/mids/highlights) |
| Want only reds/skin/sky shifted | selectivecolor |
| Legacy BT.601 tagged as BT.709 (or v.v.) | colormatrix=bt601:bt709 (legacy, non-ICtCp) |
| Crush shadows / recover highlights | colorlevels |
| Channel-mix R/G/B | colorchannelmixer |
| Hue rotate / desaturate | hue=h=15:s=0.9 |
| Brightness/contrast/gamma/saturation | eq (see ffmpeg-video-filter for full table) |
| False-color exposure analysis | pseudocolor=preset=heat |
Validate the LUT file exists and has the expected header (see references/filters.md
".cube spec"). If the LUT is a Hald identity that hasn't been graded yet, applying it
is a no-op — confirm it's the graded version.
ffmpeg -i in.mp4 -vf "lut3d=file='look.cube':interp=tetrahedral" \
-c:v libx264 -crf 18 -c:a copy out.mp4
ffmpeg -i in.mp4 -i clut.png \
-filter_complex "[0:v][1:v]haldclut=interp=tetrahedral" \
-c:v libx264 -crf 18 -c:a copy out.mp4
# Warm shadows, cool highlights
ffmpeg -i in.mp4 -vf "colorbalance=rs=.15:gs=.05:bs=-.1:rh=-.1:gh=.0:bh=.1" \
-c:v libx264 -crf 18 out.mp4
# Reduce red saturation (skin safety or red-dominant scenes)
ffmpeg -i in.mp4 -vf "selectivecolor=reds=0 0 -0.5 0" \
-c:v libx264 -crf 18 out.mp4
# Shadow crush + highlight roll-off
ffmpeg -i in.mp4 -vf "colorlevels=rimin=0.05:gimin=0.05:bimin=0.05:romax=0.95:gomax=0.95:bomax=0.95" \
-c:v libx264 -crf 18 out.mp4
# SD footage tagged 709 that actually carries 601 primaries
ffmpeg -i sd.mxf -vf "colormatrix=bt601:bt709" -c:v libx264 -crf 18 out.mp4
ffplay -i out.mp4 -vf "split=2[a][b];[b]vectorscope=mode=color3[c];[a][c]hstack"
ffplay -i out.mp4 -vf "waveform=intensity=0.1:mode=column:display=overlay:components=7"
Skin tones should land on the flesh-line at ~10-11 o'clock on the vectorscope; clipped channels park on the outer ring.
Grading is non-commutative. Recommended chain order (coarsest → finest):
format=rgb24 (or zscale to linear) — ensure LUT sees RGB if the LUT is RGB-domain.eq (exposure / contrast baseline) — optional; many colorists skip and use levels.colorbalance or colorchannelmixer — primary white balance / cast fix.lut3d / haldclut — the creative look.selectivecolor — secondary corrections (skin, sky) on top of the look.colorlevels — final output range shaping.format=yuv420p for H.264/H.265 compatibility.Full chain example (teal-and-orange):
ffmpeg -i in.mov -vf \
"format=rgb24,\
colorbalance=rs=.05:bs=-.05:rh=-.05:bh=.08,\
lut3d=file='teal_orange.cube':interp=tetrahedral,\
selectivecolor=reds=0 0 0.2 0:yellows=-0.1 0 0.1 0,\
colorlevels=rimin=0.02:gimin=0.02:bimin=0.02,\
format=yuv420p" \
-c:v libx264 -crf 18 -c:a copy out.mp4
Match two clips A and B (different cameras, same scene):
# Clip A: apply camera-A LUT + subtle cool
ffmpeg -i A.mov -vf "lut3d=file='camA_to_rec709.cube',colorbalance=bh=.03" -c:v prores -profile:v 3 A_match.mov
# Clip B: apply camera-B LUT + subtle warm
ffmpeg -i B.mov -vf "lut3d=file='camB_to_rec709.cube',colorbalance=rh=.03" -c:v prores -profile:v 3 B_match.mov
scripts/grade.py — thin wrapper around the filters above. Subcommands:
lut, haldclut, balance, selective, match-bt601-to-bt709.
Validates .cube path, supports --dry-run and --verbose, stdlib only.Usage examples:
uv run ${CLAUDE_SKILL_DIR}/scripts/grade.py lut \
--input in.mp4 --lut look.cube --output out.mp4 --interp tetrahedral
uv run ${CLAUDE_SKILL_DIR}/scripts/grade.py haldclut \
--input in.mp4 --clut clut.png --output out.mp4
uv run ${CLAUDE_SKILL_DIR}/scripts/grade.py balance \
--input in.mp4 --output out.mp4 \
--shadows 0.15,0.05,-0.1 --mids 0,0,0 --highlights -0.1,0,0.1
uv run ${CLAUDE_SKILL_DIR}/scripts/grade.py selective \
--input in.mp4 --output out.mp4 --color reds --adjust 0,0,-0.5,0
uv run ${CLAUDE_SKILL_DIR}/scripts/grade.py match-bt601-to-bt709 \
--input in.mxf --output out.mp4
references/filters.md for full option tables
(lut3d, lut1d, haldclut, colorbalance, selectivecolor, colormatrix, colorlevels,
colorchannelmixer, hue, pseudocolor), .cube spec, Hald identity generator, the
recommended chain order, and a recipe book (teal-and-orange, bleach bypass,
cross-process, sepia, B&W with tinted shadows, skin-tone protection).interp=tetrahedral beats trilinear for nearly all .cube LUTs — smoother
gradients, no visible banding at hue transitions. Prefer it unless you need
bit-exact match with another NLE that used trilinear..cube supports LUT_3D_SIZE 17, 33, 64, 128 in ffmpeg. Comments start with #.
DOMAIN_MIN / DOMAIN_MAX outside 0.0 1.0 means the LUT expects extended range
(log footage) — converting to Rec.709 first will clip it.eq → lut3d → colorbalance bakes contrast into the LUT input;
lut3d → colorbalance lets you push tint without affecting the LUT shape.
Document intent; don't swap silently.colorspace / zscale, or
use a matching log-to-Rec709 LUT (e.g. Slog3, LogC, VLog).selectivecolor values are space-separated 4-tuples C M Y K, not commas.
selectivecolor=reds=0 0 -0.5 0 is correct; reds=0,0,-0.5,0 is an error.colorbalance range is roughly -1..1 but anything over 0.2 on any axis is
usually too strong and crushes the channel. Start at 0.05.lut3d runs on CPU. For hardware-accelerated grading, use
libplacebo with custom_lut='look.cube' (Vulkan) or VAAPI's lut3d variant on
Linux Intel..cube LUTs are RGB-domain. If input is YUV, insert format=rgb24 before
lut3d — otherwise ffmpeg auto-converts but may pick a narrower pixel format.vectorscope. Skin tones should sit on the flesh-line at ~10-11
o'clock. Clipped channels appear as bright spots on the outer ring.Input: raw.mov (ProRes, Rec.709, 1080p), LUT kodak2383.cube (17^3).
Steps: lut3d=file='kodak2383.cube':interp=tetrahedral → x264 CRF 18.
Result: graded.mp4 with film print look baked in; source untouched.
Input: A.mov (FX3, Slog3), B.mov (A7S3, Rec709).
Steps: Apply slog3_to_rec709.cube to A; apply mild colorbalance=bh=.02 to B.
Result: Both clips on the same Rec.709 baseline; fine-tune with selectivecolor
on skin if needed.
Input: trip.mp4, hald_level8_graded.png (someone ran an LR preset over the
identity and exported).
Steps: [0:v][1:v]haldclut=interp=tetrahedral in -filter_complex.
Result: Photoshop-preset look on video, deterministic and repeatable.
Unable to parse option value "..." for 'file'Cause: Path has a space or special char and isn't single-quoted inside the filter.
Solution: Quote the path inside the filter graph: lut3d=file='My LUTs/look.cube'.
Cause: LUT expects log input but you fed it Rec.709; LUT is designed to expand log to 709, so a Rec.709-in → Rec.709 LUT produces flat results. Solution: Confirm the LUT's intended input space. Use a matching LUT or skip it.
Cause: interp=nearest or trilinear, or 8-bit pipeline with an aggressive LUT.
Solution: interp=tetrahedral. For stronger grades, encode output at 10-bit
(-pix_fmt yuv420p10le -c:v libx265 or ProRes).
haldclut fails with "Invalid frame dimensions"Cause: CLUT PNG isn't a valid Hald size (level^3 × level^3 pixels, so level 8 =
512×512, level 6 = 216×216).
Solution: Regenerate the identity via
ffmpeg -f lavfi -i haldclutsrc=level=8 -frames:v 1 hald_identity.png, regrade it,
and retry.
selectivecolor throws "Option not found" / zero effectCause: Commas used instead of spaces inside the 4-tuple.
Solution: selectivecolor=reds=0 0 -0.5 0 (spaces, not commas). Quote the whole
filter arg in shell: -vf "selectivecolor=reds=0 0 -0.5 0".
Cause: Output tagged with non-standard primaries/transfer, or pipeline stripped tags.
Solution: End the chain with format=yuv420p and re-tag:
-colorspace bt709 -color_primaries bt709 -color_trc bt709.
What SKILL.md sets; muted values are Claude Code's defaults
npx claudepluginhub damionrashford/media-os --plugin media-os110 skills in this plugin
/audio-coreaudioManipulate macOS audio at the Core Audio HAL layer: afinfo (audio file metadata), afplay (play), afconvert (convert format/rate/bit-depth/channel layout), say (TTS), SwitchAudioSource (change default input/output/system device — brew install switchaudio-osx), audiodevice CLIs (npm/Go variants), AppleScript via osascript to drive System Preferences Sound. HAL plugins at /Library/Audio/Plug-Ins/HAL/ load virtual drivers (BlackHole 2ch/16ch/64ch, Loopback, Background Music). Aggregate Device (drift-corrected multi-in) and Multi-Output Device via Audio MIDI Setup.app or AudioHardwareCreateAggregateDevice. Use when the user asks to change default macOS audio device, route audio between apps on Mac, install BlackHole, build an Aggregate Device, convert audio files with afconvert, or script Mac audio from the terminal.
/audio-jackRoute professional low-latency audio with JACK Audio Connection Kit (jackaudio.org): jackd server (ALSA/CoreAudio/PortAudio/ASIO backends), jack_control (D-Bus JACK2 config), jack_lsp (list ports/connections), jack_connect/jack_disconnect (manage links), jack_cpu_load, jack_samplerate, jack_bufsize (runtime period size), jack_transport, jack_rec (multi-channel WAV recording), jack_iodelay (round-trip latency), jack_wait, jack_midi_dump. JACK1 C maintenance vs JACK2 C++ multicore. Modern Linux swaps jackd for PipeWire's libjack shim — same client API. JackTrip for uncompressed multichannel UDP over the Internet. Use when the user asks to run a JACK server, connect audio clients, measure roundtrip latency, record from JACK ports, set JACK period size, or bridge JACK over the network with JackTrip.
Other plugins' skills for the same job