Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

An updated experience #19

Open
0042 opened this issue Nov 11, 2022 · 4 comments
Open

An updated experience #19

0042 opened this issue Nov 11, 2022 · 4 comments

Comments

@0042
Copy link

0042 commented Nov 11, 2022

Hi, as of 2022-11-10(?), twitchpipe recordings contain intermission screens. One "preparing your stream..." screen at the beginning (15s), and "commercial break in progress" screens during ads.

For some recordings, the "commercial break in progress" screen does not appear, the vod will simply jump to next segment. The result is the start of a broadcast is missing, and seeking during playback is pretty broken.

I assume this is due to embed streams getting an 'updated experience'
https://discuss.dev.twitch.tv/t/an-updated-twitch-embedded-player-viewer-experience/41718
streamlink/streamlink#4934 (comment)

It's understandable if there's little interest in continuing given Twitch's goal of self-destruction. Regardless, gratitude is long overdue for a project that has worked flawlessly for this length of time. Thank you

@Hakkin
Copy link
Owner

Hakkin commented Nov 11, 2022

Hi, thanks for the issue. I'm also seeing the same thing, seems like Twitch finally patched the embedded player loophole. Unfortunately, unless somebody finds some new combination of headers that makes Twitch not return ads, it seems like it's no longer possible to bypass them easily. I can't promise anything, but there are a few things I would like to try. At the very least it's definitely possible to just filter out the ad segments, I wasn't doing this up until now because, at least on my end, they were never presented to me in the first place, so there was no need to filter them. I think it also should be possible to, instead of just filtering the segments, replace them with their 360p30 counterparts from the ad-free sub-stream Twitch provides. This should make it possible again to capture the very start of the broadcast and bits between commercial breaks, albeit at a lower quality than source. I can't give any precise timeline on when I could make these updates though, sorry.

@Hakkin
Copy link
Owner

Hakkin commented Nov 11, 2022

Oh, another thing I thought of was allowing the proxying of the m3u8, apparently Twitch won't serve ads to certain countries if you proxy the playlist? Needs more experimenting though, you can already do this by setting the HTTPS_PROXY env var, but it will proxy the segments too which might not be what you want.

@0042
Copy link
Author

0042 commented Nov 23, 2022

Hi, thanks for the prompt reply. I'm glad to hear that you're still interested in the project. Currently I've reverted to streamlink which is an absolute mess of spaghetti python, it's using 5x cpu load per-stream (compared to twitchpipe) but it's working, for now.

@Hakkin
Copy link
Owner

Hakkin commented Dec 11, 2022

Hi, Twitch finally killed what remained of their old API, forcing me to update to the GQL API. In the process, I added a few basic flags that can help a bit with bypassing ads.
See https://github.com/Hakkin/twitchpipe/releases/tag/v0.3.0
At the very least, if you really want to bypass the ads, you can buy Twitch Turbo and then put your account's OAuth token into --access-token-oauth. Otherwise, it's pretty much the same cat and mouse game of people finding combinations of player/platform/device-ID workarounds until Twitch patches them. For now I've just defaulted them back to "web"/"site" like the default Twitch web player uses since I don't know of anything better.

I still haven't been able to get around to adding the more advanced features like I discussed above, I've sketched out a basic design, but I think it would pretty much require a complete rewrite of the program, and would be much more complex than it currently is. I still want to do it, but I'll have to find the time.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants