Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

OSError: [Errno 22] Invalid argument #2

Open
uninhm opened this issue May 10, 2020 · 3 comments
Open

OSError: [Errno 22] Invalid argument #2

uninhm opened this issue May 10, 2020 · 3 comments

Comments

@uninhm
Copy link

uninhm commented May 10, 2020

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.

@fisadev
Copy link
Owner

fisadev commented May 10, 2020

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)

@uninhm
Copy link
Author

uninhm commented May 10, 2020

$ 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

@fisadev
Copy link
Owner

fisadev commented May 10, 2020

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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants