colorchannelmixer
Adjust video input frames by re-mixing color channels.
This filter modifies a color channel by adding the values associated to the other channels of the same pixels. For example if the value to modify is red, the output value will be:
red=red*rr + blue*rb + green*rg + alpha*ra
The filter accepts the following options:
- 'rr'
- 'rg'
- 'rb'
- 'ra'
- 'rg'
-
Adjust contribution of input red, green, blue and alpha channels for output red channel. Default is
1
for rr, and0
for rg, rb and ra. - 'gr'
- 'gg'
- 'gb'
- 'ga'
- 'gg'
-
Adjust contribution of input red, green, blue and alpha channels for output green channel. Default is
1
for gg, and0
for gr, gb and ga. - 'br'
- 'bg'
- 'bb'
- 'ba'
- 'bg'
-
Adjust contribution of input red, green, blue and alpha channels for output blue channel. Default is
1
for bb, and0
for br, bg and ba. - 'ar'
- 'ag'
- 'ab'
- 'aa'
- 'ag'
-
Adjust contribution of input red, green, blue and alpha channels for output alpha channel. Default is
1
for aa, and0
for ar, ag and ab.Allowed ranges for options are
[-2.0, 2.0]
.
Command line examples
- Convert source to grayscale:
colorchannelmixer=.3:.4:.3:0:.3:.4:.3:0:.3:.4:.3
- Simulate sepia tones:
colorchannelmixer=.393:.769:.189:0:.349:.686:.168:0:.272:.534:.131