Comments (10)
There is few things to note:
- Downloads are very slow, I bet this is youtube limiting the speed to what you can listen to.
- Another option would be that the downloader implementation in rustube is really slow (There are using 10kb chunks so maybe the issue is here)
- This maybe worth investigating or rustube side
from ytermusic.
Seems that youtube is slowing downloads to non-player accesses:
dirkf/youtube-dl@cf00163
So they changed their security and if you aren't using the new system you get slowed down.
from ytermusic.
DzenanJupic/rustube#37
A fix would be to change the chunk size to >10Mb but this will increase RAM usage a lot. Still it would be better than slow downloads
from ytermusic.
IMO having the player consume 10Mb per download worker is really not unreasonable. This could be configurable if RAM constraints are really a problem, but chances are that the primary use case it so have a download as fast as possible to start playing music. This is only a problem because streaming isn't possible, again. :)
from ytermusic.
https://github.com/ytdl-org/youtube-dl/pull/30184/files in _unthrottle_format_urls
from ytermusic.
@Alphare I looked a bit to what is required to make this work and clearly it's a LOT of work like hundred of lines of code. unthrottling seems even more complicated than download videos
from ytermusic.
@Alphare It's on the RustTube side I could try fixing it myself but it'll make lots of time and will be very complicated. The PyTube solution is maybe better since they aren't interpreting the JS code and just hacking it. While YtDl took the path of interpreting the JS easing the implementation but having to ship a JS interpreter. BOA in rust is probably good enough but still I would rather avoid interpreters shipped with YT-Music
from ytermusic.
@Alphare I started working on a fix but IDK why it doesn't work (Seems like an infinite loop) (I generated the code using Copilot to convert it from Python (PyTube project)) It probably missed something somewhere but need more investigation https://github.com/ccgauche/rustube
from ytermusic.
Fixed in commit 9bf984f using my own fix in rustube. I'll try to merge it but it needs some cleanup https://github.com/Discursif/rustube
from ytermusic.
FYI this seems to work flawlessly. Now the downloads are as fast as they could possibly be. :)
from ytermusic.
Related Issues (20)
- Search doesn't seem to work HOT 6
- Add sponsorblock support to skip automatically non musical parts
- can't load playlists from music.youtube.com anymore HOT 15
- Crash when resizing too much the terminal
- Going back to a playing playlist shouldn't change the play state HOT 13
- Inspector view does not show the currently playing song when looking at a playlist that contains it
- Allow saving playlists / albums for offline listening
- Add a waveform seekbar HOT 1
- Skip automatically when volume is 0
- Add a shortcut to delete all search bar at once
- Change download color to be more visible when reading (AKA dark blue on black isn't a good idea)
- Add repeat mechanisms HOT 2
- Save the song to the likes playlist HOT 4
- API seems to not work anymore? HOT 1
- Headers file is invalid even though it should be valid? HOT 5
- Performance issue on KDE Plasma HOT 9
- Add ability to directly give a playlist URL HOT 1
- Issue while reading playlists HOT 14
- How to remvoe local music? HOT 3
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 ytermusic.