pseudocolor
Alter frame colors in video with pseudocolors.
This filter accept the following options:
- 'c0'
-
set pixel first component expression
- 'c1'
-
set pixel second component expression
- 'c2'
-
set pixel third component expression
- 'c3'
-
set pixel fourth component expression, corresponds to the alpha component
- 'i'
-
set component to use as base for altering colors
Each of them specifies the expression to use for computing the lookup table for the corresponding pixel component values.
The expressions can contain the following constants and functions:
- 'w'
- 'h'
-
The input width and height.
- 'val'
-
The input value for the pixel component.
- 'ymin, umin, vmin, amin'
-
The minimum allowed component value.
- 'ymax, umax, vmax, amax'
-
The maximum allowed component value.
All expressions default to "val".
Command line examples
- Change too high luma values to gradient:
pseudocolor="'if(between(val,ymax,amax),lerp(ymin,ymax,(val-ymax)/(amax-ymax)),-1):if(between(val,ymax,amax),lerp(umax,umin,(val-ymax)/(amax-ymax)),-1):if(between(val,ymax,amax),lerp(vmin,vmax,(val-ymax)/(amax-ymax)),-1):-1'"