Add filters (background blur, etc) to your webcam on Linux
Project description
Add filters (background blur, etc) to your webcam on Linux.
Why?
Video conferencing applications tend to either lack video effects altogether or support only a limited set of capabilities on Linux (e.g. Zoom, Google Meets).
Goal here is to provide a virtual webcam via v4l2loopback with a common set of filters that can be used everywhere.
Installation
You can either use pipx or pip. Pipx is recommend to keep dependencies isolated.
Latest stable:
$ pipx install webcam-filters || pip install --user webcam-filters
Latest pre-release:
$ pipx install --pip-args "--pre" webcam-filters || pip install --user --pre webcam-filters
Git:
$ url="git+https://github.com/jashandeep-sohi/webcam-filters.git" pipx install "$url" || pip install --user "$url"
v4l2loopback
v4l2loopback kernel module is required to emulate a virtual webcam. See your distro’s docs or v4l2loopback on how to install and set it up.
You’ll probably want to create at least one loopback device (that’s persistent on boot):
$ sudo tee /etc/modprobe.d/v4l2loopback.conf << "EOF" # /dev/video3 options v4l2loopback video_nr=3 options v4l2loopback card_label="Virtual Webcam" options v4l2loopback exclusive_caps=1 EOF $ sudo modprobe v4l2loopback $ v4l2-ctl --device /dev/video3 --info
Usage
Passthrough (no-op):
$ webcam-filters --input-dev /dev/video0 --output-dev /dev/video3
Blur background:
$ webcam-filters --input-dev /dev/video0 --output-dev /dev/video3 --background-blur 50
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Hashes for webcam_filters-0.1.0a0-py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 2f06c4b1875b05cd71ce82e0b36db28ecb4d051bcdd719502cad34e7653dd811 |
|
MD5 | 6b616d0ead882ab4d4f49ba4e612b8af |
|
BLAKE2b-256 | 39f41e75afdc1d74ecab36e51a43b091de9eea214e7c08e41bb895844a503b5e |