If you are wondering how to automatically record Twitch streams, then you come to the right place. In a previous article, I mentioned how to record/watch streams with Livestreamer, but that required a lot of work. You had to be on your computer and had to type in commands each and every time a stream went online. That meant you had to know when a streamer was going live.
There’s a much simpler method. What if I told you, you didn’t have to type in any complicated commands. You don’t even have to be anywhere near your computer to record livestreams. In fact, you can record Twitch streams automatically, anytime it goes online, 24/7.
This can be done by using a script alongside a command line tool called Livestreamer.
If you wish to record a live stream other than your own, then please ask for permission before doing so. As of right now, Twitch does not block live copyrighted content (e.g. music), so recording live may result in inadvertently downloading illegal copyright content.
To get started, you need three dependencies. Please download and install the following.
Opening Twitch Recorder
- Copy Twitch Recorder Script
- Paste into New Text Document
- Save as Twitch Recorder.py
Modifying Twitch Recorder
The script was designed to minimize user input, so you do not need to enter the Twitch username every time you run the script. So some minor changes need to be applied to the script.
There are four values that need to be changed and customized. The refresh, user, quality, and directory.
Refresh The refresh rate refers to the amount of times Twitch Recorder will check if a stream is live. The default value is 30 seconds. You can change the value in seconds. For example, if you want it to check every 5 minutes, then input 300 seconds.
User The username of the Twitch streamer you want to record. Input only the username and not the entire Twitch link.
Quality The default value is “best”. I recommend keeping it at the best available quality, but if you do not have a fast internet connection or have data caps, then lower the quality.
There are five quality options: Best, High, Medium, Low, Mobile
Input the quality you want inside the quotations.
Directory The default directory is C: drive. Change the directory to the address you desire, but remember to place the address inside the quotations and end with double backlashes (\\).
Running Twitch Recorder
There are two ways to run this script. One way is to run it with python’s default IDE. Another is to run through python.exe.
Running with IDLE
I recommend running Twitch Recorder with IDLE. If you run into any errors, it will show you error codes. While python.exe will simply close if it encounters any errors.
Open with IDLE. Click Run -> Run Module
Running with Python.exe
You may need to set python.exe to open by default. Once it is set to open by default all you have to do is double click Twitch Recorder to start recording.
To set to open by default:
Right Click Twitch Recorder -> Open With -> Choose Default Program
Browse for Python.exe. It should be in your Python34 folder located in C: drive.
Do not make the refresh rate lower than 15 seconds. Twitch has a rate limit and will ban you from accessing their servers if you spam them.
Ideally you want to keep it around 30 to 60 seconds. From my experience, Twitch does not update the stream status frequently enough to warrant a lower refresh rate than 30 seconds.
By checking anywhere from 30 seconds to 5 minutes, you make sure you don’t miss a single moment of a stream.
However, if a streamer only streams a couple times per month then checking frequently is a waste of resources.
Checking occasionally, anywhere from 5 minutes to once a day. This is for checking streamers who only stream every once in a while.
It uses less resources, but will miss a lot of game play depending on the length of the refresh interval.
I will definitely recommend checking frequently rather than occasionally, even if a streamer doesn’t stream regularly. The script uses less resources than watching Twitch with Adobe Flash and that’s with the script actively recording.
Typically you need at least 300Kb/sec download speed but that depends on the quality you select and the server you connect to.
If you have an internet data cap, it is not recommended you use this script to download streams.
Hard Drive Capacity
Before running the script, make sure you have enough hard drive space to support all the downloaded streams. Generally streamers will stream for at least a couple hours a day, with some streaming as much as 12 hours per day.
That means videos of up to 15 GB per day, everyday. If left unchecked, videos will begin to build up. Especially if you are monitoring daily streamers.
Articles That May Interest You:
How to Watch/Record Twitch Streams using Livestreamer
Four Awesome Ways to Download VODs from Twitch
If you run into any problems or need help troubleshooting then please leave a comment below.