Using a simple overlay the colors are correct, but when I use a blending mode then the color of the output is either green (for multiply) or pink (for addition)

ffmpeg -i test-video.mp4  -i outro-frames/Outro.%05d.png -filter_complex "[0][1]scale2ref[scaled][ref];[ref][scaled]blend=all_mode=multiply[m];[m][0]overlay=x=0:y=0" test-video-outro.mp4

Frame from input PNG sequence

Input frame

Frame after using multiply blending mode

Output frame

Thanks to the suggestion from Gyan the color issue is partly resolved by adding format=gbrp to the filterchain.

Instead of the green tint the animation now starts inversed with a solid black background then flips after a few frames to the correct colors.

The first few frames render incorrectly

First few frames almost black

Then they switch and become as I’d like them to be

Then they render correctly

  • 3
    Convert the video to a RGB pixel format using format=gbrp before feeding it to blend. At present, blend is acting upon a YUV input.
    – Gyan
    Apr 28, 2020 at 15:49
  • Thanks very much Gyan, this definitely resolves the green issue, but there is still a problem with the rendering, I’ve updated the question to show how it looks. If you have any idea why this is happening I’d appreciate it. I also get this warning message now No accelerated colorspace conversion found from yuv420p to gbrp. which I’m not sure if I should be concerned about? Thanks again.
    – Chris
    Apr 28, 2020 at 17:04


You must log in to answer this question.

Browse other questions tagged .