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

Pre-cache large songs in chunks #290

Open
th3y opened this issue May 14, 2024 · 3 comments
Open

Pre-cache large songs in chunks #290

th3y opened this issue May 14, 2024 · 3 comments
Labels
enhancement New feature or request

Comments

@th3y
Copy link

th3y commented May 14, 2024

Would be interested, based on podcast and large video music, that these elements could be pre-cached in chunks, since there's a limit of 10MB of download, using &range=x-y in chunks could help to accelerate the process, instead of waiting an eternity:

So, if the video is more than 10MB, ie: 30 MB, the precache should download it in 3 chunks
&range=0-10000000
&range=10000001=20000000
&range=20000001=30000000

Of course there should be limit (Not gonna download 200MB of precache single video)
More info at reverse-engineering-youtube-revisited

@th3y th3y added the enhancement New feature or request label May 14, 2024
@25huizengek1
Copy link
Owner

What makes this behavior more useful is that the threshold doesn't actually apply to the overall size of the stream, but rather to the size of the requested part. In other words, if you try fetching only a portion of the data — using the Range HTTP header — YouTube will serve the corresponding content at full speed, as long as the specified byte range is smaller than 10 megabytes.

I actually did not know about this. I'll take a look.

@25huizengek1
Copy link
Owner

There was already some chunking going on, but I added the Range header as specified in the blog, shouldn't harm anyone, right?

Interesting blog post though, maybe it's a good idea to revisit the way ViTune gets data from YouTube because they seem to approach it in a way that cleverly bypasses some restrictions (currently, we rely on Piped for that)

@25huizengek1
Copy link
Owner

@25huizengek1 25huizengek1 reopened this May 19, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

2 participants