1
0
mirror of https://github.com/pixeltris/TwitchAdSolutions.git synced 2024-11-22 02:12:45 +01:00
TwitchAdSolutions/README.md
2020-12-29 21:18:57 +00:00

7.9 KiB

TwitchAdSolutions

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

Recommendations

M3U8 proxies (or full proxies) are currently the most reliable way of avoiding ads (assuming you trust the third party). More proxy hosts would be ideal (see #8).

  • Twitch AdBlock by ChoosenEye - chrome / firefox
  • Twitch Video Ad Blocker by squizc - chrome / firefox (proxied url includes your user id / a unique id used for gql requests)
  • proxy-m3u8 - see below (currently uses the proxy server by ChoosenEye)

If you don't trust third parties then dyn-skip / dyn-skip-midroll-alt are decent. ttv-tools (firefox) also has nice features.

Current solutions

These solutions generally aren't compatible with other Twitch ad blockers. e.g. ttv-ublock will break dyn-skip (and others).

  • dyn-skip (ublock / userscript)
    • Notifies Twitch that ads were watched before requesting the main live stream.
    • Falls back to mute-black if this fails (use an alternative solution if it always fails for you, as it adds additional load).
    • Midroll ads are muted/blacked out, try dyn-skip-midroll or dyn-skip-midroll-alt for a more complete solution.
  • dyn-skip-midroll (ublock / userscript)
    • The same as dyn-skip, but also attempts to skip midroll ads (it looks like this results in a reload loop, an alternative is dyn-skip-midroll-alt).
    • This requires the script to work perfectly, otherwise the player will hit a reload loop.
  • dyn-skip-midroll-alt (ublock / userscript)
    • A mix of dyn-skip-midroll / dyn to avoid player reload spam during midroll ads (player reloads are limited to 60 seconds apart, low resolution stream plays when nothing else is available - might be a little glitchy but better than player reload spam).
  • 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 ChoosenEye) 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.
    • The current proxy owner doesn't like the url being used by this project, an alternative host would be ideal. (requires a web server hosted in a non-ad country, taking a channel name as the last url arg, and fetching the m3u8 - see #8).

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


NOTE/TODO

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