webcam-filters
Add filters (background blur, etc) to your webcam on Linux.
Video conferencing purposes are more likely to both lack video effects altogether or
toughen handiest a cramped situation of capabilities on Linux (e.g. Zoom, Google Meets).
Purpose right here is to perform a virtual webcam by the command of v4l2loopback
with a abnormal
situation of filters that will perhaps well well even be frail in each keep.
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 150
Dependencies
Diverse than the Python dependencies that will perhaps well well even be mechanically installed by Pip,
there are a few map dependencies that require manual attention.
v4l2loopback
v4l2loopback kernel module is required to emulate a virtual webcam. Glance your
distro’s medical doctors or v4l2loopback on how one can set up and situation it up
(e.g. https://archlinux.org/programs/community/any/v4l2loopback-dkms/).
You are going to likely want to perform as a minimal one loopback tool (that’s persistent
on boot):
$ sudo tee /etc/modprobe.d/v4l2loopback.conf << "EOF" # /dev/video3 alternatives v4l2loopback video_nr=3 alternatives v4l2loopback card_label="Digital Webcam" alternatives v4l2loopback exclusive_caps=1 EOF $ sudo modprobe v4l2loopback $ v4l2-ctl --tool /dev/video3 --info
Gstreamer
- gstreamer-1.0 (e.g. https://archlinux.org/programs/extra/x86_64/gstreamer/)
- gst-plugins-snide (e.g. https://archlinux.org/programs/extra/x86_64/gst-plugins-snide/)
- gst-python (e.g. https://archlinux.org/programs/extra/x86_64/gst-python/)
Set up
You are going so that you just would possibly both command pipx or pip. Pipx is counsel to retain dependencies
isolated.
Latest steady:
$ pipx set up --map-residing-programs webcam-filters $ pip set up --person webcam-filters
Latest pre-release:
$ pipx set up --map-residing-programs --pip-args='--pre' webcam-filters $ pip set up --person --pre webcam-filters
Git:
$ url="git+https://github.com/jashandeep-sohi/webcam-filters.git" $ pipx set up --map-residing-programs "$url" $ pip set up --person "$url"