fangfufu / Linux-Fake-Background-Webcam

Faking your webcam background under GNU/Linux, now supports background blurring, animated background, colour map effect, hologram effect and on-demand processing.
GNU General Public License v3.0
1.6k stars 161 forks source link

backend is generally available but can't be used to capture by name #207

Open ufechner7 opened 4 months ago

ufechner7 commented 4 months ago

I try to run:

lfbw --no-ondemand -v /dev/video2

and get the output:

WARNING: All log messages before absl::InitializeLog() is called are written to STDERR
I0000 00:00:1716634070.527626   12896 gl_context_egl.cc:85] Successfully initialized EGL. Major : 1 Minor: 5
I0000 00:00:1716634070.574726   12958 gl_context.cc:357] GL version: 3.2 (OpenGL ES 3.2 NVIDIA 535.171.04), renderer: NVIDIA GeForce RTX 3060/PCIe/SSE2
[ WARN:0@0.386] global cap.cpp:204 open VIDEOIO(V4L2): backend is generally available but can't be used to capture by name
Failed to open camera: /dev/video0. retrying...
INFO: Created TensorFlow Lite XNNPACK delegate for CPU.
[ WARN:0@1.388] global cap.cpp:204 open VIDEOIO(V4L2): backend is generally available but can't be used to capture by name
Failed to open camera: /dev/video0. retrying...
^CTraceback (most recent call last):
  File "/home/ufechner/.local/bin/lfbw", line 8, in <module>
    sys.exit(main())
  File "/home/ufechner/.local/lib/python3.10/site-packages/lfbw/lfbw.py", line 547, in main
    cam = FakeCam(args)
  File "/home/ufechner/.local/lib/python3.10/site-packages/lfbw/lfbw.py", line 123, in __init__
    self.real_cam = RealCam(self.webcam_path,
  File "/home/ufechner/.local/lib/python3.10/site-packages/lfbw/lfbw.py", line 24, in __init__
    time.sleep(1)
KeyboardInterrupt

My video devices:

ufechner@ufryzen:~/repos/Linux-Fake-Background-Webcam$ ls -l /dev/video*
crw-rw----+ 1 root video 81, 0 mei 25 11:41 /dev/video0
crw-rw----+ 1 root video 81, 1 mei 25 11:41 /dev/video1
crw-rw----+ 1 root video 81, 2 mei 25 11:41 /dev/video2
crw-rw----+ 1 root video 81, 3 mei 25 11:41 /dev/video3

Any ideas how to debug this issue?

Using:

ffplay /dev/video2

shows the webcam content on the screen...

fangfufu commented 3 weeks ago

Have you tried running this without the on-demand mode?