allo-/virtual_webcam_background

virtual_webcam.py errors out immediately

callegar opened this issue · 3 comments

Hi,
I am getting this:

./virtual_webcam.py 
2020-10-13 13:35:23.162215: W tensorflow/stream_executor/platform/default/dso_loader.cc:59] Could not load dynamic library 'libcudart.so.10.1'; dlerror: libcudart.so.10.1: cannot open shared object file: No such file or directory; LD_LIBRARY_PATH: /usr/local/lib:/home/callegar/lib:/home/callegar/lib32
2020-10-13 13:35:23.162238: I tensorflow/stream_executor/cuda/cudart_stub.cc:29] Ignore above cudart dlerror if you do not have a GPU set up on your machine.
Reloading config.
2020-10-13 13:35:24.086735: W tensorflow/stream_executor/platform/default/dso_loader.cc:59] Could not load dynamic library 'libcuda.so.1'; dlerror: libcuda.so.1: cannot open shared object file: No such file or directory; LD_LIBRARY_PATH: /usr/local/lib:/home/callegar/lib:/home/callegar/lib32
2020-10-13 13:35:24.086756: W tensorflow/stream_executor/cuda/cuda_driver.cc:312] failed call to cuInit: UNKNOWN ERROR (303)
2020-10-13 13:35:24.086771: I tensorflow/stream_executor/cuda/cuda_diagnostics.cc:156] kernel driver does not appear to be running on this host (jakmandolino): /proc/driver/nvidia/version does not exist
Traceback (most recent call last):
  File "./virtual_webcam.py", line 101, in <module>
    fakewebcam = FakeWebcam(config.get("virtual_video_device"), width, height)
  File "/home/callegar/PythonEnvs/Py-Virtualcam/lib/python3.8/site-packages/pyfakewebcam/pyfakewebcam.py", line 54, in __init__
    fcntl.ioctl(self._video_device, _v4l2.VIDIOC_S_FMT, self._settings)
OSError: [Errno 22] Invalid argument

It is my understanding that the software should work even without CUDA or nvidia GPUs, and the first errors are innocuous. Is this correct?
The last error, conversely is critical. Any idea where this could come from?

I have the real webcam set to video2, checked with webcamoid and the virtual one to a video device that seems free.

allo- commented

tensorflow should fall back to CPU mode (or you can explicitely install tensorflow-cpu). Your error seems to be that the virtual video device cannot be accessed.

  • Make sure that v4l2loopback is loaded
  • Make sure that the path to the device is correct, it needs to be a path, e.g., /dev/video2
  • Make sure you have the permission to write to the device (short term: chown user:user /dev/videoX, permanent (most linux distributions): Add your users to the group video and you should be able to use the device after the next login).
  • Make sure no other program is accessing the device (for writing).

Solved, sorry for the noise. I had the device that was evidently being locked by something. Restarting the desktop fixed the issue.

allo- commented

Good to hear it's working for you now.

I added a basic troubleshooting wiki page with the hints, which can be extended for other problems.