Been trying this for some time now with little to no results.

I have an MP4 of characters recorded against a Green Screen and have managed, through FFMpeg to strip out the green screen with an Alpha Key chroma filter in to a WebM.

However, the background is always black and is either not output as transparent or does not render transparent.

Here is the command I'm currently using, which "in theory" should be working, but just outputs a black background:

ffmpeg -f lavfi -i color=c=black:s=1280x720 -i input.mp4 -vcodec libvpx-vp9 -acodec libvorbis -pix_fmt yuva420p -filter_complex "[1:v]chromakey=0x339E3E:0.1:0.1[ckout];[0:v][ckout]overlay[o]" -map [o] -map 1:a -auto-alt-ref 0 output.webm

I have even tried using a transparent background texture of the same video dimensions as well

ffmpeg -i bg.png -i 3.mp4 -vcodec libvpx-vp9 -acodec libvorbis -pix_fmt yuva420p -filter_complex "[1:v]chromakey=0x339E3E:0.1:0.1[ckout];[0:v][ckout]overlay[o]" -map [o] -map 1:a -auto-alt-ref 0 output.webm

No Joy

Getting a bit frustrated as most information out there seems out of date or does not even work any more, please help!.

  • 1
    After chromakey, you're overlaying the result on a black canvas. Why?
    – Gyan
    Jan 7 at 4:37
  • Do you have an alternate suggestion @Gyan ? WHen I've tried doing ChromaKey alone, this also results in a black background and not transparent. From the searches I've done so far, mapping to a Transparent texture seems to be the way to go, or am I wrong in that assumption? What FFMPEG commands would you suggest?
    – Darkside
    Jan 9 at 16:39


Your Answer

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

Browse other questions tagged or ask your own question.