skillfed

dxcam

A Python high-performance screenshot library for Windows using Desktop Duplication API

dxcam v0.3.0 144.8K downloads/30d#11,142 on PyPI802
Permissive license MIT Active released

What it is and what it does

DXcam is a Windows-only Python library for capturing screen frames at high speed using the Desktop Duplication API. It wraps low-level DXGI or WinRT capture backends and returns frames as numpy arrays, making it suitable for real-time video pipelines, AI agent vision systems, and computer vision workflows that need low-latency, high-FPS access to screen content.

The library supports both one-shot frame grabs and continuous capture with an in-memory ring buffer, optional region cropping, multiple output color formats (RGB, RGBA, BGR, BGRA, GRAY), and frame timestamps. It depends on comtypes for Windows COM interop and numpy for array handling. Wheels are pre-built for Python 3.10–3.14 on Windows; source builds require Cython compilation for optimal performance.

Use it for:

  • Capture game or application screens at 60+ fps for real-time AI agent vision or computer vision analysis.
  • Record full-screen Direct3D applications with stable, low-latency frame delivery for video encoding.
  • Grab individual frames from multiple monitors or GPU outputs for multi-display monitoring systems.
  • Build screen-based automation or testing pipelines that need precise frame timing and region selection.
  • Stream desktop content to machine learning models with minimal latency overhead.

Worth the install?

AI-flagged interpretation of the facts on this page — verify before relying

DXcam captures screen frames on Windows at high speed using the Desktop Duplication API, returning numpy arrays for direct use in video pipelines or computer vision workflows.

Yes, if you are on Windows and need high-speed screen capture for video, AI, or computer vision work. The active maintenance, permissive MIT license, and native support for Direct3D apps make it a solid choice over slower alternatives. Install friction is moderate (Windows-only, Python 3.10+, two dependencies), but no known vulnerabilities and recent releases reduce risk.

Install

dxcam on PyPI

pip

pip install dxcam

uv

uv add dxcam

poetry

poetry add dxcam

Installing dxcam

Before you install

Medium install friction: Windows-only wheels for Python 3.10–3.14 with two runtime dependencies (comtypes, numpy). Active maintenance with recent releases; repo shows 802 stars and last commit 2026-03-18.

License in practice

MIT license permits commercial and private use with minimal restrictions; suitable for most projects without legal friction.

Quickstart

pip install dxcam

import dxcam

with dxcam.create() as camera:
    frame = camera.grab()  # returns numpy.ndarray

Windows 10+ required; comtypes and numpy must be installed; Python 3.10 or later.

Verify before relying

  • Whether the 240+fps throughput claim on 1080p holds across typical hardware configurations.
  • Performance characteristics of the winrt backend relative to dxgi on modern Windows 11 systems.
  • Behavior and overhead when capturing multiple monitors or GPU devices simultaneously.

Package facts

License MIT (permissive)
Python support supports the current Python release (>=3.10)
Install friction medium — platform-specific wheel
Runtime dependencies 2 — comtypes, numpy
Maintenance actively maintained — 155 days since the last release
Last repo commit
First released
Downloads 144,806/month — #11,142 on PyPI (30-day window, as of 2026-08-14)
Known vulnerabilities none known (OSV.dev, checked 2026-08-14)

Evidence: dxcam-0.3.0-cp310-cp310-win_amd64.whl; dxcam-0.3.0-cp311-cp311-win_amd64.whl; dxcam-0.3.0-cp312-cp312-win_amd64.whl; dxcam-0.3.0-cp313-cp313-win_amd64.whl; dxcam-0.3.0-cp314-cp314-win_amd64.whl

Keywords: screen, screenshot, screencapture, screengrab, windows

Development Status :: 4 - BetaIntended Audience :: DevelopersOperating System :: Microsoft :: WindowsOperating System :: Microsoft :: Windows :: Windows 10Operating System :: Microsoft :: Windows :: Windows 11Programming Language :: Python :: 3Programming Language :: Python :: 3 :: OnlyProgramming Language :: Python :: 3.10Programming Language :: Python :: 3.11Programming Language :: Python :: 3.12Programming Language :: Python :: 3.13Programming Language :: Python :: 3.14Topic :: Multimedia :: GraphicsTopic :: Multimedia :: Graphics :: CaptureTopic :: Multimedia :: Graphics :: Capture :: Screen Capture

Tags

windows screen capturehigh-fps screenshot librarydesktop duplication api pythonlow-latency frame grabdirect3d screen recordingnumpy frame capturewindows video capture
windows-onlyreal-time-capturecomputer-vision

More Graphics packages