dxcam
A Python high-performance screenshot library for Windows using Desktop Duplication API
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 dxcamuv
uv add dxcampoetry
poetry add dxcamInstalling 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
Tags
More Graphics packages
Pillow adds image processing capabilities to…
permissive · top 100 on PyPI
fonttoolsfonttools manipulates font files in multiple…
permissive · top 1,000 on PyPI
matplotlib-inlineEnables matplotlib figures to display inline…
permissive · top 1,000 on PyPI
pymupdfPyMuPDF extracts, renders, converts, and…
agpl · top 1,000 on PyPI
pypdfium2pypdfium2 is a Python binding to PDFium that…
permissive · top 1,000 on PyPI
altairAltair is a declarative Python library for…
permissive · top 1,000 on PyPI
mssCaptures screenshots from one or all monitors…
permissive · top 5,000 on PyPI
pygrabberCapture photos and video from Windows cameras…
permissive · top 15,000 on PyPI
scenedetectDetects scene cuts and shot changes in videos,…
permissive · top 5,000 on PyPI
winrt-Windows.Graphics.ImagingProvides Python bindings to Windows Runtime…
permissive · top 15,000 on PyPI
PyScreezePyScreeze captures screenshots and locates…
permissive · top 5,000 on PyPI
streamlit-camera-input-liveProvides a Streamlit component that captures…
unclear · top 15,000 on PyPI
pyscreenshotCaptures screenshots to Pillow images using…
permissive · top 15,000 on PyPI
pyrealsense2Python wrapper for Intel RealSense SDK 2.0 that…
permissive · top 15,000 on PyPI
imageio-ffmpegProvides a simple Python wrapper around ffmpeg…
permissive · top 5,000 on PyPI
motioneye-clientAn async Python client library for querying and…
permissive · top 15,000 on PyPI