# Twitch Archive Inspired by https://github.com/EnterGin/Auto-Stream-Recording-Twitch ## Git LFS This repository stores large media files (recorded video and some binaries). Use Git LFS to manage large objects. Quick setup (Windows): 1. Install Git LFS: `git lfs install` 2. Ensure `.gitattributes` is committed (this repo includes one). 3. If you already have large files tracked by normal Git, migrate them: ```powershell git lfs install git lfs track "*.mp4" "*.mkv" "bin/*" git add .gitattributes git add -A git commit -m "Migrate large files to LFS" git push origin main ``` Notes: - Git LFS needs server-side support. If using GitHub, enable Git LFS on the remote and ensure you have sufficient bandwidth/storage quota. - You can customize tracked patterns in `.gitattributes`. Python script to check, download live stream, VOD, chat and upload them to any cloud storage supported by rclone. ## ⚡ FFmpeg 8.0 Enhanced Now with FFmpeg 8.0+ support featuring hardware acceleration and performance improvements! - **5-10x faster encoding** with NVIDIA, Intel, or AMD GPUs - **Docker-ready** with Linux builds - **Configurable options** for different scenarios - 📖 **[See FFMPEG_SETUP.md for detailed setup instructions](FFMPEG_SETUP.md)** ## Requirements - [Python 3](https://www.python.org/downloads/) - [Streamlink](https://github.com/streamlink/streamlink) - [FFmpeg 8.0+](https://ffmpeg.org/download.html) (see [FFMPEG_SETUP.md](FFMPEG_SETUP.md) for platform-specific versions) ## Getting started 1. Install Python 3.x 2. Install Streamlink 5.1.x 3. If you want to upload to any cloud storage using rclone, [configure rclone](https://rclone.org/docs/#configure). 4. `git clone https://github.com/piero0920/Twitch-Archive.git` 5. `cd Twitch-Archive` 6. `pip install -r requirements.txt` 7. Edit the `.env.sample` and rename it to `.env` ```.env CLIENT-ID=xxxxxxxxxxxxxxxxxxxxxxxxxxxxxx CLIENT-SECRET=xxxxxxxxxxxxxxxxxxxxxxxxxxxxxx OAUTH-PRIVATE-TOKEN=xxxxxxxxxxxxxxxxxxxxxxxxxxxxxx # optional to record without ADS or download sub-only VODS ``` 8. Copy `config.sample.json` to `config.json` and edit it with your settings (username, quality, paths, etc.) 9. run `Python twitch-archive.py` or for multiple streamers `Python twitch-archive.py -u streamer` [...](https://github.com/piero0920/Twitch-Archive/blob/main/extra.md)