Skip to main content

Grab screenshots from a specific window and process them right away

pip install window-capture-streaming





from window_capture_streaming import WindowIterCapture

import re

import cv2

capt = WindowIterCapture(

    hwnd=None,

    window_text=re.compile(r".*bluestacks.*", flags=re.IGNORECASE),

    show_capture_keys="ctrl+alt+z",  # starts cv2.imshow() - can be enabled/disabled by pressing ctrl+alt+z

    show_fps_keys="ctrl+alt+f",  # show the fps rate - can be enabled/disabled by pressing ctrl+alt+f

    kill_screencap_keys="ctrl+alt+x",  # kills the capture process

)



for screen_shot in capt.get_screenshot(

    sleeptime=None,

    resize_width=None,

    resize_height=None,

    resize_percent=None,

    interpolation=cv2.INTER_AREA,

):

    pass

    # print('do some stuff here')

    break #if you break out of the loop, stop capturing 

capt.kill_screencap()

Metadata

Release files for window-capture-streaming 0.14

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for window-capture-streaming 0.14
File Size Uploaded Provenance Actions
window_capture_streaming-0.14.tar.gz 4.7 kB Without provenance Details for window_capture_streaming-0.14.tar.gz

Built distribution (wheel)

Table of built distributions (wheels) for window-capture-streaming 0.14
File Interpreter ABI Platform Actions
window_capture_streaming-0.14-py3-none-any.whl Python 3 none any Details for window_capture_streaming-0.14-py3-none-any.whl

Total release size: 11.1 kB

Release files / window_capture_streaming-0.14.tar.gz

Download URL window_capture_streaming-0.14.tar.gz
Size 4.7 kB
Tags Source
SHA-256 checksum
How to use checksums
ce34615b46c1de8ea832dd1e4e88247dc23a894d4580450306ea9be7979dec21
BLAKE2b-256 checksum
How to use checksums
0b3bb1a3dd6c7e35d0e8d19ca15932788cce7f540a4bbaae1af0bdc1e7c29ffb
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/4.0.1 CPython/3.9.13

Release files / window_capture_streaming-0.14-py3-none-any.whl

Download URL window_capture_streaming-0.14-py3-none-any.whl
Size 6.4 kB
Tags Python 3
SHA-256 checksum
How to use checksums
3cab671ecb065c90ad119e0f9a8cbe8f6b39e394852e61b54b7f0e44912cdb5b
BLAKE2b-256 checksum
How to use checksums
5724f1a44c1de0b73f7f3bb505758397033303256a58a3e007dcfaa75477b15a
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/4.0.1 CPython/3.9.13

Security for window-capture-streaming 0.14

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

No provenance found

None of the files in this release were uploaded with provenance metadata.

A note on package security

PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.

To learn more about protecting yourself from malicious actors, visit our package security documentation.

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page