Comments (13)
@jashandeep-sohi: Yes they are. Don't know whats causing it. I created a Dockerfile instead, since I considered that more useful as an alternative to nix than fixing user system specific stuff. Maybe it'd be worth adding that to the repo with an a bit more generalized start.sh.
Dockerfile
FROM ubuntu:impish
ENV DEBIAN_FRONTEND="noninteractive"
RUN apt-get update && \
apt-get install -y --no-install-recommends \
python3.9 \
python3-pip \
python3-gi python3-gi-cairo gir1.2-gtk-3.0 \
gstreamer1.0-plugins-good gstreamer1.0-plugins-base-apps gstreamer1.0-x python3-gst-1.0 gstreamer1.0-python3-plugin-loader
RUN pip install --pre webcam-filters
COPY start.sh .
CMD ["/bin/bash","start.sh"]
start.sh
#!/bin/bash
webcam-filters --input-dev /dev/video0 --output-dev /dev/video10 --background-blur 150
$ docker run --device=/dev/video0:/dev/video0 --device=/dev/video10:/dev/video10 webcam-filters
from webcam-filters.
Apologies for the delayed response.
@hs-neax Happy to discuss any contributions in a PR. My reasoning for using Nix vs Docker was to have as "native" an experience as possible without having to mount any devices into a container run by the docker daemon (as root). It's been flaky for me in the past.
I don't mind adding a Dockerfile if that makes life easier, but I'm not sure I want to maintain a parallel file with dependencies for installing this. If possible, I'd prefer it if the Dockerfile also installed it using Nix or the container was built using Nix. And then CI can just push the image out to a public repository.
@DmitrySandalov Sounds good! I did pin #11, but it's probably a good idea to add that to the README.
from webcam-filters.
What happens when you do a webcam-filters --list-dev-caps /dev/video0
(or whichever /dev/videoX
is your actual webcam)?
from webcam-filters.
I get the same message in fact. I double checked if I can change some setting on this device, it seems fine.
sudo v4l2-ctl --set-ctrl=exposure_absolute=90 -d /dev/video0
this works
➜ ~ webcam-filters --list-dev-caps /dev/video0
<Gst.Caps object at 0x7f382db4f100 (GstCaps at 0x26e9940)>
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 1061, in main
with self.make_context(prog_name, args, **extra) as ctx:
File "/home/restore/.local/lib/python3.8/site-packages/click/core.py", line 923, in make_context
self.parse_args(ctx, args)
File "/home/restore/.local/lib/python3.8/site-packages/click/core.py", line 1379, in parse_args
value, args = param.handle_parse_result(ctx, opts, args)
File "/home/restore/.local/lib/python3.8/site-packages/click/core.py", line 2364, in handle_parse_result
value = self.process_value(ctx, value)
File "/home/restore/.local/lib/python3.8/site-packages/click/core.py", line 2326, in process_value
value = self.callback(ctx, self, value)
File "/home/restore/.local/lib/python3.8/site-packages/webcam_filters/gst.py", line 369, in print_device_caps
for c in caps:
TypeError: 'Caps' object is not iterable
from webcam-filters.
Did you install all of the system dependencies? Specifically, is gst-python
installed and what version? #5 is similar and they needed python3-gst-1.0
on Ubuntu.
If that doesn't fix it or you run into other dependency issues, I'd recommend installing with https://github.com/jashandeep-sohi/webcam-filters#nix. There are too many variations in gstreamer dependencies between distros, and I've found Nix to be the best way to ensure everyone's working with the same versions.
from webcam-filters.
I'm having the same issue on an up-to-date arch:
gst-python 1.18.5-1
gstreamer 1.18.5-1
Python 3.9.7
from webcam-filters.
Ok the error went away after running
sudo apt install python3-gst-1.0
can be closed, thx
from webcam-filters.
Wait, now I'm seeing this error
Error from /GstPipeline:pipeline0/GstV4l2Sink:v4l2sink0: Could not open device '/dev/video2' for reading and writing.
my video2 device is a virtual one created by v4l2 loopback. Any idea why this is?
from webcam-filters.
Wait, now I'm seeing this error
Error from /GstPipeline:pipeline0/GstV4l2Sink:v4l2sink0: Could not open device '/dev/video2' for reading and writing.
my video2 device is a virtual one created by v4l2 loopback. Any idea why this is?
What are the kernel mod parameters you created this device with?
To rule out if this is a problem with webcam-filters
can you run the following basic gstreamer pipeline:
gst-launch-1.0 -v v4l2src device=/dev/video0 ! videoconvert ! video/x-raw, format=YUY2 ! v4l2sink device=/dev/video2
from webcam-filters.
I'm having the same issue on an up-to-date arch: gst-python 1.18.5-1 gstreamer 1.18.5-1 Python 3.9.7
@hs-neax Is gst-plugins-base
and gst-plugins-good
also installed?
from webcam-filters.
Please add Ubuntu installation instructions to README.md
from webcam-filters.
@jashandeep-sohi: Sorry for the big delay. I understand your point about maintenance and made PR with a simple Docker container wrapping a Nix installation. I'm using it for a while now and it's working well.
from webcam-filters.
I get the same error on openSUSE Tumbleweed 20221124. All dependencies seem to be installed.
Could you please post a command line equivalent of a pipeline produced by the package?
from webcam-filters.
Related Issues (20)
- Add a Nix package
- Cannot install on Ubuntu 22.04.2 LTS HOT 3
- Unable to use it with NixOS and Intel Graphics HD
- Can't install because of Python version HOT 1
- [DOC] Install on Ubuntu 21.04 HOT 1
- Python plugins not loading on OpenSUSE HOT 10
- Allow setting a static image or video as the background HOT 3
- GStreamer plugin selfie_seg does not exist HOT 2
- Hardware acceleration does not work with the radeonsi driver HOT 24
- Add an option to control what VAAPI features are enabled
- GStreamer-CRITICAL **: The created element should be floating, this is probably caused by faulty bindings
- Allow setting output pixel format
- ModuleNotFoundError: No module named 'gi' HOT 2
- Error when trying to start HOT 9
- Add option to enable VAAPI hardware acceleration
- numpy_where element does not negoitate cap correctly HOT 6
- AttributeError: __enter__ when running with blur HOT 4
- Nothing in readme about needing Python < 3.10 HOT 1
- Caps is not iterable HOT 4
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from webcam-filters.