Virtual Webcam
A program to replace the background in your webcam image

Installation HowTo

Before using the program, you need to install the v4l2loopback driver. In many Linux Distributions you can install it with a few clicks using the package manager. For example Debian and Ubuntu use the packages v4l2loopback-dkms and v4l2loopback-utils

Then add your user account to the group video, so it can access the video devices. In many desktop Linux distributions this is already configured for normal user accounts. Run groups in a terminal to see the groups of your account.

Create a virtual environment for python3.7 and install the required packages and download the model:

virtualenv -p python3.7 ~/venvs/virtual_webcam
source ~/venvs/virtual_webcam/bin/activate
pip install -r requirements.txt
./get-model.sh

You can create a run.sh script that uses the virtual environment by default:

#!/bin/bash
cd $(dirname $0)
source ~/venvs/virtual_webcam/bin/activate
python ./virtual_webcam.py

Now you can start configuring your virtual webcam. Copy config.yaml.example to config.yaml and edit it to configure your virtual webcam.

Read more about the configuration options.
Back to the homepage