Comments (7)
I believe it's because both those projects download in 10MB chunks
Here's Invidious: https://github.com/iv-org/invidious/blob/9dfa268204f20b6eba65d3f0977a590e3fbfc120/src/invidious/routes/video_playback.cr#L120 (HTTP_CHUNK_SIZE
is 10485760
which is ~10MB)
And here's yt-dlp: https://github.com/yt-dlp/yt-dlp/blob/4d9280c9c853733534dda60486fa949bcca36c9e/yt_dlp/extractor/youtube.py#L3671
Unfortunately I don't really know how to implement this into youtube-local, but I think this is the core of the issue.
Also, you should also pass 'params': '8AEB',
in the root of the JSON request, as this lets the Android client play YouTube Stories.
from youtube-local.
@ImportTaste Current chunk size is 262144 bytes, set in line 116 in server.py if you want to try it. Can't check if it works until tomorrow night
Edit: Those are the TCP chunks, so that would be the wrong value to change. Looking more closely, now I see what you're pointing at is that they split up the single range request into multiple range requests in 10 MB chunks, so we would need to split it up into a for loop like they do.
from youtube-local.
@ImportTaste Current chunk size is 262144 bytes, set in line 116 in server.py if you want to try it. Can't check if it works until tomorrow night
Edit: Those are the TCP chunks, so that would be the wrong value to change. Looking more closely, now I see what you're pointing at is that they split up the single range request into multiple range requests in 10 MB chunks, so we would need to split it up into a for loop like they do.
That seems to be the case. it's beyond my ability to implement, but I hope I was of some help regardless.
from youtube-local.
It appears that's not the issue. As it is, video file requests using av-merge.js already split the requests into small range requests. Additionally, I ran an experiment where I inserted urls from yt-dlp into youtube-local, and the video played fine without 403s, so something is wrong with the URLs themselves. Looking into it
from youtube-local.
The params was the problem, thanks for pointing that out. Latest release fixes it
from youtube-local.
There's an age-restricted video that is exhibiting the same throttling behavior that I experienced with this issue. Is it related to #146?
from youtube-local.
There's an age-restricted video that is exhibiting the same throttling behavior that I experienced with this issue. Is it related to #146?
Yes, because for those it uses the TVHTML5_SIMPLY_EMBEDDED_PLAYER client instead of the ANDROID client. Android doesn't require decryption. TV embedded does, and one encryption thing is that nsig which causes the video to be throttled
from youtube-local.
Related Issues (20)
- Video player option Plyr probably has an old version (2017?) not supporting full screen by double-click or? HOT 1
- Error: Error getting missing player or bypassing age-restriction: This video is unavailable HOT 3
- When in theater mode, video height exceeds screen viewport HOT 2
- features and suggestions ! cant have enough of them HOT 3
- Failed to connect to tor HOT 1
- Channel page numbers not working HOT 2
- Most videos not working HOT 9
- The system cannot find the specified path. (Windows) HOT 9
- YouTube channels don't load HOT 1
- Feature request: Some minor things
- Video pages for a channel don't work HOT 4
- Error 500 when trying to use "sort by views" sorting on channel page
- Error 500 when hitting Next Page on a youtube channel's Playlists tab HOT 2
- Suggestion: Run example HOT 1
- Option to hide video thumbnails and viewcount HOT 1
- How do I play youtube-local playlists? HOT 1
- "Sort by views" - 500 Uncaught Exception HOT 1
- "Sort by oldest" - 500 Uncaught Exception
- Make a Dockerfile HOT 2
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from youtube-local.