<p>Been trying this for some time now with little to no results.</p>
<p>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.</p>
<p>However, the background is always black and is either not output as transparent or does not render transparent.</p>
<p>Here is the command I'm currently using, which &quot;in theory&quot; should be working, but just outputs a black background:</p>
<pre><code>ffmpeg -f lavfi -i color=c=black:s=1280x720 -i input.mp4 -vcodec libvpx-vp9 -acodec libvorbis -pix_fmt yuva420p -filter_complex &quot;[1:v]chromakey=0x339E3E:0.1:0.1[ckout];[0:v][ckout]overlay[o]&quot; -map [o] -map 1:a -auto-alt-ref 0 output.webm
</code></pre>
<p>I have even tried using a transparent background texture of the same video dimensions as well</p>
<pre><code>ffmpeg -i bg.png -i 3.mp4 -vcodec libvpx-vp9 -acodec libvorbis -pix_fmt yuva420p -filter_complex &quot;[1:v]chromakey=0x339E3E:0.1:0.1[ckout];[0:v][ckout]overlay[o]&quot; -map [o] -map 1:a -auto-alt-ref 0 output.webm
</code></pre>
<p>No Joy</p>
<p>Getting a bit frustrated as most information out there seems out of date or does not even work any more, please help!.</p>

CC BY-SA 4.0
2023-01-07T04:37:18.797Z
After chromakey, you're overlaying the result on a black canvas. Why?
Gyan
CC BY-SA 4.0
2023-01-09T16:39:12.343Z
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
CC BY-SA 4.0
2023-01-10T07:09:08.173Z
See https://stackoverflow.com/a/34682312/ and https://stackoverflow.com/q/43014921/
Gyan
<ffmpeg><greenscreen>
How to create a webM with a Transparent background from a MP4 Green Screen
Darkside
# How to create a webM with a Transparent background from a MP4 Green Screen

(Asked by: username_0 on 2023-01-06)

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!.

**Tags:** ffmpeg, greenscreen

> **Comments:**
> **username_1**: After chromakey, you're overlaying the result on a black canvas. Why?  
> **username_0**: Do you have an alternate suggestion @username_1 ?  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?  
> **username_1**: See https://stackoverflow.com/a/34682312/ and https://stackoverflow.com/q/43014921/  

---

## 0 answers

