colorkey
RGB colorspace color keying.
The filter accepts the following options:
- 'color'
-
The color which will be replaced with transparency.
- 'similarity'
-
Similarity percentage with the key color.
matches only the exact key color, while 1.0 matches everything.
- 'blend'
-
Blend percentage.
makes pixels either fully transparent, or not transparent at all.
Higher values result in semi-transparent pixels, with a higher transparency the more similar the pixels color is to the key color.
Command line examples
- Make every green pixel in the input image transparent:
ffmpeg -i input.png -vf colorkey=green out.png
- Overlay a greenscreen-video on top of a static background image.
ffmpeg -i background.png -i video.mp4 -filter_complex "[1:v]colorkey=0x3BBD1E:0.3:0.2[ckout];[0:v][ckout]overlay[out]" -map "[out]" output.flv