The truly free, open-source, local-first, cross-platform CapCut replacement. Scriptable through a JSON-RPC API & MCP.
Rust ffmpegfree-video-editormodel-context-protocolnon-linear-editoroffline-firstopen-source-video-editorself-hostedvideo-editingvideo-editing-automationvideo-editing-softwarevideo-editing-toolsvideo-editorvoice-cloningyoutube-automationyoutube-shorts
Whites and blacks on the Adjust tab
Jareer3dd4304df232
diff --git a/engine/crates/concat-effects/packages/concat.adjust/effect.toml b/engine/crates/concat-effects/packages/concat.adjust/effect.tomlindex 53cd6028..e2691ded 100644--- a/engine/crates/concat-effects/packages/concat.adjust/effect.toml+++ b/engine/crates/concat-effects/packages/concat.adjust/effect.toml@@ -10,9 +10,10 @@ description = "The manual colour panel every picture clip carries: exposure, ton# Three groups, in the order the panel lists them. Colour: temperature in# kelvin with 6500 the picture as shot, tint green to magenta, saturation# as a signed percent. Lightness: exposure in stops, then brightness,-# contrast, highlights and shadows as signed percents, the last two lifting-# or crushing their end of the curve. Effects: sharpen, fade and vignette-# add from zero.+# contrast, highlights, shadows, whites and blacks as signed percents; the+# last four lift or crush their end of the curve, highlights and shadows+# the broad upper and lower halves, whites and blacks the narrow extremes.+# Effects: sharpen, fade and vignette add from zero.[[param]]key = "temperature"@@ -94,6 +95,26 @@ default = 0step = 1unit = "%"+[[param]]+key = "whites"+group = "Lightness"+label = "Whites"+min = -100+max = 100+default = 0+step = 1+unit = "%"++[[param]]+key = "blacks"+group = "Lightness"+label = "Blacks"+min = -100+max = 100+default = 0+step = 1+unit = "%"+[[param]]key = "sharpen"group = "Effects"@@ -129,8 +150,10 @@ let = ["lift = fade / 100 * 0.25","low = clamp(0.25 + shadows / 100 * 0.18, 0.05, 0.45)","high = clamp(0.75 + highlights / 100 * 0.18, 0.55, 0.95)",+ "black = clamp(0.1 + blacks / 100 * 0.1, 0, 0.2)",+ "white = clamp(0.9 + whites / 100 * 0.1, 0.8, 1)",]-chain = "exposure=exposure={fixed(exposure, 2)},eq=brightness={fixed(brightness / 100 * 0.5, 3)}:contrast={fixed(1 + contrast / 100, 3)}:saturation={fixed(1 + saturation / 100 * 2, 3)},colortemperature=temperature={round(temperature)},colorbalance=gm={fixed(0 - tint / 100 * 0.5, 3)},curves=all='0/{fixed(lift, 3)} 0.25/{fixed(low, 3)} 0.75/{fixed(high, 3)} 1/1',unsharp=5:5:{fixed(sharpen / 100 * 2, 2)},vignette=a={fixed(vignette / 100 * 1.2, 3)}"+chain = "exposure=exposure={fixed(exposure, 2)},eq=brightness={fixed(brightness / 100 * 0.5, 3)}:contrast={fixed(1 + contrast / 100, 3)}:saturation={fixed(1 + saturation / 100 * 2, 3)},colortemperature=temperature={round(temperature)},colorbalance=gm={fixed(0 - tint / 100 * 0.5, 3)},curves=all='0/{fixed(lift, 3)} 0.1/{fixed(black, 3)} 0.25/{fixed(low, 3)} 0.75/{fixed(high, 3)} 0.9/{fixed(white, 3)} 1/1',unsharp=5:5:{fixed(sharpen / 100 * 2, 2)},vignette=a={fixed(vignette / 100 * 1.2, 3)}"[wgsl]entry = "effect.wgsl"diff --git a/engine/crates/concat-effects/packages/concat.adjust/effect.wgsl b/engine/crates/concat-effects/packages/concat.adjust/effect.wgslindex 1da3b98c..6e1b9d8a 100644--- a/engine/crates/concat-effects/packages/concat.adjust/effect.wgsl+++ b/engine/crates/concat-effects/packages/concat.adjust/effect.wgsl@@ -7,6 +7,8 @@ struct Params {tint: f32,shadows: f32,highlights: f32,+ whites: f32,+ blacks: f32,sharpen: f32,vignette: f32,fade: f32,@@ -51,11 +53,14 @@ fn effect(uv: vec2<f32>) -> vec4<f32> {c = (c - vec3<f32>(0.5)) * (1.0 + params.contrast / 100.0) + vec3<f32>(0.5);c = mix(vec3<f32>(luma(c)), c, 1.0 + params.saturation / 100.0 * 2.0);- // Shadows and highlights lift or crush their end; fade lifts the black.+ // Shadows and highlights lift or crush their half of the range, blacks+ // and whites the extreme quarter of each; fade lifts the black.let l = luma(clamp(c, vec3<f32>(0.0), vec3<f32>(1.0)));let low = (1.0 - smoothstep(0.0, 0.5, l)) * params.shadows / 100.0 * 0.18;let high = smoothstep(0.5, 1.0, l) * params.highlights / 100.0 * 0.18;- c = c + vec3<f32>(low + high);+ let black = (1.0 - smoothstep(0.0, 0.25, l)) * params.blacks / 100.0 * 0.1;+ let white = smoothstep(0.75, 1.0, l) * params.whites / 100.0 * 0.1;+ c = c + vec3<f32>(low + high + black + white);let lift = params.fade / 100.0 * 0.25;c = c * (1.0 - lift) + vec3<f32>(lift);diff --git a/engine/crates/concat-effects/packages/concat.adjust/fixtures.toml b/engine/crates/concat-effects/packages/concat.adjust/fixtures.tomlindex 32b55592..dbcdd410 100644--- a/engine/crates/concat-effects/packages/concat.adjust/fixtures.toml+++ b/engine/crates/concat-effects/packages/concat.adjust/fixtures.toml@@ -1,13 +1,13 @@[[case]]name = "default is the picture as shot"-chain = "exposure=exposure=0.00,eq=brightness=0.000:contrast=1.000:saturation=1.000,colortemperature=temperature=6500,colorbalance=gm=0.000,curves=all='0/0.000 0.25/0.250 0.75/0.750 1/1',unsharp=5:5:0.00,vignette=a=0.000"+chain = "exposure=exposure=0.00,eq=brightness=0.000:contrast=1.000:saturation=1.000,colortemperature=temperature=6500,colorbalance=gm=0.000,curves=all='0/0.000 0.1/0.100 0.25/0.250 0.75/0.750 0.9/0.900 1/1',unsharp=5:5:0.00,vignette=a=0.000"[[case]]name = "everything down"at = "min"-chain = "exposure=exposure=-3.00,eq=brightness=-0.500:contrast=0.000:saturation=-1.000,colortemperature=temperature=2000,colorbalance=gm=0.500,curves=all='0/0.000 0.25/0.070 0.75/0.570 1/1',unsharp=5:5:0.00,vignette=a=0.000"+chain = "exposure=exposure=-3.00,eq=brightness=-0.500:contrast=0.000:saturation=-1.000,colortemperature=temperature=2000,colorbalance=gm=0.500,curves=all='0/0.000 0.1/0.000 0.25/0.070 0.75/0.570 0.9/0.800 1/1',unsharp=5:5:0.00,vignette=a=0.000"[[case]]name = "everything up"at = "max"-chain = "exposure=exposure=3.00,eq=brightness=0.500:contrast=2.000:saturation=3.000,colortemperature=temperature=11000,colorbalance=gm=-0.500,curves=all='0/0.250 0.25/0.430 0.75/0.930 1/1',unsharp=5:5:2.00,vignette=a=1.200"+chain = "exposure=exposure=3.00,eq=brightness=0.500:contrast=2.000:saturation=3.000,colortemperature=temperature=11000,colorbalance=gm=-0.500,curves=all='0/0.250 0.1/0.200 0.25/0.430 0.75/0.930 0.9/1.000 1/1',unsharp=5:5:2.00,vignette=a=1.200"diff --git a/engine/crates/concat/locales/de.json b/engine/crates/concat/locales/de.jsonindex e8521371..7565c7e5 100644--- a/engine/crates/concat/locales/de.json+++ b/engine/crates/concat/locales/de.json@@ -51,6 +51,7 @@"Big square pixels.": "Große quadratische Pixel.","Bits": "Bits","Black & White": "Schwarz-Weiß",+ "Blacks": "Schwarztöne","Blend": "Überblenden","Blue Screen": "Bluescreen","Blue screen": "Bluescreen",@@ -511,6 +512,7 @@"Volume": "Lautstärke","Warm": "Warm","Where should the project folder go?": "Wohin soll der Projektordner?",+ "Whites": "Weißtöne","Width": "Breite","yesterday": "gestern","Zoom In": "Hineinzoomen",diff --git a/engine/crates/concat/locales/en.json b/engine/crates/concat/locales/en.jsonindex 3dfabece..fb5bbd0d 100644--- a/engine/crates/concat/locales/en.json+++ b/engine/crates/concat/locales/en.json@@ -51,6 +51,7 @@"Big square pixels.": "Big square pixels.","Bits": "Bits","Black & White": "Black & White",+ "Blacks": "Blacks","Blend": "Blend","Blue Screen": "Blue Screen","Blue screen": "Blue screen",@@ -511,6 +512,7 @@"Volume": "Volume","Warm": "Warm","Where should the project folder go?": "Where should the project folder go?",+ "Whites": "Whites","Width": "Width","yesterday": "yesterday","Zoom In": "Zoom In",diff --git a/engine/crates/concat/locales/es.json b/engine/crates/concat/locales/es.jsonindex e450ebdc..1d69581a 100644--- a/engine/crates/concat/locales/es.json+++ b/engine/crates/concat/locales/es.json@@ -51,6 +51,7 @@"Big square pixels.": "Píxeles grandes y cuadrados.","Bits": "Bits","Black & White": "Blanco y negro",+ "Blacks": "Negros","Blend": "Fusión","Blue Screen": "Pantalla azul","Blue screen": "Pantalla azul",@@ -511,6 +512,7 @@"Volume": "Volumen","Warm": "Cálido","Where should the project folder go?": "¿Dónde irá la carpeta del proyecto?",+ "Whites": "Blancos","Width": "Ancho","yesterday": "ayer","Zoom In": "Acercar",diff --git a/engine/crates/concat/locales/fr.json b/engine/crates/concat/locales/fr.jsonindex 4961203e..8636ba50 100644--- a/engine/crates/concat/locales/fr.json+++ b/engine/crates/concat/locales/fr.json@@ -51,6 +51,7 @@"Big square pixels.": "De gros pixels carrés.","Bits": "Bits","Black & White": "Noir et blanc",+ "Blacks": "Noirs","Blend": "Fusion","Blue Screen": "Fond bleu","Blue screen": "Fond bleu",@@ -511,6 +512,7 @@"Volume": "Volume","Warm": "Chaud","Where should the project folder go?": "Où placer le dossier du projet ?",+ "Whites": "Blancs","Width": "Largeur","yesterday": "hier","Zoom In": "Zoom avant",diff --git a/engine/crates/concat/locales/it.json b/engine/crates/concat/locales/it.jsonindex fd676088..16fc7fba 100644--- a/engine/crates/concat/locales/it.json+++ b/engine/crates/concat/locales/it.json@@ -51,6 +51,7 @@"Big square pixels.": "Grandi pixel quadrati.","Bits": "Bit","Black & White": "Bianco e nero",+ "Blacks": "Neri","Blend": "Fusione","Blue Screen": "Blue screen","Blue screen": "Blue screen",@@ -511,6 +512,7 @@"Volume": "Volume","Warm": "Caldo","Where should the project folder go?": "Dove mettere la cartella del progetto?",+ "Whites": "Bianchi","Width": "Larghezza","yesterday": "ieri","Zoom In": "Zoom in avanti",diff --git a/engine/crates/concat/locales/ja.json b/engine/crates/concat/locales/ja.jsonindex af71e4ca..724dac52 100644--- a/engine/crates/concat/locales/ja.json+++ b/engine/crates/concat/locales/ja.json@@ -51,6 +51,7 @@"Big square pixels.": "大きな正方形のピクセル。","Bits": "ビット","Black & White": "白黒",+ "Blacks": "黒レベル","Blend": "ブレンド","Blue Screen": "ブルースクリーン","Blue screen": "ブルースクリーン",@@ -511,6 +512,7 @@"Volume": "音量","Warm": "ウォーム","Where should the project folder go?": "プロジェクトフォルダをどこに作成しますか?",+ "Whites": "白レベル","Width": "幅","yesterday": "昨日","Zoom In": "ズームイン",diff --git a/engine/crates/concat/locales/ko.json b/engine/crates/concat/locales/ko.jsonindex c555f678..ab967ea8 100644--- a/engine/crates/concat/locales/ko.json+++ b/engine/crates/concat/locales/ko.json@@ -51,6 +51,7 @@"Big square pixels.": "큰 정사각형 픽셀.","Bits": "비트","Black & White": "흑백",+ "Blacks": "검정 계열","Blend": "블렌드","Blue Screen": "블루 스크린","Blue screen": "블루 스크린",@@ -511,6 +512,7 @@"Volume": "볼륨","Warm": "따뜻하게","Where should the project folder go?": "프로젝트 폴더를 어디에 만들까요?",+ "Whites": "흰색 계열","Width": "너비","yesterday": "어제","Zoom In": "줌 인",diff --git a/engine/crates/concat/locales/pt-BR.json b/engine/crates/concat/locales/pt-BR.jsonindex dc8c5771..047a0668 100644--- a/engine/crates/concat/locales/pt-BR.json+++ b/engine/crates/concat/locales/pt-BR.json@@ -51,6 +51,7 @@"Big square pixels.": "Pixels grandes e quadrados.","Bits": "Bits","Black & White": "Preto e branco",+ "Blacks": "Pretos","Blend": "Mesclagem","Blue Screen": "Tela azul","Blue screen": "Tela azul",@@ -511,6 +512,7 @@"Volume": "Volume","Warm": "Quente","Where should the project folder go?": "Onde a pasta do projeto deve ficar?",+ "Whites": "Brancos","Width": "Largura","yesterday": "ontem","Zoom In": "Aproximar",diff --git a/engine/crates/concat/locales/ru.json b/engine/crates/concat/locales/ru.jsonindex c03d2721..22c6a6eb 100644--- a/engine/crates/concat/locales/ru.json+++ b/engine/crates/concat/locales/ru.json@@ -51,6 +51,7 @@"Big square pixels.": "Крупные квадратные пиксели.","Bits": "Биты","Black & White": "Чёрно-белое",+ "Blacks": "Чёрные","Blend": "Наложение","Blue Screen": "Синий экран","Blue screen": "Синий экран",@@ -511,6 +512,7 @@"Volume": "Громкость","Warm": "Тёплый","Where should the project folder go?": "Где разместить папку проекта?",+ "Whites": "Белые","Width": "Ширина","yesterday": "вчера","Zoom In": "Приближение",diff --git a/engine/crates/concat/locales/tr.json b/engine/crates/concat/locales/tr.jsonindex ac062b26..a861df6a 100644--- a/engine/crates/concat/locales/tr.json+++ b/engine/crates/concat/locales/tr.json@@ -51,6 +51,7 @@"Big square pixels.": "Büyük kare pikseller.","Bits": "Bit","Black & White": "Siyah-Beyaz",+ "Blacks": "Siyahlar","Blend": "Karışım","Blue Screen": "Mavi perde","Blue screen": "Mavi perde",@@ -511,6 +512,7 @@"Volume": "Ses düzeyi","Warm": "Sıcak","Where should the project folder go?": "Proje klasörü nereye gitsin?",+ "Whites": "Beyazlar","Width": "Genişlik","yesterday": "dün","Zoom In": "Yaklaşma",diff --git a/engine/crates/concat/locales/zh-Hans.json b/engine/crates/concat/locales/zh-Hans.jsonindex a8fd4631..39768f6f 100644--- a/engine/crates/concat/locales/zh-Hans.json+++ b/engine/crates/concat/locales/zh-Hans.json@@ -51,6 +51,7 @@"Big square pixels.": "大块的方形像素。","Bits": "位数","Black & White": "黑白",+ "Blacks": "黑色色阶","Blend": "混合","Blue Screen": "蓝幕","Blue screen": "蓝幕",@@ -511,6 +512,7 @@"Volume": "音量","Warm": "暖色","Where should the project folder go?": "项目文件夹放在哪里?",+ "Whites": "白色色阶","Width": "宽度","yesterday": "昨天","Zoom In": "推近",