1
0
mirror of https://github.com/pixeltris/TwitchAdSolutions.git synced 2024-11-25 20:02:52 +01:00
Go to file
2020-12-27 17:28:42 +00:00
base Add proxy-m3u8 2020-12-27 17:28:42 +00:00
dyn Add proxy-m3u8 2020-12-27 17:28:42 +00:00
dyn-skip Add proxy-m3u8 2020-12-27 17:28:42 +00:00
dyn-skip-midroll Add proxy-m3u8 2020-12-27 17:28:42 +00:00
dyn-video-swap Add proxy-m3u8 2020-12-27 17:28:42 +00:00
low-res Rename userscript files for easier install #2 2020-12-26 12:08:27 +00:00
mute-black Add proxy-m3u8 2020-12-27 17:28:42 +00:00
proxy-m3u8 Add proxy-m3u8 2020-12-27 17:28:42 +00:00
README.md Add proxy-m3u8 2020-12-27 17:28:42 +00:00
utils.bat Add utils for testing SSAI 2020-12-26 20:28:32 +00:00
utils.cs Add proxy-m3u8 2020-12-27 17:28:42 +00:00

TwitchAdSolutions

This repo aims to provide multiple solutions for blocking Twitch ads.

Current solutions

  • dyn-skip (ublock / userscript)
    • Notifies Twitch that ads were watched before requesting the main live stream.
    • May slightly slow down loading of streams.
    • Falls back to mute-black if this fails (use an alternative solution if it always fails for you, as it adds additional load).
    • Currently only handles pre-rolls (mid-roll ads should be muted/blacked out) (mid-rolls will require a player reload, which currently isn't implemented)
  • dyn-skip-midroll (ublock / userscript)
    • The same as dyn-skip, but also skips midroll ads (experimental/untested).
    • This requires the script to work perfectly, otherwise the player will hit a reload loop.
  • dyn-video-swap (ublock / userscript)
    • Ads are replaced by a low resolution stream for the duration of the ad.
    • Similar to dyn, but skips closer to 20 seconds when switching to the live stream.
    • You might see tiny bits of the ad.
    • Audio controls wont work whilst the ad is playing.
  • dyn (ublock / userscript)
    • Ad segments are replaced by low resolution stream segments (on a m3u8 level).
    • Skips 2-3 seconds when switching to the live stream.
    • Stuttering and looping of segments often occur (during the ad segments).
    • NOTE: Removing segments doesn't notify Twitch that ads were watched (aka more served ads).
  • low-res (ublock / userscript)
    • No ads.
    • The stream is 480p for the duration of the stream.
  • mute-black (ublock / userscript)
    • Ads are muted / blacked out for the duration of the ad.
    • You might see tiny bits of the ad.
  • proxy-m3u8 (ublock / userscript)
    • Uses a proxy server (set to one controlled by @lukix29) to fetch an ad-free stream.
    • Currently only the initial m3u8 is proxied, so there shouldn't be any additional latency.
    • Assumes the proxy server acts in good faith and maintains a good uptime.

Applying a solution (uBlock Origin)

uBlock Origin solutions are single files, suffixed by ublock-origin.js e.g. low-res-ublock-origin.js.

  • Navigate to the uBlock Origin Dashboard (the extension options)
  • Under the My filters tab add twitch.tv##+js(twitch-videoad).
  • Under the Settings tab, enable I am an advanced user, then click the cog that appears. Modify the value of userResourcesLocation from unset to the full url of the solution you wish to use (if a url is already in use, add a space after the existing url). e.g. userResourcesLocation https://raw.githubusercontent.com/pixeltris/TwitchAdSolutions/master/dyn/dyn-ublock-origin.js

Applying a solution (userscript)

Tampermonkey / Greasemonkey can be used on the files suffixed by user.js e.g. low-res.user.js

  • Viewing one of the userscript files should prompt the given script to be added

Other solutions / projects


https://github.com/streamlink/streamlink (desktop application) https://github.com/nopbreak/TwitchMod (android app) https://twitchls.com/ (external site - purple screen may display every 10-15 mins)

NOTE/TODO

NOTE: Many of these solutions could do with improvements.
TODO: Test midroll ads.
TODO: More testing in general.