Ffmpeg ocio colorpro

From damionrashford/media-os · View interactive version

Ffmpeg ocio colorpro is an AI agent skill from the GitHub repository damionrashford/media-os. Professional color management with ffmpeg + OpenColorIO: ocio filter (OCIO config / LUT / colorspace transforms), ACES workflows (ACEScc / ACEScg / ACES2065-1), Resolve-compatible LUTs, film-emulation via OCIO, iccdetect, iccgen, ICC profile handling. Use when the user asks for ACES color management

How to use this skill

Skill file

FFmpeg OCIO ColorPro

Context: $ARGUMENTS

Quick start

When to use

Step 1 — Set OCIO config & check support

ffmpeg -hide_banner -filters | grep -i ocio   # expect "ocio" line if built with libOpenColorIO
export OCIO=/path/to/aces_1.3/config.ocio     # or ACES 2.0 studio-config

If ocio is missing from the filter list, jump to Gotchas → bake a .cube with ociobake and apply via the lut3d filter (see ffmpeg-lut-grade).

Step 2 — Pick the transform (pinput → poutput)

Names are config-dependent — run ociocheck --iconfig $OCIO or pyociotools to list exact strings.

Step 3 — Run

# ACES2065-1 → Rec.709 (SDR)
ffmpeg -i in.exr -vf "format=gbrpf32le,ocio=pinput=ACES2065-1:poutput=Output - Rec.709,format=yuv420p" \
  -c:v libx264 -crf 16 out.mp4

# ACEScc (log grading) → DCI-P3 D65 (DCDM proxy)
ffmpeg -i graded.mov -vf "format=gbrpf32le,ocio=pinput=ACEScc:poutput=Output - DCI-P3 D65" \
  -c:v prores_ks -profile:v 3 out_dcip3.mov

# Apply a CDL / Look (LMT) from config
ffmpeg -i in.mov -vf "ocio=pinput=ACEScc:poutput=Output - Rec.709:look=LMT_Analog_Exposure" out.mov

# Attach ICC profile (bt709 primaries + sRGB TRC) on output
ffmpeg -i in.mov -vf "iccgen=primaries=bt709:trc=iec61966-2-1" -c copy out_icc.mkv

# Detect ICC in source
ffmpeg -i src.mkv -vf "iccdetect=force=1" -f null -

Use scripts/colorpro.py for a guarded wrapper:

uv run ${CLAUDE_SKILL_DIR}/scripts/colorpro.py check
uv run ${CLAUDE_SKILL_DIR}/scripts/colorpro.py aces-to-rec709 --input in.exr --output out.mp4
uv run ${CLAUDE_SKILL_DIR}/scripts/colorpro.py transform --input in.mov --output out.mov \
  --pinput "ACEScc" --poutput "Output - Rec.709"
uv run ${CLAUDE_SKILL_DIR}/scripts/colorpro.py bake-lut --config $OCIO \
  --pinput "ACES2065-1" --poutput "Output - Rec.709" --output aces_to_709.cube
uv run ${CLAUDE_SKILL_DIR}/scripts/colorpro.py attach-icc --input in.mov --output out.mkv \
  --primaries bt709 --trc iec61966-2-1

Step 4 — Verify

```bash

ffplay -vf "split=2[a][b];[a]vectorscope=m=color3[v];[b]waveform=m=1[w];[v][w]vstack" out.mp4

```

Gotchas

Examples

Example 1: ARRI LogC EXR plates → Rec.709 proxy (VFX review)

ffmpeg -start_number 1001 -i plate_%04d.exr \
  -vf "format=gbrpf32le,ocio=pinput=Input - ARRI - V3 LogC (EI800):poutput=Output - Rec.709,format=yuv420p" \
  -c:v libx264 -crf 18 -pix_fmt yuv420p -colorspace bt709 -color_primaries bt709 -color_trc bt709 \
  review_proxy.mp4

Example 2: Graded ACEScc master → HDR10 deliverable

ffmpeg -i master_ACEScc.mov \
  -vf "format=gbrpf32le,ocio=pinput=ACEScc:poutput=Output - Rec.2020 ST2084,format=yuv420p10le" \
  -c:v libx265 -x265-params "hdr-opt=1:repeat-headers=1:colorprim=bt2020:transfer=smpte2084:colormatrix=bt2020nc:master-display=G(8500,39850)B(6550,2300)R(35400,14600)WP(15635,16450)L(10000000,50):max-cll=1000,400" \
  -pix_fmt yuv420p10le hdr10.mp4

Example 3: Film look via OCIO LMT

ffmpeg -i in.mov -vf "ocio=pinput=ACEScct:poutput=Output - Rec.709:look=Kodak_2383_D65" out_kodak2383.mov

Example 4: Fallback — bake .cube, apply with lut3d (no libocio build)

ociobake --iconfig $OCIO --inputspace "ACES2065-1" --outputspace "Output - Rec.709" \
  --format cinespace --lutsize 33 > aces_to_709.cube
ffmpeg -i in.exr -vf "format=gbrpf32le,lut3d=aces_to_709.cube,format=yuv420p" out.mp4

Troubleshooting

Error: `No such filter: 'ocio'`

Cause: ffmpeg built without libOpenColorIO.

Solution: Rebuild with --enable-libocio, or bake the transform with ociobake and apply via lut3d.

Error: `Could not find colorspace 'Output - Rec.709'`

Cause: The active $OCIO config uses a different name (e.g. ACES 2.0 calls it Rec.709 - Display).

Solution: ociocheck --iconfig $OCIO and list colorspaces; use the exact string.

Output looks washed out / over-saturated

Cause: Double display transform (e.g. applying ACES OutputTransform then also re-tagging as sRGB), or missing format=gbrpf32le stage causing int8 clipping before the transform.

Solution: Ensure a single display transform; always bracket with float format; verify container tags are untouched.

ICC profile not honored in browser

Cause: MP4 container strips/ignores embedded ICC in most players.

Solution: Deliver as MKV/MOV for ICC; for web, rely on colr primaries/trc tags and assume sRGB/Rec.709 rendering intent.

Reference docs

Related skills

Use this skill with your AI agent: Open on Skill Issue to copy, download, or add to your library. Works with Claude, ChatGPT, Gemini, Cursor, Windsurf and more.