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

After pull request "Move inotify checks to separate thread #162" the solution is broken #163

Closed danielpaivapereira closed 3 years ago

danielpaivapereira commented 3 years ago

Good Morning,

Below is the error that occurs after the last pull request.

It loads the background image but freezes immediately after the first frame.


python3 fake.py -v /dev/video20 --no-foreground

INFO: Created TensorFlow Lite XNNPACK delegate for CPU. Real camera original values are set as: 640x480 with 30 FPS and video codec 1448695129 Cannot set camera property 6 to 1196444237. Defaulting to auto-detected property set by opencv Cannot set camera property 3 to 1280. Defaulting to auto-detected property set by opencv Cannot set camera property 4 to 720. Defaulting to auto-detected property set by opencv Real camera new values are set as: 640x480 with 30 FPS and video codec 1448695129 Running... Please CTRL-C to pause and reload the background / foreground images Please CTRL-\ to exit No consumers remaining, paused No consumers remaining, paused Consumers: 1 Real camera original values are set as: 640x480 with 30 FPS and video codec 1448695129 Cannot set camera property 6 to 1196444237. Defaulting to auto-detected property set by opencv Real camera new values are set as: 640x480 with 30 FPS and video codec 1448695129 Consumers: 1 Consumers: 1 Consumers: 1 Traceback (most recent call last): File "fake.py", line 515, in main() File "fake.py", line 511, in main cam.run() File "fake.py", line 339, in run frame = self.compose_frame(frame) File "fake.py", line 275, in compose_frame background_frame = next(self.images["background"]) KeyError: 'background' Consumers: 1 Consumers: 1 Consumers: 1 Consumers: 1 No consumers remaining, paused No consumers remaining, paused ^\ Killing fake cam process Exception ignored in: <module 'threading' from '/usr/lib/python3.8/threading.py'> Traceback (most recent call last): File "/usr/lib/python3.8/threading.py", line 1388, in _shutdown lock.acquire() File "fake.py", line 470, in sigquit_handler sys.exit(0) SystemExit: 0


fangfufu commented 3 years ago

Thank you for opening the issue. I have reverted the merge by rolling back history.