stream-archiver
is a Python application designed to record live streams from Twitch using Streamlink. It monitors the stream status, manages disk space, and sends notifications to a Discord channel when recordings start, stop, or when there are issues.
- Records Twitch streams at a specified quality.
- Creates timestamped recordings with organized directories by date.
- Sends notifications to Discord about recording status, errors, and disk space warnings.
- Automatically deletes old recordings to manage disk space.
- Configurable maximum recording duration and disk space threshold.
Before using stream-archiver
, ensure that you have the following installed:
- Python 3.6+: Download Python
- Streamlink: Installation instructions
- Requests library: Install via
pip install requests
-
Clone the Repository
git clone https://github.com/Wasserpuncher/stream-archiver.git cd stream-archiver
Install the required Python packages using pip:
pip install requests
pip install streamlink
Create a config.json file in the root directory of the repository with the following structure:
{
"streamer_name": "example_streamer",
"output_directory": "./recordings",
"quality": "best",
"webhook_url": "https://discord.com/api/webhooks/your-webhook-id",
"max_recording_duration_hours": 1,
"disk_space_threshold_gb": 5
}
Run the application using Python:
python stream-archiver.py
The script will continuously monitor the specified Twitch stream and start recording when the stream is online. It will handle disk space management, delete old recordings, and send status updates to your Discord webhook.
Logs are saved in stream_recorder.log. This file will contain information about recording events, errors, and disk space warnings.
Feel free to submit issues, feature requests, or pull requests. Contributions are welcome!
This project is licensed under the MIT License - see the LICENSE file for details.