Skip to main content

Fastest Windows Screen Capture Library For Python 🔥

Project description

Windows Capture   Licence Build Status Latest Version

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

Benchmark Showing 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


Download files

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

Source Distribution

windows_capture-1.4.0.tar.gz (41.0 kB view details)

Uploaded Source

Built Distribution

windows_capture-1.4.0-cp39-abi3-win_amd64.whl (207.2 kB view details)

Uploaded CPython 3.9+ Windows x86-64

File details

Details for the file windows_capture-1.4.0.tar.gz.

File metadata

  • Download URL: windows_capture-1.4.0.tar.gz
  • Upload date:
  • Size: 41.0 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: maturin/1.7.1

File hashes

Hashes for windows_capture-1.4.0.tar.gz
Algorithm Hash digest
SHA256 2d722391321c20694d75ea7871a0a3d386a64bc5ae5ba46f54995439fe39507a
MD5 f4a46f626b3f8411b97c56205c9c74ab
BLAKE2b-256 6f9d85cf6a92a5987693279afa1673bd09f803bf338ee3c0932266e0b6459b9f

See more details on using hashes here.

File details

Details for the file windows_capture-1.4.0-cp39-abi3-win_amd64.whl.

File metadata

File hashes

Hashes for windows_capture-1.4.0-cp39-abi3-win_amd64.whl
Algorithm Hash digest
SHA256 28ff155c1dd8e6249c108f3ec54bc9bff8c85021e7ebf86d566fa2611d0a0095
MD5 fe1d1adbdb4b841ac885ff43acf3a062
BLAKE2b-256 0b6994fcacce5f197f1aaaf4a21eb379e75d4de57fb8b3b5a3d09ae90a3b9bb7

See more details on using hashes here.

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