Open x64x70 opened 8 months ago
hey 0xDEITY,
Per the exception: 'The specified device interface or feature level is not supported on this system.'
When creating the instance keep it simple unless you need to, like setting 2 gpu or 2 monitors. In my case, I noticed NOT setting the "device" or "output" helps, and only to define the "region", as code below
camera = dxcam.create(region=region)
Also you may check if "dxcam.device_info()", "dxcam.output_info()", for more details.
Running this code works if you run it for one or multiple instances in the same scope.
I'm using version 0.0.5 and I'm having the same "is_capturing" issue but with different details related to "available resources", details:
output.output.DuplicateOutput(device.device, ctypes.byref(self.duplicator)) _ctypes.COMError: (-2005270494, 'A resource is not available at the time of the call, but may become available later.', (None, None, None, 0, None))
The way I'm able to reproduce this issue is when using multiple instances in different parallel scopes/threads such as SubProcVecEnv, each instance needs a dxcam on a specific region, so on the 3rd or 4th instance created the 'is_capturing' error is thrown, probably by its duplicator nature and resource handling.
My workaround was to provide specific resource time when creating a dxcam instance to avoid all instances creating the cam simultaneously aka "Delayed Start", and at the end releasing properly the instance with ".release" or "del".
I have 2 graphic cards in my computer. I have the same issue with you too. Here is how I solved this problem image image I changed my graphic preference from Nvidia Geforce RTX 3060 to AMD Radeon(TM) Graphics. Then the problem solved. Hope it was helpful to you. Wish you have a nice day~
P.S. Graphics settings -> find python.exe -> Graphic preference -> Power saving
So I had working code yesterday. I didn't change a thing. Now suddenly dxcam is throwing this error:
I don't understand why this is happening. I don't think it is an issue with my code.