Skip to content
allo- edited this page Oct 13, 2020 · 1 revision

Error:

Traceback (most recent call last):
  File "./virtual_webcam.py", line 101, in <module>
    fakewebcam = FakeWebcam(config.get("virtual_video_device"), width, height)
  File "/path/to/venv/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

The program cannot write to the virtual video device.

  • 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).

Clone this wiki locally