Skip to main content

Streams ADB's Screencap (useful for bots and video capturing)

Project description

Grab screenshots from ADB's screencap and process them right away

pip install adb-screencap-streaming





from adb_screencap_streaming import ADBScreenshot

import cv2

bilder = ADBScreenshot(

    "C:\\Users\\Gamer\\AppData\\Local\\Android\\Sdk\\platform-tools\\adb.exe",

    "localhost:5735",

    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 ka in bilder.get_adb_screenshots(

    sleeptime=None,

    resize_width=None,

    resize_height=None,

    resize_percent=None,

    interpolation=cv2.INTER_AREA,

):

    print('Do some stuff here', end='\r')

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

    

bilder.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

adb_screencap_streaming-0.12.tar.gz (4.8 kB view details)

Uploaded Source

Built Distribution

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

adb_screencap_streaming-0.12-py3-none-any.whl (6.5 kB view details)

Uploaded Python 3

File details

Details for the file adb_screencap_streaming-0.12.tar.gz.

File metadata

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

File hashes

Hashes for adb_screencap_streaming-0.12.tar.gz
Algorithm Hash digest
SHA256 20f92ebc66db0e52e03bb21780d2fd8378313b401b934ab2f93e5d9f97d28948
MD5 e69a9923d4a05815f324cbbbaea59598
BLAKE2b-256 d23287adf645d9152d0715e528df630a2ca58cf568eb852c35f3a5cfe2a85e75

See more details on using hashes here.

File details

Details for the file adb_screencap_streaming-0.12-py3-none-any.whl.

File metadata

File hashes

Hashes for adb_screencap_streaming-0.12-py3-none-any.whl
Algorithm Hash digest
SHA256 230dadf5ce456304964a91de71cb2517c0a3dbfee664adfe7f7a757e9ab08ddd
MD5 d314d2314a122bf1bc65309e5ff92c61
BLAKE2b-256 6b123b400023f4161d0cb90eff2e1f71c31fb1445e9347cda849245a778a68ef

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