Skip to content

The truly free, open-source, local-first, cross-platform CapCut replacement. Scriptable through a JSON-RPC API & MCP.

1.5 KB
Raw Blame
format = 2

[effect]
id = "concat.chroma-key"
name = "Chroma Key"
kind = "effect"
category = "Cutout"
order = 58
intensity = "similarity"
description = "Keys out the screen colour you pick, leaving the picture over whatever is beneath, its spill cleaned off."

# 0x00B140FF: broadcast green, the screen a studio paints.
[[param]]
key = "color"
label = "Key colour"
type = "color"
min = 0
max = 4294967295
default = 11616511

[[param]]
key = "similarity"
label = "Similarity"
min = 1
max = 60
default = 30
step = 1
unit = "%"

[[param]]
key = "softness"
label = "Softness"
min = 0
max = 50
default = 10
step = 1
unit = "%"

[[param]]
key = "spill"
label = "Spill"
min = 0
max = 100
default = 50
step = 1
unit = "%"

[wgsl]
entry = "effect.wgsl"
space = "display"

# The still before a broadcast green screen, for the key to take out.
[card]
screen = "#00b140"

# The two screen keys this stands in for, keyed to the colours they took out.
# FFmpeg's chromakey measured the distance between two colours at half the
# scale this key does, so its similarity and softness come across doubled;
# neither cleaned spill, so the key's starts at none.
[[replaces]]
id = "concat.green-screen"
defaults = { similarity = 25, softness = 10 }
knobs = { color = "16711935", similarity = "similarity * 2", softness = "softness * 2", spill = "0" }

[[replaces]]
id = "concat.blue-screen"
defaults = { similarity = 25, softness = 10 }
knobs = { color = "65535", similarity = "similarity * 2", softness = "softness * 2", spill = "0" }