https://github.com/jazware/twitch_recorder
This repo is a dump for some tooling to record and transcode twitch streams for archiving.
https://github.com/jazware/twitch_recorder
Last synced: 8 months ago
JSON representation
This repo is a dump for some tooling to record and transcode twitch streams for archiving.
- Host: GitHub
- URL: https://github.com/jazware/twitch_recorder
- Owner: jazware
- License: mit
- Created: 2021-05-10T05:50:44.000Z (about 5 years ago)
- Default Branch: main
- Last Pushed: 2022-02-25T01:53:47.000Z (over 4 years ago)
- Last Synced: 2025-09-09T07:37:04.042Z (9 months ago)
- Language: Python
- Size: 4.88 KB
- Stars: 0
- Watchers: 2
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# Twitch Recorder
This repo is a dump for some tooling to record and transcode twitch streams for archiving.
Since Twitch implemented a new separate audio stream (soundtrack) for audio that may contain copyrighted content, VOD recordings on Twitch.tv no longer give the full audio stream from the livestream, just the non-soundtrack stream which makes streams that heavily utilize music less fun to watch in VOD form.
I watch a handful of slots streamers and they like to DJ while playing slots, but some of them stream from Malta in timezones that don't make it easy to catch them live from California, so this tooling was to give me an archive and backlog of slots content to throw on a screen while doing other things.
To save on storage, I processed the streams with `ffmpeg`, dropping the 60fps streams to 30fps and transcoding to `x265` to save on space but keep decent quality.
If you happen to end up here, good luck if you decide to use this as-is software.
## Running the Twitch Recorder
To start monitoring a channel and record it when it shows up, run the `record_stream.py` script as follows:
```
python3 record_stream.py --channel --path --quality
```
Where `` comes from `twitch.tv/` for the broadcaster and `` is the path where you'd like the software to create folders and stream files.
Finally, `` can be `best`, `high`, `medium`, `low`, and `audio`.
## Running the Transcoder
To start transcoding your recorded streams, install `ffmpeg` and run the `transcode.py` script as follows:
```
python3 transcode.py --path
```
I recommend running these in their own `gnu-screen` or `tmux` sessions so you can detach and leave them running long-term.
Tweak the `ffmpeg` transcoding configuration and/or quality choices for the live stream as desired.
Thanks!