Skip to main content

A simple screen recording tool

Project description

PyScreenGrab

A simple and efficient screen recording and streaming tool written in Python.

PyPI PyPI Downloads License



✨ Features

  • Multiple capture modes(Full Screen/Custom Region/Window)

  • Local video recording

  • Preview mode

  • Adjustable FPS (1-60)

  • Timed recording option

  • Simple command-line interface

  • Reactive streaming support

  • 🔴 Note: Window capture may not work properly with virtual monitors. use a physical monitor for best results



📦 Installation

pip install py-screen-grab


🚀 Usage

Command Line Interface

Simply run:

screengrab

Follow the interactive prompts to:

  1. Select capture mode (Full Screen/Custom Region/Window)
  2. Choose monitor or set region
  3. Set FPS
  4. Choose recording mode (Preview/Record)
  5. Set recording duration (optional)

Python API

1. Custom Region Capture

from py_screen_grab import ScreenGrabber

# Capture a specific region
grabber = ScreenGrabber()
    .set_roi(x=100, y=100, width=800, height=600)
    .set_fps(30)

# Record with preview
grabber.record()

2. Window Capture

from py_screen_grab import ScreenGrabber

# Capture a specific window
# The ROI is automatically set based on the window's position and size
grabber = ScreenGrabber()
    .set_window("Window Title")
    .set_fps(30)

# Record with preview
grabber.record()

3. Streaming

from py_screen_grab import ScreenGrabber

grabber = ScreenGrabber()
    .set_roi(x=0, y=0, width=1920, height=1080)
    .set_fps(30)

# Start streaming
grabber.start_streaming()


📋 Requirements

  • wmctrl (required for window management on Linux, especially 🐧Ubuntu)
  • Python 3.6 or higher
  • OpenCV
  • NumPy
  • MSS (screen capture library)
  • aiortc (for WebRTC streaming)
  • rx (for reactive streaming)


📄 License

This project is licensed under the MIT License - see the LICENSE file for details.



🤝 Contributing

We welcome contributions to this project! Please see our CONTRIBUTING.md for guidelines on how to get started.

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

py_screen_grab-1.5.0.tar.gz (10.4 kB view details)

Uploaded Source

Built Distribution

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

py_screen_grab-1.5.0-py3-none-any.whl (10.1 kB view details)

Uploaded Python 3

File details

Details for the file py_screen_grab-1.5.0.tar.gz.

File metadata

  • Download URL: py_screen_grab-1.5.0.tar.gz
  • Upload date:
  • Size: 10.4 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.12.8

File hashes

Hashes for py_screen_grab-1.5.0.tar.gz
Algorithm Hash digest
SHA256 ccfd0db02c45f9bffef6e7c6bdc2b969a4f5b7be3b3f4aed7956837bbdda99f5
MD5 33412b8985638c82e78a1b266a3b312c
BLAKE2b-256 136e51f4b24f3ba9bec4b67bb7a1c583da1f4c39a2a63c9409077ec582fbbe56

See more details on using hashes here.

Provenance

The following attestation bundles were made for py_screen_grab-1.5.0.tar.gz:

Publisher: release.yml on yeonhee7935/py-screen-grab

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file py_screen_grab-1.5.0-py3-none-any.whl.

File metadata

  • Download URL: py_screen_grab-1.5.0-py3-none-any.whl
  • Upload date:
  • Size: 10.1 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.12.8

File hashes

Hashes for py_screen_grab-1.5.0-py3-none-any.whl
Algorithm Hash digest
SHA256 4e9a8b0adc44372d1d429bc71229d622bfa9239165fbb440cc006a7d41529d03
MD5 309f5ababc3a0f3b0155744ffc6555d4
BLAKE2b-256 9d82c7fceac7dd2778f6cecdd55cadf4bdb52179bb9f1e82676fc0f3eb5837cb

See more details on using hashes here.

Provenance

The following attestation bundles were made for py_screen_grab-1.5.0-py3-none-any.whl:

Publisher: release.yml on yeonhee7935/py-screen-grab

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

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