Closed coro1404 closed 3 years ago
exception is raised by:
pyfakewebcam/pyfakewebcam.py", line 68, in schedule_frame
Maybe you can have a look into the code, when you wrote quite similar test code anyway. From your example code it looks like you're explictely requesting XVID. Can you add this line to the program and look if it works for you? We have a similar option for MJPEG and when needed we could add a configuration option for the fourcc setting.
ok problem solved: the script cannot change the resolution as long as any app holds an open filehandle on /dev/videoX (even ist no video output is requested). MS Teams for example keeps a lock without displaying a video - identifying the process via lsof an killing it allows the script to change resolution on next start.
Regarding the XVID - I took possible options from here: https://docs.opencv.org/master/dd/d43/tutorial_py_video_display.html
In Fedora: DIVX, XVID, MJPG, X264, WMV1, WMV2. (XVID is more preferable. MJPG results in high size video. X264 gives very small size video)
and tried them instead of MJPG but I could not see a significant performance change.
Thanks for your help I will close this issue next
I guess that's why chrome requires the device to have exclusive_caps set. If one program expects frames with the current settings, another program should not change the setting. If the device is only opened when used depends on the program. Maybe MS Teams locks the device to make sure it will be able to set the resolution when you turn on the camera. I added this to the FAQ issue, so it can be added to the documentation.
I close the issue now. If there is still a code issue or you see a good point how to integrate a function that detects why the resolution cannot be changed, you can reopen it, but I consider it to be a documentation issue and added it to #59.
trying to adjust config file values width and hight to actual webcam resolution fails with error message:
Checking camera resolution with this code lists 1920 x 1080 as capability:
results in 1920 1080
config file is set to:
any hints on how to set the resolution? It always remains on 640x480