Skip to content

Streamlink Twitch plugin modified to work with the TTV.LOL API

License

Notifications You must be signed in to change notification settings

2bc4/streamlink-ttvlol

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 
 
 
 
 
 
 
 
 

Repository files navigation

streamlink-ttvlol

About

Streamlink Twitch plugin modified to work with the TTV.LOL API. This proxies the playlist request to a country where Twitch does not serve ads. Note that TTV.LOL-like APIs can still rarely return a playlist with ads, if this happens you'll need to restart streamlink to get a different playlist or switch between proxies.

Not compatible with TTV-LOL-PRO v2 proxies.

Installation

Follow the instructions below for your specific operating system.

Windows, Linux, MacOS.

If you wish to install manually, you can get the latest release here. (If you're not using git Streamlink please try the twitch.py from the releases page first. The twitch.py from the master branch tracks Streamlink master and may break on stable Streamlink releases.)

After installation you will need to point Streamlink at a playlist proxy server with plugin arguments.

More info on Streamlink plugin sideloading here.

Windows

Automatically

Copy the command below and paste it into powershell. Do not run powershell as admin.

If you don't know how to open powershell. Press windows key + r and type powershell into the box and press enter. Copy the contents of the box below and then right click in the powershell window and press enter:

$null= New-Item -ItemType Directory -Path .\AppData\Roaming\streamlink\plugins -Force; iwr -Uri 'https://github.com/2bc4/streamlink-ttvlol/releases/latest/download/twitch.py' -OutFile .\AppData\Roaming\streamlink\plugins\twitch.py

NOTE: If you cannot resolve the URL (receive an error), this is likely due to your TLS version. Run the command below to set your TLS version to 1.2 and re-run the above command:

[Net.ServicePointManager]::SecurityProtocol = [Net.SecurityProtocolType]::Tls12

Manually

Navigate to:

C:\Users\%username%\AppData\Roaming\streamlink

Then create the plugins folder and drop the twitch.py inside of it.

Linux

Automatically

Run the below command in a terminal:

INSTALL_DIR="${XDG_DATA_HOME:-${HOME}/.local/share}/streamlink/plugins"; mkdir -p "$INSTALL_DIR"; curl -L -o "$INSTALL_DIR"/twitch.py 'https://github.com/2bc4/streamlink-ttvlol/releases/latest/download/twitch.py'

Manually

Copy the twitch.py file to:

~/.local/share/streamlink/plugins

MacOS

Automatically

Run the below command in terminal:

INSTALL_DIR="${HOME}/Library/Application Support/streamlink/plugins"; mkdir -p "$INSTALL_DIR"; curl -L -o "$INSTALL_DIR"/twitch.py 'https://github.com/2bc4/streamlink-ttvlol/releases/latest/download/twitch.py'

Manually

Copy the twitch.py file to:

${HOME}/Library/Application Support/streamlink/plugins

Arguments

streamlink-ttvlol adds the following plugin arguments:

--twitch-proxy-playlist

Proxy playlist request through a server that supports the TTV.LOL API (or a server that doesn't with a custom URL, see here). It can also be pointed at multiple comma separated servers which will try each server in order until successful.

Example:

--twitch-proxy-playlist=https://eu.luminous.dev,https://lb-eu.cdn-perfprod.com

--twitch-proxy-playlist-exclude

Can be used to exclude channels from being proxied (eg. you're subscribed to the channel and want to use your OAuth token to avoid ads instead)

Example:

--twitch-proxy-playlist-exclude=forsen,twitch,twitchgaming

--twitch-proxy-playlist-fallback

Enable if Streamlink should fallback to Twitch servers if all requests to playlist proxies fail.

Known compatible public proxy servers

TTV-LOL-PRO v1 servers:

  • https://lb-eu.cdn-perfprod.com (Europe)
  • https://lb-eu2.cdn-perfprod.com (Europe 2)
  • https://lb-eu3.cdn-perfprod.com (Europe 3, using Russia-only proxies)
  • https://lb-eu4.cdn-perfprod.com (Europe 4)
  • https://lb-eu5.cdn-perfprod.com (Europe 5)
  • https://lb-na.cdn-perfprod.com (NA)
  • https://lb-as.cdn-perfprod.com (Asia)
  • https://lb-sa.cdn-perfprod.com (SA)

luminous-ttv servers:

  • https://eu.luminous.dev (Europe)
  • https://eu2.luminous.dev (Europe 2)
  • https://as.luminous.dev (Asia)

streamlink-twitch-gui

If you're using streamlink-twitch-gui then you'll need to check the "Enable advanced settings and features" box on the Main tab in settings. You can then add the above argument of your choosing to the "Custom parameters" box on the Streaming tab.

Chatterino

If you're using Chatterino with Streamlink you'll need to add the above argument of your choosing to Settings -> External Tools -> Streamlink -> Additional options.