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 #181

Open
brunofunnie opened this issue Aug 17, 2022 · 1 comment
Open

OSError: [Errno 22] Invalid argument #181

brunofunnie opened this issue Aug 17, 2022 · 1 comment

Comments

@brunofunnie
Copy link

brunofunnie commented Aug 17, 2022

I'm having this error when running the command below, any ideas?

$ python3 fake.py -c ./config-example.ini
INFO: Created TensorFlow Lite XNNPACK delegate for CPU.
Real camera original values are set as: 640x480 with 30 FPS and video codec 1448695129
Real camera new values are set as: 1280x720 with 30 FPS and video codec 1196444237
Traceback (most recent call last):
File "/home/bruno/Downloads/fakecam/fake.py", line 495, in <module>
main()
File "/home/bruno/Downloads/fakecam/fake.py", line 484, in main
cam = FakeCam(args)
File "/home/bruno/Downloads/fakecam/fake.py", line 120, in __init__
self.fake_cam = pyfakewebcam.FakeWebcam(self.v4l2loopback_path, self.width,
File "/home/bruno/.local/lib/python3.10/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

My config file:

width = 1280
height = 720
fps = 30
; no-background = yes
background-keep-aspect = yes
no-foreground = yes
webcam-path = /dev/video0
threshold = 50

v4l2loopback

cat /proc/modules | grep -i v4l2loopback
v4l2loopback 49152 0 - Live 0x0000000000000000 (O)
videodev 258048 5 akvcam,v4l2loopback,uvcvideo,videobuf2_v4l2,videobuf2_common, Live 0x0000000000000000

My devices:

$ v4l2-ctl --list-devices
fake-cam (platform:v4l2loopback-000):
/dev/video2

Integrated_Webcam_HD: Integrate (usb-0000:00:14.0-6):
/dev/video0
/dev/video1
/dev/media0

Hardware/OS:
image

@dabal
Copy link

dabal commented Aug 18, 2022

Have you try to resolve this issue with answers from #170 ? I've also had this issue and in my case this command do the job:
python3 fake.py --webcam-path /dev/video2 --v4l2loopback-path /dev/video4 so if you adjusted this to your configuration it would look like this python3 fake.py --webcam-path /dev/video0 --v4l2loopback-path /dev/video2

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