virtualbackground icon indicating copy to clipboard operation
virtualbackground copied to clipboard

OSError: [Errno 22] Invalid argument

Open uninhm opened this issue 5 years ago • 3 comments

When I run python3 viba.py --background sample_background.jpg

2020-05-10 17:15:19,906|INFO|viba|TensorflowJS model found on disk
2020-05-10 17:15:20,262|INFO|viba|TensorflowJS model mobilenet_quant4_100_stride16 loaded
2020-05-10 17:15:20,509|INFO|viba|Real camera initialized at device /dev/video0, resolution (640, 480) and fps 30
Traceback (most recent call last):
  File "viba.py", line 408, in <module>
    main()
  File "/home/unai/Escritorio/virtualbackground-master/env/lib/python3.8/site-packages/click/core.py", line 829, in __call__
    return self.main(*args, **kwargs)
  File "/home/unai/Escritorio/virtualbackground-master/env/lib/python3.8/site-packages/click/core.py", line 782, in main
    rv = self.invoke(ctx)
  File "/home/unai/Escritorio/virtualbackground-master/env/lib/python3.8/site-packages/click/core.py", line 1066, in invoke
    return ctx.invoke(self.callback, **ctx.params)
  File "/home/unai/Escritorio/virtualbackground-master/env/lib/python3.8/site-packages/click/core.py", line 610, in invoke
    return callback(*args, **kwargs)
  File "viba.py", line 396, in main
    fake_cam=Cam(
  File "viba.py", line 41, in __init__
    self.init_fake_cam()
  File "viba.py", line 60, in init_fake_cam
    self.interface = pyfakewebcam.FakeWebcam(self.device, self.width, self.height)
  File "/home/unai/Escritorio/virtualbackground-master/env/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

That's the full output. I've installed all dependencies.

uninhm avatar May 10 '20 20:05 uninhm

Can you post the output of this?

sudo apt install v4l-utils
ls /dev | grep -P '^video\d+$' 
v4l2-ctl --list-devices

(assuming you are under ubuntu or debian, otherwise the first line should change to use the package manager of your distro)

fisadev avatar May 10 '20 20:05 fisadev

$ ls /dev | grep -P '^video\d+$'
video0
video1
video20
$ v4l2-ctl --list-devices
viba_cam (platform:v4l2loopback-000):
	/dev/video20

Integrated Camera: Integrated C (usb-0000:00:14.0-7):
	/dev/video0
	/dev/video1

uninhm avatar May 10 '20 20:05 uninhm

Ok, everything seems fine from the viba side. In this issue from pyfakewebcam they mention (scroll to the last comment) that this might be a problem between v4l2loopback and some kernel versions :( A proposed solution is to compile a newer version of v4l2loopback.

fisadev avatar May 10 '20 21:05 fisadev