Fastest Windows Screen Capture Library For Python 🔥
Project description
Windows Capture
Windows Capture is a highly efficient Rust and Python library that enables you to capture the screen using the Graphics Capture API effortlessly. This library allows you to easily capture the screen of your Windows-based computer and use it for various purposes, such as creating instructional videos, taking screenshots, or recording your gameplay. With its intuitive interface and robust functionality, Windows Capture is an excellent choice for anyone looking for a reliable, easy-to-use screen-capturing solution.
Note this README.md is for Python library Rust library can be found here
Features
- Only Updates The Frame When Required.
- High Performance.
- Easy To Use.
- Latest Screen Capturing API.
Installation
Run this command
pip install windows-capture
Usage
from windows_capture import WindowsCapture, Frame, InternalCaptureControl
# Every Error From on_closed and on_frame_arrived Will End Up Here
capture = WindowsCapture(
cursor_capture=None,
draw_border=None,
monitor_index=None,
window_name=None,
)
# Called Every Time A New Frame Is Available
@capture.event
def on_frame_arrived(frame: Frame, capture_control: InternalCaptureControl):
print("New Frame Arrived")
# Save The Frame As An Image To The Specified Path
frame.save_as_image("image.png")
# Gracefully Stop The Capture Thread
capture_control.stop()
# Called When The Capture Item Closes Usually When The Window Closes, Capture
# Session Will End After This Function Ends
@capture.event
def on_closed():
print("Capture Session Closed")
capture.start()
Benchmark
Windows Capture Is The Fastest Python Screen Capture Library
Contributing
Contributions are welcome! If you find a bug or want to add new features to the library, please open an issue or submit a pull request.
License
This project is licensed under the MIT License.
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
File details
Details for the file windows_capture-1.4.2.tar.gz
.
File metadata
- Download URL: windows_capture-1.4.2.tar.gz
- Upload date:
- Size: 41.0 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: maturin/1.7.1
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | d7a6840ad5e515c02ab657544e06ce5aeb8fe5598917e049ffeca1fe21140352 |
|
MD5 | 7afd654a9d43ecdb20b8328764db88e0 |
|
BLAKE2b-256 | 2d68065edbee59fdcbf324a36c2d61919ca302b2a9674285c73eb3855752f3f0 |
File details
Details for the file windows_capture-1.4.2-cp39-abi3-win_amd64.whl
.
File metadata
- Download URL: windows_capture-1.4.2-cp39-abi3-win_amd64.whl
- Upload date:
- Size: 207.2 kB
- Tags: CPython 3.9+, Windows x86-64
- Uploaded using Trusted Publishing? No
- Uploaded via: maturin/1.7.1
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 5d89fff1f75c3345599893a2108972ea93a2721c48e70d76c0cf591825be8bf0 |
|
MD5 | fdd34986647139d92469bfe378271bcd |
|
BLAKE2b-256 | fa0c2626a31baf675d1659f473bf39775a26c1bd159379512623d9e81d09fecf |