OneWorld
OneWorld

Reputation: 163

ffmpeg blend=screen makes background look green or foreground green

When I apply a screen blend to the foreground asset (Pikachu) over the background asset (White circle on black background) GIMP and Adobe Photoshop make the circle asset look white, and the background asset look RGB like this:-

enter image description here

which is how it should look.

However, if we take the input assets:- enter image description here and enter image description here

and use this ffmpeg command

ffmpeg -i circle_rgb_50.png -i pikachu_rgb.png -filter_complex "[0:v][1:v]blend=screen" pikachu_screened_over_circle_rgb_just_blend.png

we get this:- enter image description here

and if I reverse the blend so that the inputs to the blend function are the other way around, like this:-

ffmpeg -i circle_rgb_50.png -i pikachu_rgb.png -filter_complex "[1:v][0:v]blend=screen" pikachu_screened_over_circle_rgb_just_blend_other_way_around.png

we get this:- enter image description here

Why doesn't FFMPEG do blending the same way as GIMP or Adobe Photoshop ?

Or is there another parameter I need to pass so that blends look as they should ?

Upvotes: 0

Views: 178

Answers (1)

seeker
seeker

Reputation: 864

screen is the value of all_mode option of the blend filter. Correct your filter_complex:

-filter_complex "[0:v][1:v]blend=all_mode=screen"

Upvotes: 1

Related Questions