[FFmpeg-user] Blending two inputs with custom expression

Paul B Mahol onemda at gmail.com
Wed May 10 01:02:40 EEST 2017


On 5/9/17, SviMik <svimik at gmail.com> wrote:
> Let's assume A is a video, and B is a png image with alpha channel. I need
> to do the following blending (assuming the format is rgba and B_alpha is in
> 0...1 range):
>
> red = (A_red - B_red * B_alpha) / (1 - B_alpha);
> green = (A_green - B_green * B_alpha) / (1 - B_alpha);
> blue = (A_blue - B_blue * B_alpha) / (1 - B_alpha);

Those equatitions are very strange.


More information about the ffmpeg-user mailing list