Skip to main content

Grab screenshots from a specific window and process them right away (for bots or video streaming)

Project description

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()

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

window_capture_streaming-0.13.tar.gz (4.7 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

window_capture_streaming-0.13-py3-none-any.whl (6.4 kB view details)

Uploaded Python 3

File details

Details for the file window_capture_streaming-0.13.tar.gz.

File metadata

  • Download URL: window_capture_streaming-0.13.tar.gz
  • Upload date:
  • Size: 4.7 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/4.0.1 CPython/3.9.13

File hashes

Hashes for window_capture_streaming-0.13.tar.gz
Algorithm Hash digest
SHA256 61bf43df98a8850e3f7196985b54a5b38a1b13e1425562d197e92db566acf0a2
MD5 a968652a02eb0a698c788b228605a8b1
BLAKE2b-256 d3872814a7aa2a081e5c553d78f5606a8fadffd325c30238180cda33b5c89585

See more details on using hashes here.

File details

Details for the file window_capture_streaming-0.13-py3-none-any.whl.

File metadata

File hashes

Hashes for window_capture_streaming-0.13-py3-none-any.whl
Algorithm Hash digest
SHA256 bbfb751fda94bd74d24ec0c56061ba74d2b1c19543973403571dc348f26b808a
MD5 271e5bbef50d4b881ed499d4245228d0
BLAKE2b-256 c1607d71e490ad7b1d3931879f0e12fd7608410e33c7f5b43d01b31fba50428c

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page