Code Monkey home page Code Monkey logo

transparent-virtual-background's Introduction

Playground for exploring background removal in WebRTC

Background removal in the browser on a video camera image captured with getUserMedia and on that same video sent oover a RTCPeerConnection. MediaPipe is used for segmentation. Then that mask is used with the HTML canvas and various methods for adding transparency.

WebRTC's RTCPeerConnection does not support the alpha channel, so these examples also remove the green background and apply the transparency for display.

See the How to make your virtual background transparent in WebRTC post on webrtcHacks.com for full details and experimental results.

playground.html

Try it: playground.html

Step by step with many options so you can see the process. Uses the modules folder.

transparency.html

Try it: transparency.html

All-in one file that uses WebRTC Insertable Streams (media capture transform / break out box). Meant to mimic a WebRTC app where you would send your video with a green screen to another user and view someone else's incoming video with a transparent background.

Demo video

webrtcHacks Transparent Background Playground demo

transparent-virtual-background's People

Contributors

chadwallacehart avatar fippo avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.