Skip to content

Conversation

LisoUseInAIKyrios
Copy link
Contributor

It is intended to spoof the video streams to the web client. For this NewPipeExtractor is used with a PoTokenProvider implementation from NewPipe which uses a background WebView to pass BotGuard. It is assumed, that issues like playback, audio tracks and co would go away. However, NewPipe is not authenticating against YouTube, so some changes may be necessary.

The PR is not ready yet:

  • Refactor
  • Maybe don't rely on Kotlin (or at least not on its stdlib)
  • Implement authentication
  • Actually check if the streams do work and if it fixes stuff like the audio tracks missing
  • Add the po_token.html asset file via a patch
  • Implement this in YT Music as well, not sure if it works there though

@LisoUseInAIKyrios
Copy link
Contributor Author

PR is currently identical to #5748 when it was last open

@Figim
Copy link

Figim commented Sep 17, 2025

@LisoUseInAIKyrios **
Common Improvements

About the side effects of Web clients:
These limitations are due to the auto-update of the Deobfuscation feature. Deobfuscation may be required for all web clients. However, if NewPipe deobfuscation fails, it fixes it within the extractor. You may need to update the Extractor occasionally.

### Ytdlp deobfuscation solution(recommended)

Beginning very soon, you'll need to have the JavaScript runtime Deno installed to keep YouTube downloads working as normal.

Why?

Up until now, yt-dlp has been able to use its built-in JavaScript "interpreter" to solve the JavaScript challenges that are required for YouTube downloads. But due to recent changes on YouTube's end, the built-in JS interpreter will soon be insufficient for this purpose. The changes are so drastic that yt-dlp will need to leverage a proper JavaScript runtime in order to solve the JS challenges.

yt-dlp/yt-dlp#14157

https://github.com/yt-dlp/ejs

New potoken improvement

yt-dlp/yt-dlp#14471

Potoken can be created with or without auth.

The web_music client is added for music.youtube.com URLs when logged-in cookies are used. Some clients, such as web_creator (requires cookies) , will only work with authentication. Not all clients support authentication via cookies.

###

The "Mobile web" client also works well.

### Caption Potoken

**Potoken support could also be implemented for "Caption". Newpipe has not done it yet

FreeTubeApp/FreeTube#7484

Web client can request SABR. Newpipe does not implement this yet. Ytdlp and FreeTube did it.**

YTdlp pr; yt-dlp/yt-dlp#13515 Other: etwoo/youtube-unthrottle@76b48d0

Freetube: FreeTubeApp/FreeTube#7145

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

Successfully merging this pull request may close these issues.

3 participants