A minimal, multi-threaded desktop screen recorder built in Python — no heavy third-party software, no configuration overhead. Start recording in one click, get a timestamped
.avifile when you stop.
- 🖥️ Simple GUI — Start & Stop recording controls via Tkinter
- 🎬 Smooth screen capture using OpenCV + PyAutoGUI
- ⚡ Multi-threaded recording — UI stays responsive during capture
- ⏱️ Automatic timestamp-based file naming — no manual saving
- 📁 Output saved as
.avi— compatible with standard video players - 🧠 Accurate time tracking via Python
datetime
| Tool | Purpose |
|---|---|
| Python 3.12 | Core runtime |
| Tkinter | GUI — start/stop controls |
| OpenCV | Video frame capture and encoding |
| PyAutoGUI | Screen screenshot per frame |
| NumPy | Frame array processing |
| Threading | Concurrent recording — non-blocking UI |
| Datetime | Timestamped output filenames |
User clicks Start
│
▼
Background thread launches (non-blocking)
│
▼
PyAutoGUI captures screen → NumPy array → OpenCV encodes frame
│
▼
Frames written to .avi file in real time
│
▼
User clicks Stop → thread joins → file saved with timestamp
Why multi-threading? Running the capture loop on the main thread would freeze the GUI. A background thread keeps the interface responsive while recording runs continuously in parallel.
# Clone the repository
git clone https://github.com/amarskdev/Python-Screen-Recorder-App
cd Python-Screen-Recorder-App
# Create and activate virtual environment
python3 -m venv venv
source venv/bin/activate
# Install dependencies
pip install -r requirements.txt
# Run the app
python recorder.py- Click Start Recording — capture begins immediately
- Perform any on-screen activity
- Click Stop Recording — video saved automatically as
recording_YYYYMMDD_HHMMSS.avi
screen-recorder-app/
├── recorder.py # Main app — GUI + recording logic + threading
├── requirements.txt # opencv-python, pyautogui, numpy
└── README.md
- Ubuntu Linux — tested on Ubuntu with Python 3.12
- Runs inside a Python virtual environment
- No system-level dependencies beyond pip packages
- Creating software tutorials and walkthroughs
- Recording demos and presentations
- Capturing system behavior for bug reports
- Educational screen recordings without third-party tools
- Audio recording support (microphone overlay)
- MP4 output format (better compression than AVI)
- Region selection — record a specific area of the screen
- Windows and macOS support
- Hotkey support for start/stop without clicking
Simple tools built well — multi-threading, clean separation of UI and capture logic, zero external dependencies beyond pip.