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

Uploaded Source

Built Distribution

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

Uploaded Python 3

Supported by

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