Simple background blur for your webcam.
This script will capture your webcams output, add a blur effect to the background and output the generated image to another (virtual) video device.
python -m venv venv
source venv/bin/activate
pip install -r requirements.txt
sudo modprobe v4l2loopback exclusive_caps=1 devices=1 video_nr=20 card_label=backgroundblur
There should now be a new video device under /dev/video20
.
./blur.py --input /dev/video0 --output /dev/video20
Tested with python 3.9.7