GreenScreenStream offers robust options for real-time manipulation of MediaStreams, enabling you to generate dynamic video backgrounds with ease. It's designed to help you create captivating virtual backgrounds for WebRTC applications, live streams, and other interactive experiences.
This library allows you to effortlessly generate a new MediaStream for your canvas and video elements, dynamically compositing a MediaStreamTrack (e.g., from a webcam) with any background image or video, all powered by pure JavaScript.
All rendering is performed in real-time, leveraging the high performance of WebGL2 pixel shaders (GLSL), with optional machine learning (ML) models for advanced features like intelligent person segmentation, ensuring stunning visual quality and seamless integration.
To add GreenScreenStream to your project, use npm:
Bash
npm i @virtualscenery/greenscreenstream