A simple screen recording tool
Project description
PyScreenGrab
A simple and efficient screen recording and streaming tool written in Python.
✨ 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:
- Select capture mode (Full Screen/Custom Region/Window)
- Choose monitor or set region
- Set FPS
- Choose recording mode (Preview/Record)
- 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
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
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
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
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
ccfd0db02c45f9bffef6e7c6bdc2b969a4f5b7be3b3f4aed7956837bbdda99f5
|
|
| MD5 |
33412b8985638c82e78a1b266a3b312c
|
|
| BLAKE2b-256 |
136e51f4b24f3ba9bec4b67bb7a1c583da1f4c39a2a63c9409077ec582fbbe56
|
Provenance
The following attestation bundles were made for py_screen_grab-1.5.0.tar.gz:
Publisher:
release.yml on yeonhee7935/py-screen-grab
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
py_screen_grab-1.5.0.tar.gz -
Subject digest:
ccfd0db02c45f9bffef6e7c6bdc2b969a4f5b7be3b3f4aed7956837bbdda99f5 - Sigstore transparency entry: 198380263
- Sigstore integration time:
-
Permalink:
yeonhee7935/py-screen-grab@0a6055a770df6aced6a666038a8bc59eb9505f0a -
Branch / Tag:
refs/heads/master - Owner: https://github.com/yeonhee7935
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
release.yml@0a6055a770df6aced6a666038a8bc59eb9505f0a -
Trigger Event:
push
-
Statement type:
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
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
4e9a8b0adc44372d1d429bc71229d622bfa9239165fbb440cc006a7d41529d03
|
|
| MD5 |
309f5ababc3a0f3b0155744ffc6555d4
|
|
| BLAKE2b-256 |
9d82c7fceac7dd2778f6cecdd55cadf4bdb52179bb9f1e82676fc0f3eb5837cb
|
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
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
py_screen_grab-1.5.0-py3-none-any.whl -
Subject digest:
4e9a8b0adc44372d1d429bc71229d622bfa9239165fbb440cc006a7d41529d03 - Sigstore transparency entry: 198380264
- Sigstore integration time:
-
Permalink:
yeonhee7935/py-screen-grab@0a6055a770df6aced6a666038a8bc59eb9505f0a -
Branch / Tag:
refs/heads/master - Owner: https://github.com/yeonhee7935
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
release.yml@0a6055a770df6aced6a666038a8bc59eb9505f0a -
Trigger Event:
push
-
Statement type: