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 the capturing
bilder.kill_screencap()
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
Built Distribution
Close
Hashes for adb_screencap_streaming-0.11.tar.gz
Algorithm | Hash digest | |
---|---|---|
SHA256 | afb16d5fe12b59d38d03f4d6e7c0509091491419fa084c4c21f1c5f6c39db866 |
|
MD5 | 12834256ad1c660d638ab98348f44a71 |
|
BLAKE2b-256 | 5892b1eff31f8f889abfe838ea1f22d50cfe4d08d000b63f1ee79a27cf7e6447 |
Close
Hashes for adb_screencap_streaming-0.11-py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | d2cdb97723db0f001f316df2e3a04d17e339968720fa0b20883a18132dde4c80 |
|
MD5 | 4e966ad5b428d62556c5667175e34a48 |
|
BLAKE2b-256 | fd90ddb186d9b782e97d30000fc33e37536cc96a65ee24f012d5028ebc2abed7 |