Comments (6)
Very interesting. 🤔
Definitely need to improve the logging, but it looks like a buffer coming into the last element (that merges the foreground and blurred background) was not the expected size.
- What happens if you just run it in pass-through mode? (i.e. omit
--background-blur
) - Can you post
GST_DEBUG=4
output?
from webcam-filters.
Very interesting. thinking
Definitely need to improve the logging, but it looks like a buffer coming into the last element (that merges the foreground and blurred background) was not the expected size.* What happens if you just run it in pass-through mode? (i.e. omit `--background-blur`)
$ webcam-filters --input-dev /dev/video0 --output-dev /dev/video3
Selectd input: media-type=image/jpeg, width=1280 height=720 framerate=30/1
gst-stream-error-quark: Internal data stream error. (1): ../libs/gst/base/gstbasesrc.c(3127): gst_base_src_loop (): /GstPipeline:pipeline0/GstV4l2Src:v4l2src1:
streaming stopped, reason not-negotiated (-4)
* Can you post `GST_DEBUG=4` output?
This is a big one, I've pasted it here.
from webcam-filters.
Initial thoughts -- I think there are two problems:
- Your
v4l2sink
reports it only supports1920x1080
, while the input we've selected is1080x720
. Which is why the pass-thorugh mode fails to link. Seems like the v4l2loopback device is stuck at1920x1080
. Did you by any chance setkeep_format
to 1, as described in https://github.com/umlaeute/v4l2loopback#attributes or force a format https://github.com/umlaeute/v4l2loopback#forcing-format ? - Thanks to the above problem, we know there's a bug in how I'm negotiating caps with
v4l2sink
, which causes the pipeline to run and then fail when it comes across a buffer that's smaller than whatv4l2sink
expects. It should actually fail at the caps negotiation part.
from webcam-filters.
No, I haven't set any control, they are all at default values:
$ v4l2-ctl -d /dev/video3 -l
User Controls
keep_format 0x0098f900 (bool) : default=0 value=0
sustain_framerate 0x0098f901 (bool) : default=0 value=0
timeout 0x0098f902 (int) : min=0 max=100000 step=1 default=0 value=0
timeout_image_io 0x0098f903 (bool) : default=0 value=0
I haven't forced any format neither, but I don't know how to query the caps on the v4l2loopback device.
from webcam-filters.
OK, forget it... I found the culprit.
FTR, I had a dead (?) process guvcview
holding an instance of /dev/video3
open. I found it using, being root, lsof /dev/video3
.
After killing it I could modprobe -r v4l2loopback
then modprobe v4l2loopback
again and now it is OK.
Sorry for the noise but maybe this noise can help someone else. Also, you're right, it could be great to get more error handling and caps negotiation could be better. But thanks a lot for your work.
from webcam-filters.
OK, forget it... I found the culprit.
FTR, I had a dead (?) processguvcview
holding an instance of/dev/video3
open. I found it using, being root,lsof /dev/video3
.
After killing it I couldmodprobe -r v4l2loopback
thenmodprobe v4l2loopback
again and now it is OK.
Sorry for the noise but maybe this noise can help someone else. Also, you're right, it could be great to get more error handling and caps negotiation could be better. But thanks a lot for your work.
Ah, nice catch!
No worries, without this "noise" probably wouldn't have run into the bug of the numpy_where element doing incorrect caps negotiation. I'm gonna leave this issue open to track that.
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
- Caps object is not iterable HOT 13
- ModuleNotFoundError: No module named 'gi' HOT 2
- Error when trying to start HOT 9
- Add option to enable VAAPI hardware acceleration
- 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.