Watching Twitch streams like a chad

Typically, I reject the use of proprietary software or platforms that undermine user privacy and freedom. Unfortunately, most people do not share or understand such views, so a great amount of content is only available under such restrictive platforms.

As a tradeoff, projects like Invidious or Libreddit do their best to return privacy to users by acting as a proxy. A list of similar projects for other platforms is available from The Simple Web project.

However, I was surprised to see no equivalent for Twitch, or at least one that was still maintained. Fortunately for us, this can be achieved thanks to the following list of awesome FOSS projects:

Watching a Twitch livestream over Tor

Disclaimer: using youtube-dl might or might not leak user/system data that might identify users despite using Tor. Use at your own responsibility.

Replace <streamer> with the address of the streamer to watch. The use of torsocks is entirely optional:

torsocks mpv<streamer>

The Tor network is rather slow so, if mpv starts buffering too often, it is recommended to use a lower resolution by appending the --ytdl-format option to mpv. A list of available formats can be retrieved using youtube-dl. Optionally, torsocks can also be used to cloak the IP address:

torsocks youtube-dl --list-formats<streamer>

The command above returns a list of available formats like the one below:

format code       extension  resolution note
audio_only        mp4        audio only  160k , mp4a.40.2
160p              mp4        284x160     230k , avc1.4D401F, 30.0fps, mp4a.40.2
360p              mp4        640x360     630k , avc1.4D401F, 30.0fps, mp4a.40.2
480p              mp4        852x480    1427k , avc1.4D401F, 30.0fps, mp4a.40.2
720p60            mp4        1280x720   3422k , avc1.4D401F, 60.0fps, mp4a.40.2
1080p60__source_  mp4        1920x1080  5232k , avc1.64002A, 60.0fps, mp4a.40.2 (best)

Assign --ytdl-format to the chosen value from the list above. For example:

torsocks mpv --ytdl-format=360p<streamer>

Enjoy watching! 🍿️