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

Occasionally streams are very slow to download #706

Open
Tyrrrz opened this issue May 2, 2023 · 3 comments
Open

Occasionally streams are very slow to download #706

Tyrrrz opened this issue May 2, 2023 · 3 comments

Comments

@Tyrrrz
Copy link
Owner

Tyrrrz commented May 2, 2023

Version

v6.2.13 / master

Details

When using the TVHTML5_SIMPLY_EMBEDDED_PLAYER client (or any other JS-enabled client, but this is the one we're using), occasionally YouTube may return a stream that has the n parameter. This parameter is an encrypted signature, similar to sig, but is responsible for rate throttling.

It also incorporates much more complicated cipher functions, so the existing deciphering code will not be enough to tackle it.

Currently, these kinds of streams are not too common, but I assume they will become more prolific as time goes on. It's not a huge issue now as the TVHTML5_SIMPLY_EMBEDDED_PLAYER client is only used for age-restricted videos.

Steps to reproduce

  • Use the Demo.Gui project
  • Resolve stream manifest for any age-restricted video:
    public const string AgeRestrictedViolent = "rXMX4YJ7Lks";
    public const string AgeRestrictedSexual = "SkRSXFQerZs";
    public const string AgeRestrictedEmbedRestricted = "hySoCSoH-g8";
  • Try to download any stream and observe very low download speed
  • If the issue doesn't happen, retry from the beginning again (this can take several attempts)

Updated, much more consistent steps to reproduce that require a VPN:

@xBaank
Copy link
Contributor

xBaank commented May 18, 2023

I wonder if using the base.js functions could be a solution for the TVHTML5_SIMPLY_EMBEDDED_PLAYER. Maybe this PR could be used as start point #601 but it would be needed to add a js interpreter

@Mrgaton
Copy link

Mrgaton commented Oct 10, 2023

i have same issue :C

@sakib1361
Copy link

As Tyrrrz suspected, this is causing problems for more and more videos. I am using the library for Realtime playback (WInui 3) and on some videos, I can't even play smoothly. Link generated by ytdlp seems to be working though.

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

No branches or pull requests

4 participants