Windows DirectShow camera enumerator with stable USB location IDs via CfgMgr32
Project description
comgrab3
Windows DirectShow camera enumerator with stable USB location IDs.
Install
pip install comgrab3
Windows only — requires comtypes.
Usage
from comgrab3 import enumerate_cameras, get_usb_location
cams = enumerate_cameras()
for cam in cams:
print(cam["index"], cam["name"], cam["location_id"])
CLI:
comgrab3
What it returns
Each camera dict contains:
index— OpenCVcv2.VideoCapture(index)indexname— friendly name (e.g."USB Camera")device_path— full DirectShow device pathlocation_id— stable USB port location (e.g.PCIROOT(0)#PCI(1400)#USB(0001)#USB(0003))
location_id is stable across reboots as long as the camera stays in the same physical USB port.
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
comgrab3-1.0.0.tar.gz
(3.8 kB
view details)
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file comgrab3-1.0.0.tar.gz.
File metadata
- Download URL: comgrab3-1.0.0.tar.gz
- Upload date:
- Size: 3.8 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.10.19
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
1a749e3573eff232775a1f8ce55742f181530c89aceda0117000db401e339ab4
|
|
| MD5 |
8895ed305e29b134f1f820790e8d5785
|
|
| BLAKE2b-256 |
6237b0312dd69d6f20c807da1215d118c1a3ef42b72cc93546fc589139c71d66
|
File details
Details for the file comgrab3-1.0.0-py3-none-any.whl.
File metadata
- Download URL: comgrab3-1.0.0-py3-none-any.whl
- Upload date:
- Size: 4.2 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.10.19
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
42dc04974c56d56eeb0a12b88852a38bfe224202f663d2669321a0483753018c
|
|
| MD5 |
19921b1a0934d17556ac80972a096962
|
|
| BLAKE2b-256 |
eaa932ad357a1511e6a43232c284fe421bdc8d0be982f8d76b62dc4b8705637e
|