Introduction
This is a tutorial on how to key-out a greenscreen video in Adobe After Effects using a technique called chroma keying. Chroma keying is where you remove a specific colour from the background of a video – this is usually green but can also be blue or pink or any colour really.
Chroma Keying in After Effects
First, get some greenscreen footage – this can be downloading a stock video like I did, or using footage you filmed yourself. I downloaded this video of a gorilla walking because it has a very simple outline that will be easy to remove the green from.
Next, download a video or image that will replace the greenscreen and be the background of the video. I chose this rainforest background from pixabay.com, a stock images and video website. I chose a background that roughly matched the perspective in my greenscreen footage – there is a visible ground level that the gorilla can walk on.

Now open after effects and import your files into the project window on the left of the screen. Drag them down to the box next to the timeline and order them so that the greenscreen layer is on top, and the background layer is on the bottom.
Your after effects project should look something like this:

At this point, you might want to save the project.
Click on the greenscreen layer in the timeline and hover the mouse over the ‘Effect’ menu at the top of the screen. Once the menu drops down, go down to ‘Keying’ and select the ‘Keylight(1.2)’ effect. Keylight is the name of the effect that we can use to chroma key.

Once the effect opens in the window to the left of the screen, find the eyedropper tool next to ‘screen colour’ and click once on the eyedropper tool and then again on the greenscreen. If the greenscreen is all one colour, like in my case, that colour will be completely removed from the screen and it should look like this:

Now, there may be noticeable edges to your keyed result that ruin the effect you are trying to create. In my case, the edges around the gorilla were white, and so I used the ‘edge colour correction’ option to make the edges black – since the gorilla is black, the edges are not noticeable when they are the same colour as the gorilla.

You can use the options in the ‘Screen Matte’ section to change how much white and black are in the alpha channels of the image. This can be used to remove the edges from the greenscreen effect and also, in the top right of the Keylight effect’s window you can see the screen matte in black and white as well as in other views.

The various options in the Keylight window are useful for removing the edges and imbalances in the greenscreen but if you choose an object that has a simple outline when you choose your greenscreen footage then removing the edges will be easier. Just fiddle around with the controls idk
After moving the greenscreen layer to scale and adding some basic colour grading with the lumetricolour effect and added some royalty free background audio from pixabay – here is the final video of the gorilla walking through the rainforest: