@virtualscenery/greenscreenstream
v3.2.0
Published
Genereate new MediaStreams or Canvas elements based on MediaStreams (webcam) with any background image/video. Greenscreen your webcam and enable virtual backgrounds in your web applications.
Readme
About
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.
Install
To add GreenScreenStream to your project, use npm:
Bash
npm i @virtualscenery/greenscreenstream