plugin.video.twitch icon indicating copy to clipboard operation
plugin.video.twitch copied to clipboard

EXT-X-DISCONTINUITY for adaptive streams

Open anxdpanic opened this issue 5 years ago • 10 comments

anxdpanic avatar Apr 09 '19 17:04 anxdpanic

Follow up to #439

anxdpanic avatar Apr 09 '19 17:04 anxdpanic

I'm curious, can the twitch plugin tell if twitch is playing an ad? if so, can it emit some event, somehow?

i ask because it would be nice to catch the event elsewhere and make the api call to kodi to mute it (and bonus points if the plugin can emit a another event for not an ad).

the fact that this is labeled with a dependency tag makes me think no :(

cmsimike avatar Apr 10 '19 01:04 cmsimike

I really don't like the ads either, but in good faith I don't think the add-on should try to bypass/silence them.

It's handled by Kodi or InputStream Adaptive, but there may be a player event triggered (onAVChange) where checking the playing url may show if it's an ad or not. Not sure how reliable this would be but this could be done separately from something like the autoexec.py.

anxdpanic avatar Apr 10 '19 01:04 anxdpanic

I really don't like the ads either, but in good faith I don't think the add-on should try to bypass/silence them.

makes sense! thanks for weighing in.

cmsimike avatar Apr 10 '19 01:04 cmsimike

I believe they use this feature to inject. Would it be possible to get a toggle feature that can only be adjusted by changing a flag in a config file by hand - for example one called use_optional_features=yes which when enabled will allow EXT-X-DISCONTINUITY and have that be the default?

debdrup avatar Oct 01 '19 16:10 debdrup

Hi and sorry for my bad english.

  • For a while, i have never experienced a lot of ads, but recently maybe a month older, i've had ads on some of my favorite feeds, a lot of add. Without adaptative i got a background with a coutdown.

  • I don't like ads, I don't like pre-roll and mid-roll. the mid-roll one is very very boring.

  • Adaptive quality setup remove pre-roll but give me black screen of death and/or ads loop on mid-roll with/without hardware acceleration.

related issues : #447 (this one), #457, #452 (bsod), https://github.com/anxdpanic/Twitch-on-Kodi/issues/451#issuecomment-691730933

So I just found a way to remove the ads and hope @anxdpanic will implement the change. With a try_to_disable_ads option maybe or a way to setup platform used manually ? for be compatible with :

I don't think the add-on should try to bypass/silence them.

The posts of @bastimeyer and @pixeltris help me a lot in finding a solution for the ads :

8 days ago : https://github.com/streamlink/streamlink/issues/3120#issuecomment-692309197

from 16 Mar 2019 : https://github.com/streamlink/streamlink/issues/2357#issuecomment-473565335

From my 2 day test : Use platform="web" like the current version show instantly a ads on some stream. return server_ads=true. Use platform="ps4" remove ads. return server_ads=true. like before this commit https://github.com/anxdpanic/Twitch-on-Kodi/commit/86e3e7bc1ace4dd62d3f58cd237a0ab546d52303 Use platform="_" remove ads. return server_ads=false.

So all is under def get_live u need change that line :

https://github.com/anxdpanic/Twitch-on-Kodi/blob/a452f1419912b1fe2487d1d03bdaf3878fc1f85f/resources/lib/twitch_addon/addon/api.py#L337

to :

results = self.usher.live_request(name, platform='ps4', headers=self.get_private_credential_headers())

then no more ads until twitch change.

Psychoses avatar Sep 22 '20 20:09 Psychoses

@Psychoses Thanks for the information, I was aware myself but others likely weren't.

As mentioned previously, in good faith to Twitch and the Streamers I won't change the add-on in a way to intentionally block ads when possible, there are subscriptions and twitch turbo for that. I know that isn't the answer any one wants, but at this point we are allowed to exist and I'd rather the add-on exist with ads and not be forced to a different client.

anxdpanic avatar Sep 22 '20 20:09 anxdpanic

@anxdpanic what if there was a way to implement the adblocking via an additional extension that wouldn't be added to the official kodi repo similar to the sponsorblock plugin works for YouTube. That way if Twitch gets salty they can complain about that one. Also, as the plugin is you don't see the actual ad just the splash screen so I doubt anyone is getting paid right now. It's just an annoyance to us.

Toiletmason avatar Jun 25 '21 06:06 Toiletmason

@anxdpanic bad faith or not, I think at least being able to silence their ads would be good for one's sanity.. and I think they would still get money for it.

Twitch has the worst ads system of all the streaming sites.. They will often serve you like 6 or more of the same unskippable ads each time every hour or less ... Even youtube ads give you option to skip the ads after a few seconds..

If you don't want to officially implement it, at least give an external plugin (like sponsorblock as suggested) or whatever method (e.g. tutorial) to do this..

madmax2 avatar Apr 03 '24 23:04 madmax2

@Psychoses is your method for removal of the ads still working in 2024?

So we just change the api.py line to results = self.usher.live_request(name, platform='ps4', headers=self.get_private_credential_headers())

After we edited and save the file. where do we put the api.py file if we already installed the addon?

ie where is the location of the api,py file on the kodi storage location or do we need to reinstall addon again, with the included api.py file?

===========

Is platform='ps4', the only option that works?

what happens if you use the other two options, does it not remove the ads? -Use platform="web" like the current version show instantly a ads on some stream. return server_ads=true. -Use platform="_" remove ads. return server_ads=false.

madmax2 avatar Apr 03 '24 23:04 madmax2