Open VadimBoev opened 3 years ago
I figured it out, it turns out that the Range parameter is needed in the header. But I don't understand how to calculate the required amount. I found it in the debug in youtube-dl
I figured it out, it turns out that the Range parameter is needed in the header. But I don't understand how to calculate the required amount. I found it in the debug in youtube-dl
I have something like the below and it works pretty well, I have the part length set to 1048576 bytes which is just over 1mb and I can easily download 60mb files in under 3 seconds, most 5 minute audio files are around 5 to 8mb so it only takes a fraction of a second to download and the part length can even be increased I was just a bit worried about youtube blocking my connection for downloading files too quickly
@borneagle71 tried your solution, still got throttled
Issue was resolved in new package https://github.com/yt-dlp/yt-dlp
No PHP version though. @Athlon1600 have you thought of porting it as well?
Issue was resolved in new package https://github.com/yt-dlp/yt-dlp
No PHP version though. @Athlon1600 have you thought of porting it as well?
as soon as I figure out how they did it, yeah. I may have time this weekend. It's definitely on my to-do list, because I use this library myself...
@borneagle71 tried your solution, still got throttled
Issue was resolved in new package https://github.com/yt-dlp/yt-dlp
No PHP version though. @Athlon1600 have you thought of porting it as well?
Ok as you've probably figured out youtube is restricting download speed to ~50kbps which is sadge but I've written a workaround that I've been using for about a week now that seems to work fine reducing the download time to 5-10 seconds which is way slower than before but still much better than trying to do a straight download. With some minor tweaks it could probably be sped up quite a bit. My solution looks a little like the below. this is using guzzle to preform multiple async requests at once, I have PART_LENGTH set to 50000 as that is the max transfer speed that youtube seems to be allowing for now but tweaking that might allow for faster downloads
^ yup, as a last resort option, that would be the way to do it when all the download links you get back have a "speed limit".
For now, there is still a way to parse links without download speed limits. See my new release:
https://github.com/Athlon1600/youtube-downloader/releases
I got these download speeds:
Old version: 50kbps New version: 150-650kbps
I still have this problem
Download speed for me has dropped to 60kbps :(
I have an internet connection with a speed of more than 300 megabits per second. But the download of the file obtained from the link is slow and is about 1000 kilobytes per second. How to solve this problem?