A python package for screen recording with customizable resolution, FPS, and mouse tracking.
Project description
Python Screen Recorder
Python screen recorder also pyscreenrecorder is a powerful Python package for screen recording with an optional mouse cursor overlay.
It allows high-performance screen capturing, custom resolution, and real-time mouse tracking.
✨ Features
- 🎥 Record screen with smooth frame rates (30 FPS default).
- 🖱 Mouse overlay customization (color, size, thickness).
- 📺 Multi-monitor support – Choose which monitor to record.
- 🔄 Set custom resolution (e.g., 1280x720, 1920x1080).
- ⚡ Optimized performance with
mssfor fast screen capture. - 🎨 Flexible output formats – Supports
.mp4,.avi, and.mkv. - 🔍 Monitor detection – List available monitors and their specs.
📦 Installation
Install pyscreenrecorder using pip:
pip install pyscreenrecorder
Upgrade pyscreenrecorder using pip:
pip install pyscreenrecorder -U
🚀 Usage
Basic Screen Recording
from pyscreenrecorder import ScreenRecorder
ScreenRecorder(
filename="screen_record.mp4",
duration=10,
fps=30,
monitor_number=1,
mouse=True,
)
📺 Listing Available Monitors
from pyscreenrecorder import pyScreenRecorder
monitors = pyScreenRecorder.list_monitors()
print("Available Monitors:", monitors)
Example Output:
[
{ "monitor": 0, "width": 1920, "height": 1080 },
{ "monitor": 1, "width": 2560, "height": 1440 }
]
🎥 Recording with Custom Settings
from pyscreenrecorder import ScreenRecorder
ScreenRecorder(
filename="custom_record.mp4",
duration=15,
fps=60,
monitor_number=2,
resolution=(1280, 720), # Set custom resolution
mouse=True,
mouse_color=(255, 0, 0), # Red cursor
mouse_size=10,
mouse_thickness=3,
)
🔹 60 FPS Recording
🔹 Custom 1280x720 resolution
🔹 Red-colored mouse cursor with increased size
🛠 Advanced Example
from pyscreenrecorder import pyScreenRecorder
if __name__ == "__main__":
# Display available monitors
monitors = pyScreenRecorder.list_monitors()
print("Available Monitors:", monitors)
# Start recording with advanced settings
pyRec = pyScreenRecorder(
filename="high_quality_record.mp4",
duration=30,
fps=60,
monitor_number=1,
resolution=(1920, 1080), # Full HD recording
mouse=True,
mouse_color=(0, 255, 0), # Green cursor
mouse_size=6,
mouse_thickness=2,
)
pyRec.screenRecorder()
⚙ Supported File Formats
pyscreenrecorder supports the following video formats:
| Format | Description |
|---|---|
| MP4 | High compatibility |
| AVI | Uncompressed quality |
| MKV | Modern, flexible |
Set the format by using the appropriate file extension in filename.
Example:
ScreenRecorder(filename="recording.mkv")
🎯 Dependencies
pyscreenrecorder relies on:
opencv-pythonnumpymsspyautoguiMouseInfoPyGetWindowPyMsgBoxpyperclipPyRectPyScreezepytweening
No additional configuration is required.
📝 License
This project is licensed under the MIT License.
📚 More Information
📌 GitHub Repository:
🔗 https://github.com/SSujitX/pyscreenrecorder
📌 Issue Tracker:
🐛 Report a Bug
🏁 Conclusion
pyscreenrecorder is an efficient, easy-to-use, and customizable screen recording tool in Python. Whether you need basic screen capturing or advanced mouse-tracked recordings, this package provides all the features.
🚀 Try it today! 🚀
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 pyscreenrecorder-0.0.3.tar.gz.
File metadata
- Download URL: pyscreenrecorder-0.0.3.tar.gz
- Upload date:
- Size: 6.5 kB
- Tags: Source
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.12.8
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
41bbca546f061b6daa7f763d6643856ef3ad9fdeb2949d2965d775ca1d99c0eb
|
|
| MD5 |
8efda054edc8a14f7e21c87d1a904f0d
|
|
| BLAKE2b-256 |
8aa2ff4f2cf9b381a357f87a0ed35efebb5bfb7716b33941454e0b0752c4dd19
|
Provenance
The following attestation bundles were made for pyscreenrecorder-0.0.3.tar.gz:
Publisher:
python-publish.yml on SSujitX/pyscreenrecorder
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
pyscreenrecorder-0.0.3.tar.gz -
Subject digest:
41bbca546f061b6daa7f763d6643856ef3ad9fdeb2949d2965d775ca1d99c0eb - Sigstore transparency entry: 167909207
- Sigstore integration time:
-
Permalink:
SSujitX/pyscreenrecorder@4235180a1712d0aa4837e35852d89f2555fd9a10 -
Branch / Tag:
refs/tags/0.0.3 - Owner: https://github.com/SSujitX
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
python-publish.yml@4235180a1712d0aa4837e35852d89f2555fd9a10 -
Trigger Event:
push
-
Statement type:
File details
Details for the file pyscreenrecorder-0.0.3-py3-none-any.whl.
File metadata
- Download URL: pyscreenrecorder-0.0.3-py3-none-any.whl
- Upload date:
- Size: 7.3 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 |
dfa3b238549f07c59d0b58c6bef5c1508b65bf3a4588f05e9a75ff5df812f9f3
|
|
| MD5 |
e93180b33f8b1212d2d457252f8c72b3
|
|
| BLAKE2b-256 |
1fad9d8658850660d63fd369b3d655bd94dee2cdfef7c540c23c56db9c84fc1d
|
Provenance
The following attestation bundles were made for pyscreenrecorder-0.0.3-py3-none-any.whl:
Publisher:
python-publish.yml on SSujitX/pyscreenrecorder
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
pyscreenrecorder-0.0.3-py3-none-any.whl -
Subject digest:
dfa3b238549f07c59d0b58c6bef5c1508b65bf3a4588f05e9a75ff5df812f9f3 - Sigstore transparency entry: 167909210
- Sigstore integration time:
-
Permalink:
SSujitX/pyscreenrecorder@4235180a1712d0aa4837e35852d89f2555fd9a10 -
Branch / Tag:
refs/tags/0.0.3 - Owner: https://github.com/SSujitX
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
python-publish.yml@4235180a1712d0aa4837e35852d89f2555fd9a10 -
Trigger Event:
push
-
Statement type: