pygrabber
Module for grabbing live video images using DirectShow
What it is and what it does
pygrabber is a Python wrapper around DirectShow that lets you work with video cameras on Windows. It provides a FilterGraph class that abstracts DirectShow's filter-based architecture, allowing you to enumerate connected cameras, capture individual frames or video streams, and apply camera settings—all from Python code.
The package is designed for straightforward camera integration tasks: listing available devices, grabbing frames on demand or in a loop, and saving output to files. It depends on comtypes (for COM interop with DirectShow) and numpy (likely for frame data handling). Because it wraps a Windows-specific multimedia API, it is not cross-platform.
Use it for:
- List all USB or built-in cameras connected to a Windows PC and select one for capture.
- Capture still frames from a camera at regular intervals and save them as image files.
- Stream live video from a camera to a window on screen using DirectShow's rendering pipeline.
- Build a simple GUI application that lets users preview, capture, or record from a camera.
Worth the install?
AI-flagged interpretation of the facts on this page — verify before relying
Capture photos and video from Windows cameras using DirectShow, enumerate connected devices, and configure camera settings from Python.
Yes, if you are on Windows and need straightforward camera access without heavy dependencies. The low install friction and permissive license are advantages. However, the dormant maintenance status (last update 2023-10-20) means no active support; install only if you can tolerate unfixed bugs or are confident the package meets your needs as-is.
Install
pygrabber on PyPI
pip
pip install pygrabberuv
uv add pygrabberpoetry
poetry add pygrabberInstalling pygrabber
Before you install
Low install friction with a pure-Python wheel. Maintenance is dormant—last release was 2023-10-20 and last commit 2024-08-30—so expect no active bug fixes or feature updates.
License in practice
MIT license is permissive; you can use, modify, and distribute this package with minimal restrictions, provided you retain the license notice.
Quickstart
pip install pygrabber
from pygrabber.dshow_graph import FilterGraph
graph = FilterGraph()
print(graph.get_input_devices())
Windows-only; requires DirectShow support and comtypes + numpy at runtime.
Verify before relying
- Whether the package works reliably with modern Windows versions and camera drivers.
- Python version compatibility (requires_python is unspecified in the fact sheet).
- Whether dormant status means critical bugs are unfixed or if the package is simply stable.
Package facts
| License | MIT (permissive) |
| Python support | not specified |
| Install friction | low — pure-Python wheel |
| Runtime dependencies | 2 — comtypes, numpy |
| Maintenance | dormant — 1,029 days since the last release |
| Last repo commit | |
| First released | |
| Downloads | 76,984/month — #14,566 on PyPI (30-day window, as of 2026-08-14) |
| Known vulnerabilities | none known (OSV.dev, checked 2026-08-14) |
Evidence: pygrabber-0.2-py3-none-any.whl
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
dxcamDXcam captures screen frames on Windows at high…
permissive · top 15,000 on PyPI
rawpyrawpy wraps LibRaw to load, decode, and…
permissive · top 15,000 on PyPI
streamlit-camera-input-liveProvides a Streamlit component that captures…
unclear · top 15,000 on PyPI
pypylonpypylon is the official Python binding for…
unclear · top 15,000 on PyPI
pyrealsense2Python wrapper for Intel RealSense SDK 2.0 that…
permissive · top 15,000 on PyPI
pyscreenshotCaptures screenshots to Pillow images using…
permissive · top 15,000 on PyPI
pytapoPyTapo is a Python library that communicates…
permissive · top 15,000 on PyPI
blinkpyA Python library for controlling and monitoring…
permissive · top 15,000 on PyPI
winrt-Windows.Devices.EnumerationProvides Python bindings to Windows Runtime…
permissive · top 15,000 on PyPI
harvestersHarvester simplifies image acquisition from…
permissive · top 15,000 on PyPI