Trying to debug blending images over video led to this observation:

ffmpeg -i https://lh3.googleusercontent.com/vt1VzlKCpjJjxRGBd3oAVgOHau22m2257fDBaW3KfHsNbhOcw1--OY7oISUM93Zp0SjwCSdlHP5PXXbFHdaflxTJAJ_B32MSrUH4AerS_0u6gv3X -i https://lh3.googleusercontent.com/MMzUU7GklKAqtdcGN4k2UVF22Wc2l35A2NDEeB4GhgM7eU06nKSQgitHAoWttj605G1yjoOEODt-dMKNPoWUdCmtFxe-u-qH5H228E9DxpoZsZk -filter_complex "[0:v] format=rgba [bg]; [1:v] format=rgba [fg]; [bg][fg] blend=all_mode='overlay':all_opacity=1, format=rgba"  out.png

results in (with odd fringes): enter image description here

desired image is:

enter image description here

1 Answer 1


The blend filter ignores alpha from second input. You will need to recombine alpha component back into other components somehow. This one works for me:

ffmpeg -i a.png -f lavfi -i color=gray:s=512x512,format=gbrp -i b.png -lavfi "[1][2]overlay=format=gbrp[a],[0:v][a]blend=all_mode=overlay" out.png

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.