Record and save time-lapse videos while you work.
Project description
TimeLapser
TimeLapser is a Python CLI tool for recording screen activity and saving it as a video file. It uses OpenCV and FFMPEG for video encoding and supports multiple monitor setups. You can customize the recording settings such as frame rate, video format, and monitor selection. The tool also provides functionality to list available monitors and display a recording timer.
Features
- Record screen activity from a selected monitor.
- Save recordings in MP4 or AVI format.
- Specify the output directory.
- Option to set the frames per second (FPS) for recording.
- Display a timer showing elapsed recording time.
- List available monitors with their resolutions.
Requirements
- Python 3.10+
- OpenCV (
cv2
) - NumPy
- MSS
- Pynput
- Rich
- FFMPEG (Ensure FFMPEG is installed and accessible in your PATH)
Installation
-
Install using
pip
:pip install timelapser
Or install from GitHub:
pip install git+https://github.com/asibhossen897/timelapser.git
-
Ensure FFMPEG is installed:
To check if FFMPEG is installed, run the following command:
ffmpeg -version
If FFMPEG is not installed, you can install it using the following commands:
-
Linux:
-
Ubuntu/Debian
sudo apt-get update sudo apt-get install ffmpeg
-
RHEL/CentOS/Fedora
sudo yum install ffmpeg
-
Arch Linux
sudo pacman -S ffmpeg
-
-
macOS:
brew install ffmpeg
-
Windows: Download and install from the FFMPEG official site and add it to your PATH.
-
Important: The program will not work if FFMPEG is not installed.
Usage
Start Recording
To start recording, use the record
command:
timelapser record --fps 30 --mp4 --monitor_index 0 --output_dir Recordings
or Download and use timelapser.py
file from the GitHub repository:
python timelapser.py record --fps 30 --mp4 --monitor_index 0 --output_dir Recordings
Options:
--fps
: Frames per second (e.g., 30, Default is 100).--mp4
: Save the video in MP4 format. Use--avi
for AVI format.--monitor_index
: Index of the monitor to record from (default is 0).--output_dir
: Directory where the video will be saved (default is "Outputs").
Stop Recording
To stop recording, press Q
on your keyboard.
List Monitors
To list all available monitors and their resolutions, use:
timelapser list-monitors
Code Organization
timelapser/main.py
: Contains the CLI commands and main logic for recording and listing monitors.timelapser/recorder.py
: Contains functions for creating videos, recording frames, and handling output directories.timelapser/utils.py
: Contains utility functions for generating timestamps and video formats.requirements.txt
: Lists the Python dependencies.
Bugs and Feature Requests
- When you have any bug or feature request, please open an issue on GitHub.
Contributing
Feel free to contribute to this project by submitting issues, feature requests, or pull requests. Ensure you follow the coding style and include tests for new features.
License
This project is licensed under the MIT License. See the LICENSE file for details.
Contact
For any questions or feedback, please contact dev.asib@proton.me.
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
File details
Details for the file timelapser-0.1.2.tar.gz
.
File metadata
- Download URL: timelapser-0.1.2.tar.gz
- Upload date:
- Size: 5.4 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/5.1.1 CPython/3.9.19
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 5b7e909addcb30afcbf3fbb8fb9b07d5ea953c6c47bc914f490ed4d5fc46c011 |
|
MD5 | 1985b76b2b1c21256fd5732ecb497339 |
|
BLAKE2b-256 | a071e0727ea59bc4272e6b69538dddf02dd26c24000096743ae63e12594a8d0b |
File details
Details for the file timelapser-0.1.2-py3-none-any.whl
.
File metadata
- Download URL: timelapser-0.1.2-py3-none-any.whl
- Upload date:
- Size: 6.4 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/5.1.1 CPython/3.9.19
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | b5df42035be97d1bd58a37b94a0937115468353362699b0eab096fe55bbf589c |
|
MD5 | e6b8e41b38f78e9e7bd5b03b73fb6c76 |
|
BLAKE2b-256 | 7bcf4e99039fa0c32f52e15ff31d361a976271d92f07d865a6f3203dc6bcf531 |