[FFmpeg-user] How can chromakey ignore shadows ?

Paul B Mahol onemda at gmail.com
Sun Sep 12 21:55:30 EEST 2021

On Sun, Sep 12, 2021 at 8:34 PM smoothgroove <smoothgroove at gmx.net> wrote:

> Using chromakey=0x00ff00:0.24:0.14
> Is there any way to completely knock out the chromakey background, i.e.
> ignorning the lighting level, shadows and structure of the chroma
> background?
> In the examples:
> - The arm is casting a shadow on the greenscreen which is reflected in the
> result.
> - the face being near to the light automatically causes the chroma
> background to darken, which causes the replaced image to unnaturally
> darken.
> - a fold in the greenscreen fabric shows up in the replaced background
> What is required is chromakey being insenstitive to the chroma brightness,
> that is to totally punch out the background. How could this be
> accomplished?

chromakey operates in YUV colorspace and use only U and V component to set
And as such it will only set to transparent color some radius around UV
point as can be seen with this command:

ffplay -f lavfi -i

Notice how very dark green and very bright green are not set to transparent

More information about the ffmpeg-user mailing list