Colorchannelmixer
Video Single output Transform
Adjust colors by mixing color channels.
FFmpeg filter:
colorchannelmixer— the official reference.
Add it to a graph. The explicit form works for every filter — bind it to its input and read the result from outputs():
$node = $video->addFilter(new Colorchannelmixer(…));$result = $node->outputs()[0];Shorthand. Single-output filters can skip the node — apply() returns the result stream directly:
$result = $video->apply(new Colorchannelmixer(…));When to use it
Section titled “When to use it”TODO — when this filter shines: what it’s the right tool for, what to reach for instead when it isn’t, and how it composes with neighbouring filters.
How to use it
Section titled “How to use it”TODO — prose: how the filter actually works and what its key parameters mean (the explanation FFmpeg’s terse option help omits).
Examples
Section titled “Examples”TODO — runnable PHP, with the equivalent ffmpeg CLI alongside.
Gotchas
Section titled “Gotchas”TODO
See also
Section titled “See also”TODO
Parameters
Section titled “Parameters”| Parameter | Type | Default | Range / values | Description |
|---|---|---|---|---|
rr | float | 1 | -2–2 | set the red gain for the red channel |
rg | float | 0 | -2–2 | set the green gain for the red channel |
rb | float | 0 | -2–2 | set the blue gain for the red channel |
ra | float | 0 | -2–2 | set the alpha gain for the red channel |
gr | float | 0 | -2–2 | set the red gain for the green channel |
gg | float | 1 | -2–2 | set the green gain for the green channel |
gb | float | 0 | -2–2 | set the blue gain for the green channel |
ga | float | 0 | -2–2 | set the alpha gain for the green channel |
br | float | 0 | -2–2 | set the red gain for the blue channel |
bg | float | 0 | -2–2 | set the green gain for the blue channel |
bb | float | 1 | -2–2 | set the blue gain for the blue channel |
ba | float | 0 | -2–2 | set the alpha gain for the blue channel |
ar | float | 0 | -2–2 | set the red gain for the alpha channel |
ag | float | 0 | -2–2 | set the green gain for the alpha channel |
ab | float | 0 | -2–2 | set the blue gain for the alpha channel |
aa | float | 1 | -2–2 | set the alpha gain for the alpha channel |
pc | ColorchannelmixerPreserve | none | none, lum, max, avg, sum, nrm, pwr | set the preserve color mode |
pa | float | 0 | 0–1 | set the preserve color amount |
Maps to FFmpeg’s colorchannelmixer filter. Verified against ffmpeg n7.1.1.
An Artisan Build project.
Built on FFmpeg — an independent binding, not affiliated with or endorsed by the FFmpeg project. Support FFmpeg.