SerpentAI / D3DShot

Extremely fast and robust screen capture on Windows with the Desktop Duplication API
MIT License
328 stars 74 forks source link

COMError at create() #34

Closed mcagricaliskan closed 2 years ago

mcagricaliskan commented 4 years ago
import time
import d3dshot

screen = d3dshot.create(capture_output="numpy")
  File "C:\Users\mehmet\AppData\Roaming\Python\Python37\site-packages\d3dshot\display.py", line 69, in _initialize_dxgi_output_duplication
    self.dxgi_output, self.d3d_device
  File "C:\Users\mehmet\AppData\Roaming\Python\Python37\site-packages\d3dshot\dll\dxgi.py", line 284, in initialize_dxgi_output_duplication
    dxgi_output.DuplicateOutput(d3d_device, ctypes.byref(dxgi_output_duplication))
_ctypes.COMError: (-2005270524, 'Belirtilen aygıt arabirimi veya özellik düzeyi bu sistemde desteklenmiyor.', (None, None, None, 0, None))

Thats Turkish 'Belirtilen aygıt arabirimi veya özellik düzeyi bu sistemde desteklenmiyor." but in English "The specified device interface or feature level is not supported on this system."

RTX2060, Laptop, Windows 10 version 2004

I unistalled nvidia driver 452.06 and its work but with drivers it dosent work!

import time
import d3dshot
import cv2

screen = d3dshot.create(capture_output="numpy")
print(screen.display)

image

Pro100rus32 commented 3 years ago

I have exactly the same problem! I join. I can't even see the information about the displays

Traceback (most recent call last):
  File "E:\ChatBotAI\AiCharli.py", line 4, in <module>
    screen = d3dshot.create(capture_output="numpy")
  File "C:\Users\andre\AppData\Local\Programs\Python\Python38\lib\site-packages\d3dshot\__init__.py", line 68, in create
    d3dshot = D3DShot(
  File "C:\Users\andre\AppData\Local\Programs\Python\Python38\lib\site-packages\d3dshot\d3dshot.py", line 17, in __call__
    cls._instances[cls] = super(Singleton, cls).__call__(*args, **kwargs)
  File "C:\Users\andre\AppData\Local\Programs\Python\Python38\lib\site-packages\d3dshot\d3dshot.py", line 37, in __init__
    self.detect_displays()
  File "C:\Users\andre\AppData\Local\Programs\Python\Python38\lib\site-packages\d3dshot\d3dshot.py", line 215, in detect_displays
    self.displays = Display.discover_displays()
  File "C:\Users\andre\AppData\Local\Programs\Python\Python38\lib\site-packages\d3dshot\display.py", line 119, in discover_displays
    display = cls(
  File "C:\Users\andre\AppData\Local\Programs\Python\Python38\lib\site-packages\d3dshot\display.py", line 39, in __init__
    self.dxgi_output_duplication = self._initialize_dxgi_output_duplication()
  File "C:\Users\andre\AppData\Local\Programs\Python\Python38\lib\site-packages\d3dshot\display.py", line 68, in _initialize_dxgi_output_duplication
    return d3dshot.dll.dxgi.initialize_dxgi_output_duplication(
  File "C:\Users\andre\AppData\Local\Programs\Python\Python38\lib\site-packages\d3dshot\dll\dxgi.py", line 284, in initialize_dxgi_output_duplication
    dxgi_output.DuplicateOutput(d3d_device, ctypes.byref(dxgi_output_duplication))
_ctypes.COMError: (-2005270524, 'Указанный интерфейс устройства или уровень компонента не поддерживается в данной системе.', (None, None, None, 0, None))
Muhammadyusuf96 commented 3 years ago

@mcagricaliskan @Pro100rus32 Select the power saving mode on the control panel of the installed video card.

xiaochuan-li commented 3 years ago

same error, is there any idea about it?

Hellikandra commented 3 years ago

The error code provide by the COM is : DXGI_ERROR_DEVICE_REMOVED.

on Nvidia : https://www.nvidia.com/en-us/geforce/forums/geforce-experience/14/150018/dxgi-error-device-removed/

Maybe you can found a solution over there.