Open After Effects
Create a New Project
Go to Composition > New Composition
Name: GreenScreenComp
Size: 1920x1080
Frame Rate: 30
Duration: As needed
Drag your video clip with green background into the Project Panel
Drag it to your timeline
Select your video layer in the timeline
Go to Effects & Presets (right panel)
Search for: Keylight (1.2)
Drag & drop Keylight onto your video layer
In the Effect Controls Panel, you'll see Keylight options
Click the eyedropper tool next to “Screen Colour”
Click anywhere on the green background in your video
The green should disappear and the background turns black (transparent)
Scroll down to Screen Matte → Click to expand
Adjust:
Clip Black: 10-15%
Clip White: 85-90%
Use Screen Shrink/Grow and Softness to clean edges
Import a background image or video
Drag it below your keyed video layer in the timeline
Go to File > Export > Add to Render Queue
In Render Queue:
Format: QuickTime / H.264 (via Media Encoder)
Choose location and export