Git Product home page Git Product logo

Comments (10)

ccgauche avatar ccgauche commented on July 22, 2024

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.

ccgauche avatar ccgauche commented on July 22, 2024

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.

ccgauche avatar ccgauche commented on July 22, 2024

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.

Alphare avatar Alphare commented on July 22, 2024

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.

ccgauche avatar ccgauche commented on July 22, 2024

https://github.com/ytdl-org/youtube-dl/pull/30184/files in _unthrottle_format_urls

from ytermusic.

ccgauche avatar ccgauche commented on July 22, 2024

@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.

ccgauche avatar ccgauche commented on July 22, 2024

@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.

ccgauche avatar ccgauche commented on July 22, 2024

@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.

ccgauche avatar ccgauche commented on July 22, 2024

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.

Alphare avatar Alphare commented on July 22, 2024

FYI this seems to work flawlessly. Now the downloads are as fast as they could possibly be. :)

from ytermusic.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo 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.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.