instance01 / Twitch-HLS-AdBlock

Block advertisements that are inserted in Twitch streams directly.
MIT License
261 stars 25 forks source link

Never ending black screen + some error #30

Open NickWinston123 opened 3 years ago

NickWinston123 commented 3 years ago

Hey, I think twitch found a work around for ublock origin because it stopped working for me last night. I found this and tried it out but the screen stays black with a loading symbol in the middle and never ends up showing the stream (tried waiting ~5 minutes)

I'm not sure if this is related but when I view my extensions, I noticed the extension had errors and it were these:

Image 09-29-2020 18-11-16

alex-ong commented 3 years ago

I did the same thing as you; i suspect that this plugin currently doesnt work...

Staark92 commented 3 years ago

same issue. only just downloaded the plugin yesterday and it worked fine for about 2 hours then infinite loading

JasperKazai commented 3 years ago

Yeah, this extension blocks most Twitch streams from loading. I found a handful of streams I tried out that do work, but most do not. Disabling the extension allows streams to load again, but Twitch has found a way to bypass both Ublock Origin and AdBlock Plus, because once this extension is disabled, I get ads. Not sure why some streams still work, though. Maybe the streamer has to opt into the new ad nonsense, and the ones that work have not yet.

dotnetdan commented 3 years ago

I've tested locally and this issue is fixed by pull request #29. Would be great if we can get it merged.

alex-ong commented 3 years ago

@dotnetdan I know you're not the project maintainer but do you know if any one is doing a build?

RaphaelRochet commented 3 years ago

Hi. Here's a installable xpi (remove .zip from file name) if of any help : twitch_hls_ad_block-0.6.3-fx.xpi.zip

DrunkMunki commented 3 years ago

this is now fixed in ublock official update https://github.com/gorhill/uBlock/releases/tag/1.30.4

retrobenny commented 3 years ago

Any chance somebody can provide a crx build as well,or get that stuff merged already? The forced pre-roll ads have gotten quite relentless lately.

Really wish somebody could find a way to influence change to make the ads not interrupt the stream playback but instead play alongside the stream so as to not interrupt it so you don't end up missing anything.

JasperKazai commented 3 years ago

Twitch is super determined to make people watch ads. We're now back to this addon not working (streams never load past the black screen with this enabled) and ads are bypassing Ublock/ABP again. I've never seen a turn around this quick.

pixeltris commented 3 years ago

@JasperKazai As mentioned in this issue, #29 fixes the issue with loading streams.

A big issue for me is that the current implementation will strip ALL segments when there are ANY ad segments. This means a couple of things:

1) You have a longer delay to view the stream as live segments / ad segments initially start off together 2) When it strips all segments the player will instantly re-request the main m3u8. This results in thousands of m3u8 requests whilst it looks for non-ad segments (literally a DDoS if used widely).

Additionally there's no indicator on screen that the extension is in the process of stripping ads. Some text at the top of the stream would be useful and fairly simple to add.

I've made a uBlockOrigin script based on this extension which addresses the above issues, but it misses out on the sequence tracking that this extension uses which I think would break at mid-roll ads https://gist.github.com/pixeltris/ee77c8338d7ebe1b9973dfcc973409d8

@instance01 do you have any intention of continuing to work on this? Or would it be best to fork?

retrobenny commented 3 years ago

I wonder if an attempt has been made to replace any and all mid-roll/pre-roll ads via a script with a video that lasts 1 second or even shorter and at super low quality so it loads even faster? The script would have the tiny video copy the name of the ad vid and trick it into being said ad vid. Another thing would be to detect known lengths of ad vids to target those specifically by having a cache of them and their lengths,also updating occasionally every time the list of them changes. One more idea could be to alter the loaded ad vid "copy" to trick it into being much shorter in length,making it end prematurely.

Another thing could be to trick it into being a past broadcast then load the stream through that,if possible.

pixeltris commented 3 years ago

Detecting and removing ad segments is easy at the moment as they are conveniently tagged. There isn't any need to process the content of the actual video stream. The only issue with removing segments is that it messes with the player sequencing (potentially introducing stuttering / loops), but this should only really be an issue for mid-rolls.

Even if they were to implement it perfectly, it would still be detectable as they will still need to flag the start/end time so that the player knows to make the stream/ad clickable so that they can get their money for the click-through. It's extremely unlikely they would ever serve zero engagement ads.

The main issue is getting served live segments as quickly as possible. This simply doesn't happen until the server believes it should serve you the actual live stream, it doesn't matter how much you make requests on the m3u8. Maybe a distributed system might work where users are part of a network and share live .ts files where available (as not everyone is served ads in the same way). This would need to be done on a per-stream basis obviously.

instance01 commented 3 years ago

@pixeltris best to fork. I'm currently loaded with a few other projects. Also, I've stopped watching Twitch for quite some time now.

If anyone likes to maintain a fork, I will link to it in the Readme.