Add filters (background blur, etc) to your webcam on Linux.

Overview

PyPI Update Nix Cache

webcam-filters

Add filters (background blur, etc) to your webcam on Linux.

Video conferencing applications tend to either lack video effects altogether or support only a limited set of capabilities on Linux (e.g. Zoom [1], Google Meets [2]).

Goal here is to provide a virtual webcam via v4l2loopback with a common set of filters that can be used everywhere.

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

Other than the Python dependencies that can be automatically installed by Pip, there are a few system dependencies that require manual attention.

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 (e.g. https://archlinux.org/packages/community/any/v4l2loopback-dkms/).

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

Gstreamer

Installation

Nix

The provided Nix package bundles all the necessary GStreamer dependencies and should "just work" on any distro.

Setup the cache. This step is optional, but it should speed up the installation process:

$ nix-env -iA cachix -f https://cachix.org/api/v1/install
$ cachix use sohi

Install a specific release version/tag:

$ nix-env \
    --install \
    --file https://github.com/jashandeep-sohi/webcam-filters/archive/refs/tags/v0.2.2.tar.gz

Install a specific branch (e.g. master):

$ nix-env \
    --install \
    --file https://github.com/jashandeep-sohi/webcam-filters/archive/refs/heads/master.tar.gz

Pipx/Pip

You can also use pipx or pip. Pipx is recommend to keep Python dependencies isolated. Keep in mind this will not install gst-python or any of the other GStreamer dependencies, so you'll have to install that yourself.

Latest stable:

$ pipx install --system-site-packages webcam-filters
$ # Or
$ pip install --user webcam-filters

Latest pre-release:

$ pipx install --system-site-packages --pip-args='--pre' webcam-filters
$ # Or
$ pip install --user --pre webcam-filters

Git:

$ url="git+https://github.com/jashandeep-sohi/webcam-filters.git"
$ pipx install --system-site-packages "$url"
$ # Or
$ pip install --user "$url"
[1] Zoom desktop client supports background blur as of version 5.7.6. Zoom on web does not.
[2] Google Meets supports background blur only on Chrome.
Issues
  • Hardware acceleration does not work with the radeonsi driver

    Hardware acceleration does not work with the radeonsi driver

    Hi :wave:

    When I try to use --hw-accel vaapi the GStreamer pipeline does not run. I don't know if I miss something or if some feature is missing (NYI?) in the driver...?

    $ GST_DEBUG=2 webcam-filters --input-dev /dev/video0 --output-dev /dev/video3 --background-blur 150 --hw-accel-api vaapi
    Selected input: media-type=image/jpeg, width=1280 height=720 framerate=30/1
    0:00:00.452510507 78424      0x1ea2550 WARN              vaapiblend gstvaapiblend.c:184:gst_vaapi_blend_initialize:<vaapiblend0> VPP does not support global alpha blending
    
    (python3:78424): GStreamer-CRITICAL **: 21:06:44.103: The created element should be floating, this is probably caused by faulty bindings
    
    (python3:78424): GStreamer-CRITICAL **: 21:06:44.104: The created element should be floating, this is probably caused by faulty bindings
    
    (python3:78424): GStreamer-CRITICAL **: 21:06:44.105: The created element should be floating, this is probably caused by faulty bindings
    Pipeline: READY
    Pipeline: PAUSED
    0:00:00.533376004 78424      0x201ecc0 WARN          v4l2bufferpool gstv4l2bufferpool.c:814:gst_v4l2_buffer_pool_start:<v4l2src1:pool0:src> Uncertain or not enough buffers, enabling copy threshold
    INFO: Created TensorFlow Lite XNNPACK delegate for CPU.
    0:00:01.189612022 78424      0x201ef00 WARN             vaapifilter gstvaapifilter.c:2409:gst_vaapi_filter_set_colorimetry_unlocked:<vaapifilter2> driver does not support '2:4:5:1' input colorimetry. vpp may fail or produce unexpected results.
    0:00:01.189625357 78424      0x201ef00 WARN             vaapifilter gstvaapifilter.c:2419:gst_vaapi_filter_set_colorimetry_unlocked:<vaapifilter2> driver does not support 'sRGB' output colorimetry. vpp may fail or produce unexpected results.
    0:00:01.209019915 78424      0x201ecc0 WARN                 v4l2src gstv4l2src.c:1001:gst_v4l2src_create:<v4l2src1> lost frames detected: count = 1 - ts: 0:00:00.671366999
    0:00:01.212918189 78424 0x7f93140021e0 WARN           basetransform gstbasetransform.c:1370:gst_base_transform_setcaps:<vaapipostproc1> transform could not transform video/x-raw, width=(int)1280, height=(int)720, framerate=(fraction)30/1, interlace-mode=(string)progressive, pixel-aspect-ratio=(fraction)1/1, multiview-mode=(string)mono, multiview-flags=(GstVideoMultiviewFlagsSet)0:ffffffff:/right-view-first/left-flipped/left-flopped/right-flipped/right-flopped/half-aspect/mixed-mono, format=(string)RGBx in anything we support
    

    The last line then repeats... Any idea? (Maybe the line ending with VPP does not support global alpha blending shows the problem)

    bug 
    opened by mid1221213 24
  • "Invalid literal for Fraction"

    On Ubuntu 21.04 (on which I had to install python3-gst-1.0):

    $ webcam-filters --version
    0.2.0
    $ webcam-filters --input-dev /dev/video0 --output-dev /dev/video3 --background-blur 150
    Traceback (most recent call last):
      File "/home/me/.local/bin/webcam-filters", line 8, in <module>
        sys.exit(cli())
      File "/home/me/.local/lib/python3.9/site-packages/click/core.py", line 1137, in __call__
        return self.main(*args, **kwargs)
      File "/home/me/.local/lib/python3.9/site-packages/click/core.py", line 1062, in main
        rv = self.invoke(ctx)
      File "/home/me/.local/lib/python3.9/site-packages/click/core.py", line 1404, in invoke
        return ctx.invoke(self.callback, **ctx.params)
      File "/home/me/.local/lib/python3.9/site-packages/click/core.py", line 763, in invoke
        return __callback(*args, **kwargs)
      File "/home/me/.local/lib/python3.9/site-packages/webcam_filters/main.py", line 137, in cli
        add_filters(
      File "/home/me/.local/lib/python3.9/site-packages/webcam_filters/gst.py", line 87, in add_filters
        structs = sorted(
      File "/home/me/.local/lib/python3.9/site-packages/webcam_filters/gst.py", line 90, in <lambda>
        Fraction(str(x.get_value("framerate"))),
      File "/usr/lib/python3.9/fractions.py", line 115, in __new__
        raise ValueError('Invalid literal for Fraction: %r' %
    ValueError: Invalid literal for Fraction: '{15/2,5/1}'
    
    bug 
    opened by mid1221213 13
  • Python plugins not loading on OpenSUSE

    Python plugins not loading on OpenSUSE

    [23:21:59] ~ $ GST_DEBUG=GST_PLUGIN_LOADING:4,pyplugin:6 webcam-filters --background-blur 50 --input-dev /dev/video5 --output-dev /dev/video0
    0:00:00.000268384 18134 0x5626dde96a70 INFO      GST_PLUGIN_LOADING gstplugin.c:325:_priv_gst_plugin_initialize: registering 0 static plugins
    0:00:00.000325815 18134 0x5626dde96a70 INFO      GST_PLUGIN_LOADING gstplugin.c:233:gst_plugin_register_static: registered static plugin "staticelements"
    0:00:00.000332994 18134 0x5626dde96a70 INFO      GST_PLUGIN_LOADING gstplugin.c:235:gst_plugin_register_static: added static plugin "staticelements", result: 1
    0:00:00.197454235 18134 0x5626dde96a70 INFO      GST_PLUGIN_LOADING gstplugin.c:915:_priv_gst_plugin_load_file_for_registry: plugin "/usr/lib64/gstreamer-1.0/libgstvideo4linux2.so" loaded
    Selectd input: media-type=image/jpeg, width=1280 height=720 framerate=30/1
    0:00:00.210186485 18134 0x5626dde96a70 INFO      GST_PLUGIN_LOADING gstplugin.c:915:_priv_gst_plugin_load_file_for_registry: plugin "/usr/lib64/gstreamer-1.0/libgstcoreelements.so" loaded
    0:00:00.215944899 18134 0x5626dde96a70 INFO      GST_PLUGIN_LOADING gstplugin.c:915:_priv_gst_plugin_load_file_for_registry: plugin "/usr/lib64/gstreamer-1.0/libgstplayback.so" loaded
    0:00:00.218019679 18134 0x5626dde96a70 INFO      GST_PLUGIN_LOADING gstplugin.c:915:_priv_gst_plugin_load_file_for_registry: plugin "/usr/lib64/gstreamer-1.0/libgstvideoconvert.so" loaded
    Traceback (most recent call last):
      File "/home/hector/.local/bin/webcam-filters", line 8, in <module>
        sys.exit(cli())
      File "/home/hector/.local/pipx/venvs/webcam-filters/lib64/python3.9/site-packages/click/core.py", line 1137, in __call__
        return self.main(*args, **kwargs)
      File "/home/hector/.local/pipx/venvs/webcam-filters/lib64/python3.9/site-packages/click/core.py", line 1062, in main
        rv = self.invoke(ctx)
      File "/home/hector/.local/pipx/venvs/webcam-filters/lib64/python3.9/site-packages/click/core.py", line 1404, in invoke
        return ctx.invoke(self.callback, **ctx.params)
      File "/home/hector/.local/pipx/venvs/webcam-filters/lib64/python3.9/site-packages/click/core.py", line 763, in invoke
        return __callback(*args, **kwargs)
      File "/home/hector/.local/pipx/venvs/webcam-filters/lib64/python3.9/site-packages/webcam_filters/main.py", line 139, in cli
        add_filters(
      File "/home/hector/.local/pipx/venvs/webcam-filters/lib64/python3.9/site-packages/webcam_filters/gst.py", line 159, in add_filters
        selfie.set_property("model", selfie_segmentation_model)
    AttributeError: 'NoneType' object has no attribute 'set_property'
    

    @hsanjuan creating a new issue for this.

    I don't see libgstpython.so being loaded, which means none of Python plugins also get loaded. Normally, it looks something like this:

    0:00:01.029100122 12710 0x55eb5f0b6c70 LOG                 pyplugin gstpythonplugin.c:232:plugin_init: Checking to see if libpython is already loaded                                                                                    
    0:00:01.029108435 12710 0x55eb5f0b6c70 LOG                 pyplugin gstpythonplugin.c:235:plugin_init: libpython is already loaded                
    0:00:01.029111008 12710 0x55eb5f0b6c70 LOG                 pyplugin gstpythonplugin.c:254:plugin_init: python was already initialized
    0:00:01.029116664 12710 0x55eb5f0b6c70 LOG                 pyplugin gstpythonplugin.c:274:plugin_init: Running with python version '3.9.6 (default, Jun 30 2021, 10:22:16) 
    [GCC 11.1.0]'                                                                                                                                                                                                                                 
    0:00:01.029118772 12710 0x55eb5f0b6c70 LOG                 pyplugin gstpythonplugin.c:276:plugin_init: initializing pygobject                           
    0:00:01.029188105 12710 0x55eb5f0b6c70 DEBUG               pyplugin gstpythonplugin.c:156:gst_python_plugin_load: GST_PLUGIN_PATH set to /home/gamma/.local/pipx/venvs/webcam-filters/lib/python3.9/site-packages/webcam_filters/plugins:
    0:00:01.029203475 12710 0x55eb5f0b6c70 DEBUG               pyplugin gstpythonplugin.c:48:gst_python_plugin_load_file: loading plugin cv2_boxfilter                                                               
    0:00:01.164450264 12710 0x55eb5f0b6c70 INFO                pyplugin gstpythonplugin.c:103:gst_python_plugin_load_file: Valid plugin             
    0:00:01.164474670 12710 0x55eb5f0b6c70 DEBUG               pyplugin gstpythonplugin.c:48:gst_python_plugin_load_file: loading plugin numpy_where                                                                                              0:00:01.166064073 12710 0x55eb5f0b6c70 INFO                pyplugin gstpythonplugin.c:103:gst_python_plugin_load_file: Valid plugin
    0:00:01.166078845 12710 0x55eb5f0b6c70 DEBUG               pyplugin gstpythonplugin.c:48:gst_python_plugin_load_file: loading plugin selfie_segmentation                                                                           
    0:00:01.356304339 12710 0x55eb5f0b6c70 INFO                pyplugin gstpythonplugin.c:103:gst_python_plugin_load_file: Valid plugin                                                
    0:00:01.356338024 12710 0x55eb5f0b6c70 DEBUG               pyplugin gstpythonplugin.c:121:gst_python_load_directory: Couldn't open Python plugin dir: Error opening directory “python”: No such file or directory
    0:00:01.356344484 12710 0x55eb5f0b6c70 DEBUG               pyplugin gstpythonplugin.c:176:gst_python_plugin_load: GST_PLUGIN_SYSTEM_PATH not set
    0:00:01.356352301 12710 0x55eb5f0b6c70 DEBUG               pyplugin gstpythonplugin.c:121:gst_python_load_directory: Couldn't open Python plugin dir: Error opening directory “/home/gamma/.gstreamer-1.0/plugins/python”: No such file or dir
    ectory                                                                                                                                                                                                                                        
    0:00:01.356358134 12710 0x55eb5f0b6c70 DEBUG               pyplugin gstpythonplugin.c:121:gst_python_load_directory: Couldn't open Python plugin dir: Error opening directory “lib/gstreamer-1.0/python”: No such file or directory
    0:00:01.356364671 12710 0x55eb5f0b6c70 INFO      GST_PLUGIN_LOADING gstplugin.c:915:_priv_gst_plugin_load_file_for_registry: plugin "/usr/lib/gstreamer-1.0/libgstpython.so" loaded
    

    The only thing I can think of is libgstpython.so isn't in a path that GStreamer looks for plugins by default. What happens if you add /usr/lib64/gstreamer-1.0/ to GST_PLUGIN_PATH?

    GST_PLUGIN_PATH="/usr/lib64/gstreamer-1.0:$GST_PLUGIN_PATH" GST_DEBUG=GST_PLUGIN_LOADING:4,pyplugin:6 webcam-filters --background-blur 50 ...
    

    Originally posted by @hsanjuan in https://github.com/jashandeep-sohi/webcam-filters/issues/4#issuecomment-913229787

    opened by jashandeep-sohi 10
  • "AttributeError: 'NoneType' object has no attribute 'set_property'" when setting blur

    Running Debian bullseye here, with python 3.9 and gstreamer 1.18.4 (though python3-gst 1.18.3). When I try to start things up (after creating a v4l2loopback device per the README, at /dev/video11):

    $ webcam-filters --input-dev /dev/video2 --output-dev /dev/video11 --background-blur 150
    Traceback (most recent call last):
      File "/home/brian/.local/bin/webcam-filters", line 8, in <module>
        sys.exit(cli())
      File "/home/brian/.local/pipx/venvs/webcam-filters/lib/python3.9/site-packages/click/core.py", line 1137, in __call__
        return self.main(*args, **kwargs)
      File "/home/brian/.local/pipx/venvs/webcam-filters/lib/python3.9/site-packages/click/core.py", line 1062, in main
        rv = self.invoke(ctx)
      File "/home/brian/.local/pipx/venvs/webcam-filters/lib/python3.9/site-packages/click/core.py", line 1404, in invoke
        return ctx.invoke(self.callback, **ctx.params)
      File "/home/brian/.local/pipx/venvs/webcam-filters/lib/python3.9/site-packages/click/core.py", line 763, in invoke
        return __callback(*args, **kwargs)
      File "/home/brian/.local/pipx/venvs/webcam-filters/lib/python3.9/site-packages/webcam_filters/main.py", line 137, in cli
        add_filters(
      File "/home/brian/.local/pipx/venvs/webcam-filters/lib/python3.9/site-packages/webcam_filters/gst.py", line 152, in add_filters
        selfie.set_property("model", selfie_segmentation_model)
    AttributeError: 'NoneType' object has no attribute 'set_property'
    
    opened by kelnos 9
  • Unable to install

    Unable to install

    1. Created a virtualenv
    2. Installed pipx
    3. Got below error:
    PIP STDOUT
    ----------
    
    PIP STDERR
    ----------
    ERROR: Could not find a version that satisfies the requirement webcam-filters (from versions: none)
    ERROR: No matching distribution found for webcam-filters
    

    $ python3 --version Python 3.7.7

    opened by SoumenDass 6
  • numpy_where element does not negoitate cap correctly

    numpy_where element does not negoitate cap correctly

    As stated in #3, I have a problem where the command, when launched with some parameters for resolution / framerate, exits after one second without showing any error message. Example:

    $ webcam-filters --input-dev /dev/video0 --output-dev /dev/video3 --background-blur 150
    Selectd input: media-type=image/jpeg, width=1280 height=720 framerate=30/1
    
    (python3:125359): GStreamer-CRITICAL **: 20:04:27.677: The created element should be floating, this is probably caused by faulty bindings
    
    (python3:125359): GStreamer-CRITICAL **: 20:04:27.677: The created element should be floating, this is probably caused by faulty bindings
    
    (python3:125359): GStreamer-CRITICAL **: 20:04:27.678: The created element should be floating, this is probably caused by faulty bindings
    INFO: Created TensorFlow Lite XNNPACK delegate for CPU.
    $ 
    

    Actually, at least with my webcam (a Logitech HD Pro C920), the only working parameters are when setting the resolution / framerate to 1920x1080 at 30 FPS (image/jpeg).

    Just tried at the moment to run it with the env variable GST_DEBUG=1 and I get this error just before it gives back the prompt:

    0:00:01.066575233 125506      0x215ac00 ERROR                 python numpy_where.py:148:do_aggregate: buffer is too small for requested array
    
    bug 
    opened by mid1221213 6
  • Error while running the demo commands

    Error while running the demo commands

    $ webcam-filters --input-dev /dev/video0 --output-dev /dev/video3 --background-blur 150

    Traceback (most recent call last):
      File "/home/eeroh/.local/bin/webcam-filters", line 8, in <module>
        sys.exit(cli())
      File "/home/eeroh/.local/lib/python3.9/site-packages/click/core.py", line 1137, in __call__
        return self.main(*args, **kwargs)
      File "/home/eeroh/.local/lib/python3.9/site-packages/click/core.py", line 1062, in main
        rv = self.invoke(ctx)
      File "/home/eeroh/.local/lib/python3.9/site-packages/click/core.py", line 1404, in invoke
        return ctx.invoke(self.callback, **ctx.params)
      File "/home/eeroh/.local/lib/python3.9/site-packages/click/core.py", line 763, in invoke
        return __callback(*args, **kwargs)
      File "/home/eeroh/.local/lib/python3.9/site-packages/webcam_filters/main.py", line 137, in cli
        add_filters(
      File "/home/eeroh/.local/lib/python3.9/site-packages/webcam_filters/gst.py", line 68, in add_filters
        for c in caps:
    TypeError: 'Caps' object is not iterable
    
    documentation 
    opened by vincit-haihala 5
  • AttributeError: __enter__ when running with blur

    AttributeError: __enter__ when running with blur

    Hi, I'm still struggling to get blur to work on Ubuntu 20.04. I struggled with #4 but got past that by installing gstreamer1.0-python3-plugin-loader. The command does not 'crash' now but it spits out an infinite stream of errors:

    % GST_DEBUG=GST_PLUGIN_LOADING:4,pyplugin:6 webcam-filters --input-dev /dev/video0 --output-dev /dev/video3 --background-blur 150 | sed 's/jgrgt/jgrgt/g'
    0:00:00.000339346 88314      0x1229670 INFO      GST_PLUGIN_LOADING gstplugin.c:318:_priv_gst_plugin_initialize: registering 0 static plugins
    0:00:00.000423577 88314      0x1229670 INFO      GST_PLUGIN_LOADING gstplugin.c:226:gst_plugin_register_static: registered static plugin "staticelements"
    0:00:00.000450943 88314      0x1229670 INFO      GST_PLUGIN_LOADING gstplugin.c:228:gst_plugin_register_static: added static plugin "staticelements", result: 1
    0:00:00.008871418 88314      0x1229670 INFO      GST_PLUGIN_LOADING gstplugin.c:1524:gst_plugin_ext_dep_extract_env_vars_paths:<plugin36> ignoring environment variable content '': either not an absolute path or not a path at all
    0:00:00.008884089 88314      0x1229670 INFO      GST_PLUGIN_LOADING gstplugin.c:1524:gst_plugin_ext_dep_extract_env_vars_paths:<plugin36> ignoring environment variable content '1': either not an absolute path or not a path at all
    0:00:00.009128618 88314      0x1229670 INFO      GST_PLUGIN_LOADING gstplugin.c:1524:gst_plugin_ext_dep_extract_env_vars_paths:<plugin106> ignoring environment variable content '': either not an absolute path or not a path at all
    0:00:00.013450325 88314      0x1229670 INFO      GST_PLUGIN_LOADING gstplugin.c:902:_priv_gst_plugin_load_file_for_registry: plugin "/usr/lib/x86_64-linux-gnu/gstreamer-1.0/libgstvideo4linux2.so" loaded
    Selectd input: media-type=image/jpeg, width=1280 height=720 framerate=30/1
    0:00:00.016463374 88314      0x1229670 INFO      GST_PLUGIN_LOADING gstplugin.c:902:_priv_gst_plugin_load_file_for_registry: plugin "/usr/lib/x86_64-linux-gnu/gstreamer-1.0/libgstcoreelements.so" loaded
    0:00:00.017510553 88314      0x1229670 INFO      GST_PLUGIN_LOADING gstplugin.c:902:_priv_gst_plugin_load_file_for_registry: plugin "/usr/lib/x86_64-linux-gnu/gstreamer-1.0/libgstplayback.so" loaded
    0:00:00.018003740 88314      0x1229670 INFO      GST_PLUGIN_LOADING gstplugin.c:902:_priv_gst_plugin_load_file_for_registry: plugin "/usr/lib/x86_64-linux-gnu/gstreamer-1.0/libgstvideoconvert.so" loaded
    0:00:00.021918098 88314      0x1229670 LOG                 pyplugin gstpythonplugin.c:227:plugin_init: Checking to see if libpython is already loaded
    0:00:00.021953189 88314      0x1229670 LOG                 pyplugin gstpythonplugin.c:230:plugin_init: libpython is already loaded
    0:00:00.021958312 88314      0x1229670 LOG                 pyplugin gstpythonplugin.c:249:plugin_init: python was already initialized
    0:00:00.021967731 88314      0x1229670 LOG                 pyplugin gstpythonplugin.c:253:plugin_init: Running with python version '3.8.10 (default, Jun  2 2021, 10:49:15) 
    [GCC 9.4.0]'
    0:00:00.021972050 88314      0x1229670 LOG                 pyplugin gstpythonplugin.c:255:plugin_init: initializing pygobject
    0:00:00.022180382 88314      0x1229670 DEBUG               pyplugin gstpythonplugin.c:154:gst_python_plugin_load: GST_PLUGIN_PATH set to /home/jgrgt/.local/lib/python3.8/site-packages/webcam_filters/plugins:
    0:00:00.022221452 88314      0x1229670 DEBUG               pyplugin gstpythonplugin.c:48:gst_python_plugin_load_file: loading plugin cv2_boxfilter
    0:00:00.144117053 88314      0x1229670 INFO                pyplugin gstpythonplugin.c:103:gst_python_plugin_load_file: Valid plugin
    0:00:00.144157775 88314      0x1229670 DEBUG               pyplugin gstpythonplugin.c:48:gst_python_plugin_load_file: loading plugin selfie_segmentation
    0:00:00.395388933 88314      0x1229670 INFO                pyplugin gstpythonplugin.c:103:gst_python_plugin_load_file: Valid plugin
    0:00:00.395410970 88314      0x1229670 DEBUG               pyplugin gstpythonplugin.c:48:gst_python_plugin_load_file: loading plugin numpy_where
    0:00:00.396734247 88314      0x1229670 INFO                pyplugin gstpythonplugin.c:103:gst_python_plugin_load_file: Valid plugin
    0:00:00.396762556 88314      0x1229670 DEBUG               pyplugin gstpythonplugin.c:121:gst_python_load_directory: Couldn't open Python plugin dir: Error opening directory “python”: No such file or directory
    0:00:00.396772276 88314      0x1229670 DEBUG               pyplugin gstpythonplugin.c:172:gst_python_plugin_load: GST_PLUGIN_SYSTEM_PATH not set
    0:00:00.396783639 88314      0x1229670 DEBUG               pyplugin gstpythonplugin.c:121:gst_python_load_directory: Couldn't open Python plugin dir: Error opening directory “/home/jgrgt/.gstreamer-1.0/plugins/python”: No such file or directory
    0:00:00.396793250 88314      0x1229670 DEBUG               pyplugin gstpythonplugin.c:121:gst_python_load_directory: Couldn't open Python plugin dir: Error opening directory “lib/x86_64-linux-gnu/gstreamer-1.0/python”: No such file or directory
    0:00:00.396802097 88314      0x1229670 INFO      GST_PLUGIN_LOADING gstplugin.c:902:_priv_gst_plugin_load_file_for_registry: plugin "/usr/lib/x86_64-linux-gnu/gstreamer-1.0/libgstpython.so" loaded
    INFO: Created TensorFlow Lite XNNPACK delegate for CPU.
    0:00:00.420456846 88314      0x1ecccc0 INFO      GST_PLUGIN_LOADING gstplugin.c:902:_priv_gst_plugin_load_file_for_registry: plugin "/usr/lib/x86_64-linux-gnu/gstreamer-1.0/libgstjpeg.so" loaded
    Traceback (most recent call last):
      File "/home/jgrgt/.local/lib/python3.8/site-packages/webcam_filters/plugins/python/selfie_segmentation.py", line 151, in do_transform_ip
        with inbuf_info:
    AttributeError: __enter__
    
    During handling of the above exception, another exception occurred:
    
    Traceback (most recent call last):
    Traceback (most recent call last):
      File "/home/jgrgt/.local/lib/python3.8/site-packages/webcam_filters/plugins/python/cv2_boxfilter.py", line 104, in do_transform_ip
      File "/home/jgrgt/.local/lib/python3.8/site-packages/webcam_filters/plugins/python/selfie_segmentation.py", line 169, in do_transform_ip
        with inbuf_info:
    AttributeError: __enter__
        except Gst.MapError as e:
    
    During handling of the above exception, another exception occurred:
    
    Traceback (most recent call last):
      File "/usr/lib/python3/dist-packages/gi/overrides/__init__.py", line 32, in __getattr__
      File "/home/jgrgt/.local/lib/python3.8/site-packages/webcam_filters/plugins/python/cv2_boxfilter.py", line 115, in do_transform_ip
        return getattr(self._introspection_module, name)
      File "/usr/lib/python3/dist-packages/gi/module.py", line 131, in __getattr__
        except Gst.MapError as e:
      File "/usr/lib/python3/dist-packages/gi/overrides/__init__.py", line 32, in __getattr__
        raise AttributeError("%r object has no attribute %r" % (
    AttributeError: 'gi.repository.Gst' object has no attribute 'MapError'
        return getattr(self._introspection_module, name)
      File "/usr/lib/python3/dist-packages/gi/module.py", line 131, in __getattr__
        raise AttributeError("%r object has no attribute %r" % (
    AttributeError: 'gi.repository.Gst' object has no attribute 'MapError'
    Traceback (most recent call last):
      File "/home/jgrgt/.local/lib/python3.8/site-packages/webcam_filters/plugins/python/cv2_boxfilter.py", line 104, in do_transform_ip
    Traceback (most recent call last):
      File "/home/jgrgt/.local/lib/python3.8/site-packages/webcam_filters/plugins/python/selfie_segmentation.py", line 151, in do_transform_ip
        with inbuf_info:
    AttributeError: __enter__
    
    During handling of the above exception, another exception occurred:
    
    Traceback (most recent call last):
        with inbuf_info:
      File "/home/jgrgt/.local/lib/python3.8/site-packages/webcam_filters/plugins/python/cv2_boxfilter.py", line 115, in do_transform_ip
    AttributeError: __enter__
    
    During handling of the above exception, another exception occurred:
    
    Traceback (most recent call last):
      File "/home/jgrgt/.local/lib/python3.8/site-packages/webcam_filters/plugins/python/selfie_segmentation.py", line 169, in do_transform_ip
        except Gst.MapError as e:
      File "/usr/lib/python3/dist-packages/gi/overrides/__init__.py", line 32, in __getattr__
        except Gst.MapError as e:
      File "/usr/lib/python3/dist-packages/gi/overrides/__init__.py", line 32, in __getattr__
        return getattr(self._introspection_module, name)
        return getattr(self._introspection_module, name)
      File "/usr/lib/python3/dist-packages/gi/module.py", line 131, in __getattr__
      File "/usr/lib/python3/dist-packages/gi/module.py", line 131, in __getattr__
        raise AttributeError("%r object has no attribute %r" % (
        raise AttributeError("%r object has no attribute %r" % (
    AttributeError: 'gi.repository.Gst' object has no attribute 'MapError'
    AttributeError: 'gi.repository.Gst' object has no attribute 'MapError'
    Traceback (most recent call last):
      File "/home/jgrgt/.local/lib/python3.8/site-packages/webcam_filters/plugins/python/numpy_where.py", line 109, in do_aggregate
        self.selected_samples(cbuf.pts, cbuf.dts, cbuf.duration, None)
    AttributeError: 'Where' object has no attribute 'selected_samples'
    

    Any ideas what I'm still missing?

    opened by jgrgt 4
  • ModuleNotFoundError: No module named 'gi'

    ModuleNotFoundError: No module named 'gi'

    See installation log below. Is there a python dependency or system dependency missing?

    ➜ asdf install python latest:3.9 
    python-build 3.9.7 /home/mui2lol/.asdf/installs/python/3.9.7
    Downloading Python-3.9.7.tar.xz...
    -> https://www.python.org/ftp/python/3.9.7/Python-3.9.7.tar.xz
    Installing Python-3.9.7...
    Installed Python-3.9.7 to /home/mui2lol/.asdf/installs/python/3.9.7
    
    ~ took 1m 5s 
    
    ➜ asdf global python 3.9.7     
    
    ➜ python                             
    Python 3.9.7 (default, Oct 28 2021, 10:16:54) 
    [GCC 9.3.0] on linux
    Type "help", "copyright", "credits" or "license" for more information.
    >>> 
    KeyboardInterrupt
    >>> 
    
    ~ took 2s 
    
    ➜ pip install --user webcam-filters
    Looking in indexes: https://anu9rng:****@rb-artifactory.bosch.com/artifactory/api/pypi/python-virtual/simple
    Collecting webcam-filters
      Using cached https://rb-artifactory.bosch.com/artifactory/api/pypi/python-virtual/packages/packages/77/2b/172e339c28393d9212ba71dade33d19da177cea20201d154159741a86a63/webcam_filters-0.3.0-py3-none-any.whl (25 kB)
    Requirement already satisfied: rich<11.0.0,>=10.7.0 in ./.local/lib/python3.9/site-packages (from webcam-filters) (10.12.0)
    Requirement already satisfied: mediapipe<0.9.0,>=0.8.6 in ./.local/lib/python3.9/site-packages (from webcam-filters) (0.8.8.1)
    Requirement already satisfied: click<9.0.0,>=8.0.1 in ./.local/lib/python3.9/site-packages (from webcam-filters) (8.0.3)
    Requirement already satisfied: numpy<2.0.0,>=1.21.2 in ./.local/lib/python3.9/site-packages (from webcam-filters) (1.21.3)
    Requirement already satisfied: click-completion<0.6.0,>=0.5.2 in ./.local/lib/python3.9/site-packages (from webcam-filters) (0.5.2)
    Requirement already satisfied: opencv-contrib-python<5.0.0,>=4.5.3 in ./.local/lib/python3.9/site-packages (from webcam-filters) (4.5.4.58)
    Collecting six
      Using cached https://rb-artifactory.bosch.com/artifactory/api/pypi/python-virtual/packages/packages/d9/5a/e7c31adbe875f2abbb91bd84cf2dc52d792b5a01506781dbcf25c91daf11/six-1.16.0-py2.py3-none-any.whl (11 kB)
    Collecting jinja2
      Downloading https://rb-artifactory.bosch.com/artifactory/api/pypi/python-virtual/packages/packages/94/42/d8bca8e99789bcc35dfa9b03acaa8b518720d6e060163745bc2bf2ead842/Jinja2-3.0.2-py3-none-any.whl (133 kB)
         |████████████████████████████████| 133 kB 2.2 MB/s 
    Requirement already satisfied: shellingham in ./.local/lib/python3.9/site-packages (from click-completion<0.6.0,>=0.5.2->webcam-filters) (1.4.0)
    Requirement already satisfied: matplotlib in ./.local/lib/python3.9/site-packages (from mediapipe<0.9.0,>=0.8.6->webcam-filters) (3.4.3)
    Requirement already satisfied: absl-py in ./.local/lib/python3.9/site-packages (from mediapipe<0.9.0,>=0.8.6->webcam-filters) (0.15.0)
    Requirement already satisfied: wheel in ./.local/lib/python3.9/site-packages (from mediapipe<0.9.0,>=0.8.6->webcam-filters) (0.37.0)
    Requirement already satisfied: protobuf>=3.11.4 in ./.local/lib/python3.9/site-packages (from mediapipe<0.9.0,>=0.8.6->webcam-filters) (3.19.0)
    Collecting attrs>=19.1.0
      Using cached https://rb-artifactory.bosch.com/artifactory/api/pypi/python-virtual/packages/packages/20/a9/ba6f1cd1a1517ff022b35acd6a7e4246371dfab08b8e42b829b6d07913cc/attrs-21.2.0-py2.py3-none-any.whl (53 kB)
    Requirement already satisfied: commonmark<0.10.0,>=0.9.0 in ./.local/lib/python3.9/site-packages (from rich<11.0.0,>=10.7.0->webcam-filters) (0.9.1)
    Requirement already satisfied: pygments<3.0.0,>=2.6.0 in ./.local/lib/python3.9/site-packages (from rich<11.0.0,>=10.7.0->webcam-filters) (2.10.0)
    Collecting colorama<0.5.0,>=0.4.0
      Using cached https://rb-artifactory.bosch.com/artifactory/api/pypi/python-virtual/packages/packages/44/98/5b86278fbbf250d239ae0ecb724f8572af1c91f4a11edf4d36a206189440/colorama-0.4.4-py2.py3-none-any.whl (16 kB)
    Collecting MarkupSafe>=2.0
      Downloading https://rb-artifactory.bosch.com/artifactory/api/pypi/python-virtual/packages/packages/c2/db/314df69668f582d5173922bded7b58126044bb77cfce6347c5d992074d2e/MarkupSafe-2.0.1-cp39-cp39-manylinux_2_5_x86_64.manylinux1_x86_64.manylinux_2_12_x86_64.manylinux2010_x86_64.whl (30 kB)
    Collecting pyparsing>=2.2.1
      Using cached https://rb-artifactory.bosch.com/artifactory/api/pypi/python-virtual/packages/packages/1b/19/8d24092f75e3bc7b4b2a78c9c63664bdeb00298acd15fad5d614da2a25b1/pyparsing-3.0.3-py3-none-any.whl (96 kB)
    Requirement already satisfied: pillow>=6.2.0 in ./.local/lib/python3.9/site-packages (from matplotlib->mediapipe<0.9.0,>=0.8.6->webcam-filters) (8.4.0)
    Requirement already satisfied: kiwisolver>=1.0.1 in ./.local/lib/python3.9/site-packages (from matplotlib->mediapipe<0.9.0,>=0.8.6->webcam-filters) (1.3.2)
    Requirement already satisfied: python-dateutil>=2.7 in ./.local/lib/python3.9/site-packages (from matplotlib->mediapipe<0.9.0,>=0.8.6->webcam-filters) (2.8.2)
    Requirement already satisfied: cycler>=0.10 in ./.local/lib/python3.9/site-packages (from matplotlib->mediapipe<0.9.0,>=0.8.6->webcam-filters) (0.10.0)
    Installing collected packages: six, pyparsing, MarkupSafe, jinja2, colorama, attrs, webcam-filters
    Successfully installed MarkupSafe-2.0.1 attrs-21.2.0 colorama-0.4.4 jinja2-3.0.2 pyparsing-3.0.3 six-1.16.0 webcam-filters-0.3.0
    WARNING: You are using pip version 21.2.3; however, version 21.3.1 is available.
    You should consider upgrading via the '/home/mui2lol/.asdf/installs/python/3.9.7/bin/python3.9 -m pip install --upgrade pip' command.
    
    ~ took 4s 
    
    ➜ which webcam-filters    
    /home/mui2lol/.local/bin/webcam-filters
    
    ➜ cat /home/mui2lol/.local/bin/webcam-filters                    
    #!/home/mui2lol/.asdf/installs/python/3.9.7/bin/python3.9
    # -*- coding: utf-8 -*-
    import re
    import sys
    from webcam_filters.__main__ import main
    if __name__ == '__main__':
        sys.argv[0] = re.sub(r'(-script\.pyw|\.exe)?$', '', sys.argv[0])
        sys.exit(main())
    
    ➜ webcam-filters --version
    Traceback (most recent call last):
      File "/home/mui2lol/.local/bin/webcam-filters", line 5, in <module>
        from webcam_filters.__main__ import main
      File "/home/mui2lol/.local/lib/python3.9/site-packages/webcam_filters/__main__.py", line 1, in <module>
        from .main import cli
      File "/home/mui2lol/.local/lib/python3.9/site-packages/webcam_filters/main.py", line 14, in <module>
        from .gst import (
      File "/home/mui2lol/.local/lib/python3.9/site-packages/webcam_filters/gst.py", line 6, in <module>
        import gi
    ModuleNotFoundError: No module named 'gi'`
    
    opened by niecore 2
  • GStreamer plugin selfie_seg does not exist

    GStreamer plugin selfie_seg does not exist

    I'm trying to get the background blurring to work on my machine. It fails with a similar error as https://github.com/jashandeep-sohi/webcam-filters/issues/12

     File "/home/hector/.local/pipx/venvs/webcam-filters/lib64/python3.9/site-packages/webcam_filters/gst.py", line 159, in add_filters
        selfie.set_property("model", selfie_segmentation_model)
    AttributeError: 'NoneType' object has no attribute 'set_property'
    

    Running gst-insped-1.0 selfie_seg returns

    No such element or plugin 'selfie_seg'
    

    Googling for gstreamer plugin selfie_seg literally yields no results.

    Where exactly does that plugin come from and how can I install that on my machine?

    opened by henne90gen 2
  • Bump rich from 10.12.0 to 11.0.0

    Bump rich from 10.12.0 to 11.0.0

    Bumps rich from 10.12.0 to 11.0.0.

    Release notes

    Sourced from rich's releases.

    Vertical alignment in tables

    The headline feature of this reach is vertical alignment in tables.

    Note: as a major version bump, this version has some breaking changes. These changes won't affect many people, but we like to be strict about semver. See the release notes below.

    [11.0.0] - 2022-01-09

    Added

    Fixed

    Changed

    • breaking Deprecated rich.console.RenderGroup, now named rich.console.Group
    • breaking Syntax.__init__ parameter lexer_name renamed to lexer
    • Syntax constructor accepts both str and now a pygments lexer Textualize/rich#1748

    v10.16.2

    [10.16.2] - 2021-01-02

    Fixed

    • Fixed @ not being escaped in markup

    v10.16.1

    [10.16.1] - 2021-12-15

    Fixed

    v10.16.0

    A bugfix for progress bars in Jupyter in this release. And a new property on Text class which exports the equivalent console markup.

    [10.16.0] - 2021-12-12

    Fixed

    Added

    ... (truncated)

    Changelog

    Sourced from rich's changelog.

    [11.0.0] - 2022-01-09

    Added

    Fixed

    Changed

    • breaking Deprecated rich.console.RenderGroup, now named rich.console.Group
    • breaking Syntax.__init__ parameter lexer_name renamed to lexer
    • Syntax constructor accepts both str and now a pygments lexer Textualize/rich#1748

    [10.16.2] - 2021-01-02

    Fixed

    • Fixed @ not being escaped in markup

    [10.16.1] - 2021-12-15

    Fixed

    [10.16.0] - 2021-12-12

    Fixed

    Added

    [10.15.2] - 2021-12-02

    Fixed

    [10.15.1] - 2021-11-29

    Fixed

    ... (truncated)

    Commits

    Dependabot compatibility score

    Dependabot will resolve any conflicts with this PR as long as you don't alter it yourself. You can also trigger a rebase manually by commenting @dependabot rebase.


    Dependabot commands and options

    You can trigger Dependabot actions by commenting on this PR:

    • @dependabot rebase will rebase this PR
    • @dependabot recreate will recreate this PR, overwriting any edits that have been made to it
    • @dependabot merge will merge this PR after your CI passes on it
    • @dependabot squash and merge will squash and merge this PR after your CI passes on it
    • @dependabot cancel merge will cancel a previously requested merge and block automerging
    • @dependabot reopen will reopen this PR if it is closed
    • @dependabot close will close this PR and stop Dependabot recreating it. You can achieve the same result by closing it manually
    • @dependabot ignore this major version will close this PR and stop Dependabot creating any more for this major version (unless you reopen the PR or upgrade to it yourself)
    • @dependabot ignore this minor version will close this PR and stop Dependabot creating any more for this minor version (unless you reopen the PR or upgrade to it yourself)
    • @dependabot ignore this dependency will close this PR and stop Dependabot creating any more for this dependency (unless you reopen the PR or upgrade to it yourself)
    dependencies 
    opened by dependabot[bot] 0
  • Bump numpy from 1.21.2 to 1.22.0

    Bump numpy from 1.21.2 to 1.22.0

    Bumps numpy from 1.21.2 to 1.22.0.

    Release notes

    Sourced from numpy's releases.

    v1.22.0

    NumPy 1.22.0 Release Notes

    NumPy 1.22.0 is a big release featuring the work of 153 contributors spread over 609 pull requests. There have been many improvements, highlights are:

    • Annotations of the main namespace are essentially complete. Upstream is a moving target, so there will likely be further improvements, but the major work is done. This is probably the most user visible enhancement in this release.
    • A preliminary version of the proposed Array-API is provided. This is a step in creating a standard collection of functions that can be used across application such as CuPy and JAX.
    • NumPy now has a DLPack backend. DLPack provides a common interchange format for array (tensor) data.
    • New methods for quantile, percentile, and related functions. The new methods provide a complete set of the methods commonly found in the literature.
    • A new configurable allocator for use by downstream projects.

    These are in addition to the ongoing work to provide SIMD support for commonly used functions, improvements to F2PY, and better documentation.

    The Python versions supported in this release are 3.8-3.10, Python 3.7 has been dropped. Note that 32 bit wheels are only provided for Python 3.8 and 3.9 on Windows, all other wheels are 64 bits on account of Ubuntu, Fedora, and other Linux distributions dropping 32 bit support. All 64 bit wheels are also linked with 64 bit integer OpenBLAS, which should fix the occasional problems encountered by folks using truly huge arrays.

    Expired deprecations

    Deprecated numeric style dtype strings have been removed

    Using the strings "Bytes0", "Datetime64", "Str0", "Uint32", and "Uint64" as a dtype will now raise a TypeError.

    (gh-19539)

    Expired deprecations for loads, ndfromtxt, and mafromtxt in npyio

    numpy.loads was deprecated in v1.15, with the recommendation that users use pickle.loads instead. ndfromtxt and mafromtxt were both deprecated in v1.17 - users should use numpy.genfromtxt instead with the appropriate value for the usemask parameter.

    (gh-19615)

    ... (truncated)

    Commits

    Dependabot compatibility score

    Dependabot will resolve any conflicts with this PR as long as you don't alter it yourself. You can also trigger a rebase manually by commenting @dependabot rebase.


    Dependabot commands and options

    You can trigger Dependabot actions by commenting on this PR:

    • @dependabot rebase will rebase this PR
    • @dependabot recreate will recreate this PR, overwriting any edits that have been made to it
    • @dependabot merge will merge this PR after your CI passes on it
    • @dependabot squash and merge will squash and merge this PR after your CI passes on it
    • @dependabot cancel merge will cancel a previously requested merge and block automerging
    • @dependabot reopen will reopen this PR if it is closed
    • @dependabot close will close this PR and stop Dependabot recreating it. You can achieve the same result by closing it manually
    • @dependabot ignore this major version will close this PR and stop Dependabot creating any more for this major version (unless you reopen the PR or upgrade to it yourself)
    • @dependabot ignore this minor version will close this PR and stop Dependabot creating any more for this minor version (unless you reopen the PR or upgrade to it yourself)
    • @dependabot ignore this dependency will close this PR and stop Dependabot creating any more for this dependency (unless you reopen the PR or upgrade to it yourself)
    dependencies 
    opened by dependabot[bot] 0
  • Bump opencv-contrib-python from 4.5.3.56 to 4.5.5.62

    Bump opencv-contrib-python from 4.5.3.56 to 4.5.5.62

    Bumps opencv-contrib-python from 4.5.3.56 to 4.5.5.62.

    Release notes

    Sourced from opencv-contrib-python's releases.

    4.5.5.62

    opencv-python: https://pypi.org/project/opencv-python/ opencv-contrib-python: https://pypi.org/project/opencv-contrib-python/ opencv-python-headless: https://pypi.org/project/opencv-python-headless/ opencv-contrib-python-headless: https://pypi.org/project/opencv-contrib-python-headless/

    OpenCV 4.5.5

    Changes:

    • Switched to a single binary release with Python Limited API to cover all Python versions since 3.6. #595

    4.5.4.60

    opencv-python: https://pypi.org/project/opencv-python/ opencv-contrib-python: https://pypi.org/project/opencv-contrib-python/ opencv-python-headless: https://pypi.org/project/opencv-python-headless/ opencv-contrib-python-headless: https://pypi.org/project/opencv-contrib-python-headless/

    OpenCV 4.5.4

    Changes:

    • The build from source has been fixed. #577
    • Imshow segmentation fault issue have been fixed on Linux x86_64 with Python 3.9. #572
    • Updated OpenCV dependency to tag 4.5.4. #578
    • Pylint no-member warning and an autocomplete in IDE were fixed. #579
    • Auditwheel 5.0.0 version has been added for repairing wheels. #581

    4.5.4.58

    opencv-python: https://pypi.org/project/opencv-python/ opencv-contrib-python: https://pypi.org/project/opencv-contrib-python/ opencv-python-headless: https://pypi.org/project/opencv-python-headless/ opencv-contrib-python-headless: https://pypi.org/project/opencv-contrib-python-headless/

    OpenCV 4.5.4

    Changes:

    • Enabled Python code in OpenCV-Python distribution including cv.Mat wrapper, G-API Python bindings and pure python API. #563
    • Wheels for Python 3.10 will be provided starting from this release. #556
    • Enabled LAPACK-dependent API on Linux (x64 and aarch64) and macOS. Prebuild packages for Linux includes own LAPACK instance, MacOS package uses LAPACK interface provided by Accelerate.framework framework. LAPACK-dependent API on Windows will be enabled in next releases. #547
    • Fixed missing 3rd party libraries in wheels for MacOS M1. #555
    Commits

    Dependabot compatibility score

    Dependabot will resolve any conflicts with this PR as long as you don't alter it yourself. You can also trigger a rebase manually by commenting @dependabot rebase.


    Dependabot commands and options

    You can trigger Dependabot actions by commenting on this PR:

    • @dependabot rebase will rebase this PR
    • @dependabot recreate will recreate this PR, overwriting any edits that have been made to it
    • @dependabot merge will merge this PR after your CI passes on it
    • @dependabot squash and merge will squash and merge this PR after your CI passes on it
    • @dependabot cancel merge will cancel a previously requested merge and block automerging
    • @dependabot reopen will reopen this PR if it is closed
    • @dependabot close will close this PR and stop Dependabot recreating it. You can achieve the same result by closing it manually
    • @dependabot ignore this major version will close this PR and stop Dependabot creating any more for this major version (unless you reopen the PR or upgrade to it yourself)
    • @dependabot ignore this minor version will close this PR and stop Dependabot creating any more for this minor version (unless you reopen the PR or upgrade to it yourself)
    • @dependabot ignore this dependency will close this PR and stop Dependabot creating any more for this dependency (unless you reopen the PR or upgrade to it yourself)
    dependencies 
    opened by dependabot[bot] 0
  • Bump mediapipe from 0.8.8 to 0.8.9.1

    Bump mediapipe from 0.8.8 to 0.8.9.1

    Bumps mediapipe from 0.8.8 to 0.8.9.1.

    Release notes

    Sourced from mediapipe's releases.

    MediaPipe Android Solutions and Hand World Landmarks

    MediaPipe Android Solutions

    MediaPipe Hands

    • MediaPipe Hands models are updated.
    • MediaPipe Hands now supports outputting world landmarks in world coordinates.

    MediaPipe Dependencies

    • MediaPipe Python wheels are now supporting Python 3.10.
    • The MediaPipe dependency library protobuf, tensorflow, cere solver, pybind, and apple support are updated.
    • The recommended Bazel version is updated to 4.2.1.
    • The recommended Android SDK and NDK versions are updated.
    Commits

    Dependabot compatibility score

    Dependabot will resolve any conflicts with this PR as long as you don't alter it yourself. You can also trigger a rebase manually by commenting @dependabot rebase.


    Dependabot commands and options

    You can trigger Dependabot actions by commenting on this PR:

    • @dependabot rebase will rebase this PR
    • @dependabot recreate will recreate this PR, overwriting any edits that have been made to it
    • @dependabot merge will merge this PR after your CI passes on it
    • @dependabot squash and merge will squash and merge this PR after your CI passes on it
    • @dependabot cancel merge will cancel a previously requested merge and block automerging
    • @dependabot reopen will reopen this PR if it is closed
    • @dependabot close will close this PR and stop Dependabot recreating it. You can achieve the same result by closing it manually
    • @dependabot ignore this major version will close this PR and stop Dependabot creating any more for this major version (unless you reopen the PR or upgrade to it yourself)
    • @dependabot ignore this minor version will close this PR and stop Dependabot creating any more for this minor version (unless you reopen the PR or upgrade to it yourself)
    • @dependabot ignore this dependency will close this PR and stop Dependabot creating any more for this dependency (unless you reopen the PR or upgrade to it yourself)
    dependencies 
    opened by dependabot[bot] 0
  • Error when trying to start

    Error when trying to start

    Hello. When I try to start webcam-filters, I get this error:

    # webcam-filters --input-dev /dev/video0 --output-dev /dev/video3
    Selected input: media-type=image/jpeg, width=1280 height=720 framerate=30/1
    Error from /GstPipeline:pipeline0/GstV4l2Sink:v4l2sink0: Cannot identify device '/dev/video3'.
    

    I haven't got video3 device, so error isn't that device is busy. Starting this with different outputs has no effect:

    # webcam-filters --input-dev /dev/video0 --output-dev /dev/video10
    Selected input: media-type=image/jpeg, width=1280 height=720 framerate=30/1
    Error from /GstPipeline:pipeline0/GstV4l2Sink:v4l2sink0: Cannot identify device '/dev/video10'.
    

    I sure that my camera is video0. I installed webcam-filters via pipx, but using nix doesn't fix this error. I have satisfied all dependencies. I use Ach Linux with

    # uname -a
    Linux arch 5.10.70-1-lts #1 SMP Thu, 30 Sep 2021 09:43:10 +0000 x86_64 GNU/Linux
    

    How can I fix this error? Thanks for your help.

    P. S. Sorry for my english, I'm from another county.

    opened by coder8080 9
  • Caps object is not iterable

    Caps object is not iterable

    When running webcam-filters I get the following traceback

    ➜  ~ webcam-filters --verbose --input-dev /dev/video0 --output-dev /dev/video3 --background-blur 150
    
    Traceback (most recent call last):
      File "/home/restore/.local/bin/webcam-filters", line 9, in <module>
        sys.exit(main())
      File "/home/restore/.local/lib/python3.8/site-packages/webcam_filters/__main__.py", line 5, in main
        cli.main(prog_name="webcam-filters")
      File "/home/restore/.local/lib/python3.8/site-packages/click/core.py", line 1062, in main
        rv = self.invoke(ctx)
      File "/home/restore/.local/lib/python3.8/site-packages/click/core.py", line 1404, in invoke
        return ctx.invoke(self.callback, **ctx.params)
      File "/home/restore/.local/lib/python3.8/site-packages/click/core.py", line 763, in invoke
        return __callback(*args, **kwargs)
      File "/home/restore/.local/lib/python3.8/site-packages/webcam_filters/main.py", line 154, in cli
        add_filters(
      File "/home/restore/.local/lib/python3.8/site-packages/webcam_filters/gst.py", line 98, in add_filters
        for s in caps:
    TypeError: 'Caps' object is not iterable
    
    

    I tried different devices but always the same result. Anything else I can check?

    opened by jekkos 12
  • Allow setting output pixel format

    Allow setting output pixel format

    Currently, it's hard-coded to YUY2. Allow setting multiple values from CLI and let gstreamer pick the best compatible one for the pipeline.

    enhancement 
    opened by jashandeep-sohi 0
  • Allow setting a static image or video as the background

    Allow setting a static image or video as the background

    Instead of blurring the background, allow setting a static image or video as the background.

    enhancement 
    opened by jashandeep-sohi 3
Releases(v0.3.0)
Owner
Jashandeep Sohi
Jashandeep Sohi
Webcam Indicator is an application to recieve and send messages from your own Webcam Server.

Welcome to Webcam Indicator ?? Webcam Indicator is an application to recieve and send messages from your own Webcam Server. ?? Homepage Prerequisites

Lorenzo Carbonell 1 Nov 21, 2021
Youtube-dislikes-adder - Add dislikes to the description of your YouTube videos.

Add number of dislikes to the description of your YouTube videos. Number of dislikes are updated if you let this function as a bot.

fluks 1 Jan 10, 2022
Your own movie streaming service. Easy to install, easy to use. Download, manage and watch your favorite movies conveniently from your browser or phone. Install it on your server, access it anywhere and enjoy.

Vigilio Your own movie streaming service. Easy to install, easy to use. Download, manage and watch your favorite movies conveniently from your browser

Tugcan Olgun 129 Jan 18, 2022
Playing videos through S3 buckets (Wasabi, AWS, etc.) through client-side VideoJS player

Playing videos through S3 buckets (Wasabi, AWS, etc.) through client-side VideoJS player without incurring ingress/egree traffic on EC2 Instance.

Syed Umar Arfeen 5 Jun 19, 2021
A Simple Telegram Bot By @Tellybots to add Subtitle Files in Video

Video-subtitle-merger A Simple Telegram Bot By @Tellybots to add Subtitle Files in Video Features Force Sub Button Added Soon Support Media Type Such

null 6 Dec 31, 2021
Add a "flame" effect on each hand's index onto a video stream.

Add a "flame" effect on each hand's index onto a video stream. recording.webm.mov This script is just a quick hack, it's a bit of glue between mediapi

Paul Willot 2 Nov 14, 2021
Add the dislike count back to my YouTube videos via a comment containing that information.

YouTube Dislikes Forrest Knight Python Version 3.0+ Only use if you know what the code actually does. I'm not responsible for your use of this code in

Forrest Knight 140 Jan 8, 2022
Video Editor for Linux

Project on break until late March. NEW RELEASE 2.8 IS OUT NOW. INSTALLING: see here. RELEASE NOTES AVAILABLE here. Introduction Features Releases Inst

null 1.7k Jan 17, 2022
OpenShot Video Editor is an award-winning free and open-source video editor for Linux, Mac, and Windows, and is dedicated to delivering high quality video editing and animation solutions to the world.

OpenShot Video Editor is an award-winning free and open-source video editor for Linux, Mac, and Windows, and is dedicated to delivering high quality v

OpenShot Studios, LLC 2.5k Jan 12, 2022
A python generator that converts youtube videos to ascii art in your console.

Video To ASCII A python generator that converts youtube videos to ascii art in your console. This has not been tested for windows! Example Normal mode

Julian Jones 18 Jan 15, 2022
MPV remote controller is a program for remote controlling mpv player with device in your local network through web browser.

MPV remote controller is a program for remote controlling mpv player with device in your local network through web browser.

null 5 Nov 20, 2021
Docker container to expose a local RTMP, RTSP, and HLS stream for all your Wyze cameras including v3

Docker container to expose a local RTMP, RTSP, and HLS stream for all your Wyze cameras including v3. No Third-party or special firmware required.

null 571 Jan 17, 2022
Techie Sneh 17 Nov 23, 2021
Your self hosted Youtube media server

The Tube Archivist Your self hosted Youtube media server Core functionality Subscribe to your favourite Youtube channels Download Videos using yt-dlp

Simon 774 Jan 13, 2022
Convert lecture videos to slides in one line. Takes an input of a directory containing your lecture videos and outputs a directory containing .PDF files containing the slides of each lecture.

Convert lecture videos to slides in one line. Takes an input of a directory containing your lecture videos and outputs a directory containing .PDF files containing the slides of each lecture.

Sidharth Anand 13 Jan 7, 2022
A GUI based datamoshing apllication for everyone! Apply this glitch to your videos and gifs. Supports all video formats!

A GUI based datamoshing apllication for everyone! Apply this glitch to your videos and gifs. Supports all video formats!

Akascape 7 Jan 14, 2022
Jio TV Server - Watch TV right from your laptop

Jio-PyServer Jio TV - Python Server Watch TV right from your laptop! Requirements: Python 3.X Internet Access A Jio Account Known Issues: Channel Stre

Elvis Tony 2 Dec 25, 2021
VIT - VideoInTerminal. A quick piece of code to play videos in your terminal using python

VIT VIT - VideoInTerminal. A quick piece of code to play videos in your terminal using python.

ShellTear 2 Nov 27, 2021
Add filters (background blur, etc) to your webcam on Linux.

Add filters (background blur, etc) to your webcam on Linux.

Jashandeep Sohi 415 Jan 14, 2022
Simple background blur for your webcam

backgroundblur Simple background blur for your webcam. This script will capture your webcams output, add a blur effect to the background and output th

Stefan Wagner 4 Dec 7, 2021
Virtual webcam that takes real webcam footage and replaces the background in order to have Virtual Backgrounds in MS Teams for Linux where the feature is unimplemented.

Background Remover The Need It's been good long while since Microsoft first released a Teams version for Linux and yet, one of Teams' coolest features

Dylan Turner 71 Dec 31, 2021
[CVPR2021] The source code for our paper 《Removing the Background by Adding the Background: Towards Background Robust Self-supervised Video Representation Learning》.

TBE The source code for our paper "Removing the Background by Adding the Background: Towards Background Robust Self-supervised Video Representation Le

Jinpeng Wang 135 Dec 23, 2021
Webcam Indicator is an application to recieve and send messages from your own Webcam Server.

Welcome to Webcam Indicator ?? Webcam Indicator is an application to recieve and send messages from your own Webcam Server. ?? Homepage Prerequisites

Lorenzo Carbonell 1 Nov 21, 2021
Opencv-image-filters - A camera to capture videos in real time by placing filters using Python with the help of the Tkinter and OpenCV libraries

Opencv-image-filters - A camera to capture videos in real time by placing filters using Python with the help of the Tkinter and OpenCV libraries

Sergio Díaz Fernández 1 Jan 13, 2022
A simple program to recolour simple png icon-like pictures with just one colour + transparent or white background. Resulting images all have transparent background and a new colour.

A simple program to recolour simple png icon-like pictures with just one colour + transparent or white background. Resulting images all have transparent background and a new colour.

Anna Tůmová 1 Jan 10, 2022
Blender add-on: Add to Cameras menu: View → Camera, View → Add Camera, Camera → View, Previous Camera, Next Camera

Blender add-on: Camera additions In 3D view, it adds these actions to the View|Cameras menu: View → Camera : set the current camera to the 3D view Vie

German Bauer 1 Dec 14, 2021
A Linux webcam plugin for BGMv2 as used in our demos.

The goal of this repository is to supplement the main Real-Time High Resolution Background Matting repo with a working demo of a videoconferencing plu

Andrey Ryabtsev 126 Jan 12, 2022