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

Display instantaneous download speed instead of average speed #9541

Open
UtkrishtDhankar opened this issue May 19, 2016 · 4 comments
Open

Display instantaneous download speed instead of average speed #9541

UtkrishtDhankar opened this issue May 19, 2016 · 4 comments
Labels

Comments

@UtkrishtDhankar
Copy link

@UtkrishtDhankar UtkrishtDhankar commented May 19, 2016

  • I've verified and I assure that I'm running youtube-dl 2016.05.16
  • At least skimmed through README and most notably FAQ and BUGS sections
  • Searched the bugtracker for similar issues including closed ones

What is the purpose of your issue?

  • Bug report (encountered problems with youtube-dl)
  • Site support request (request for adding support for a new site)
  • Feature request (request for a new functionality)
  • Question
  • Other

I have an incredibly unstable internet connection. My download speed will often fluctuate from being in the low kbps decades to the 5-10 mbps range. From what I've been able to see from my cursory search of the codebase, youtube-dl calculates speed as an average over the whole download process:

from https://github.com/rg3/youtube-dl/blob/f9b1529af8aec98bffd42edb5be15e1ada791a20/youtube_dl/downloader/common.py

@staticmethod
    def calc_speed(start, now, bytes):
        dif = now - start
        if bytes == 0 or dif < 0.001:  # One millisecond
            return None
        return float(bytes) / dif

Perhaps you should add a method to return the speed over the past few seconds rather than the whole download, so that wierd internet slowdowns don't show me wildly different average speed than the current speed.

@jaimeMF jaimeMF added the request label May 19, 2016
@leokhachatorians
Copy link

@leokhachatorians leokhachatorians commented May 20, 2016

+1

@grumpstar
Copy link

@grumpstar grumpstar commented May 21, 2016

@leokhachatorians yah that would be cool, I'm going to switch back to a digital subscriber line.

@danfiscus
Copy link

@danfiscus danfiscus commented May 22, 2016

I would actually prefer the average, because my internet is absolute garbage and it will spike really high for a second or so then drop off almost entirely. It cycles like this, so I like the average download speed over instantaneous because it gives me a better idea of what my overall speed is. I understand lots of people would find instantaneous speed useful, and maybe myself included if I were to switch ISPs, but I would prefer it be an option rather than having the average speed removed completely.

@mpenkov
Copy link

@mpenkov mpenkov commented Nov 23, 2017

Is anybody working on this? If not, I'll have a look.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Linked pull requests

Successfully merging a pull request may close this issue.

None yet
6 participants
You can’t perform that action at this time.