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

download rate rapidly drops after few seconds #865

Open
ghost opened this issue Jul 11, 2018 · 8 comments
Open

download rate rapidly drops after few seconds #865

ghost opened this issue Jul 11, 2018 · 8 comments

Comments

@ghost
Copy link

ghost commented Jul 11, 2018

Hi,

I was runnning mpsyt for a while now and everything worked smoothly. A while ago I noticed massive download rate drops (10 Mbits to a few Kbits after one or two seconds downloading). First I thought it may be a bug that will be fixed soon but it seems that it isn't.

mpsyt version      : 0.2.8
pafy version       : 0.5.4 (youtube-dl backend)
youtube-dl version : 2018.07.10
Python version     : 3.6.6 (default, Jun 27 2018, 13:11:40) 
[GCC 8.1.1 20180531]
Platform           : Linux-4.17.5-1-ARCH-x86_64-with-arch

Thanks in advance!

@ritiek
Copy link
Member

ritiek commented Jul 11, 2018

This is a problem with YouTube itself (see ytdl-org/youtube-dl#15271 and mps-youtube/pafy#199).

This was fixed in pafy recently. Maybe we should just use it download videos in mps-youtube as well.

@ghost
Copy link
Author

ghost commented Jul 11, 2018

Nevermind then; I should train my search-skills.

@ghost ghost closed this as completed Jul 11, 2018
@ritiek
Copy link
Member

ritiek commented Jul 11, 2018

Nope, your issue is a valid one. This still hasn't been fixed for mps-youtube. Let's keep this open.

@ghost ghost reopened this Jul 11, 2018
@ghost
Copy link
Author

ghost commented Jul 11, 2018

Python 3.6.6 (default, Jun 27 2018, 13:11:40) 
[GCC 8.1.1 20180531] on linux
Type "help", "copyright", "credits" or "license" for more information.
>>> import pafy
>>> video = pafy.new("https://www.youtube.com/watch?v=w6P0DKlr_D4")
>>> audio = video.getbestaudio()
>>> audio.download()
^CTraceback (most recent call last):Rate: [ 189 KB/s].  ETA: [388 secs]  

I'm a little bit off today, sorry.

@ritiek
Copy link
Member

ritiek commented Jul 11, 2018

Actually, that fix hasn't been released on PyPi yet. That code should download at full speed installing pafy directly from GitHub.

pip install -U git+https://github.com/mps-youtube/pafy.git

@nemanjan00
Copy link

nemanjan00 commented Jul 27, 2018

I am still having the same problem, after installing pafy from git...

@ghost
Copy link
Author

ghost commented Jul 29, 2018

use the code I've posted above, this should work. it isn't fixed for mpsyt yet.

@ritiek
Copy link
Member

ritiek commented Aug 19, 2018

At the moment, you can use youtube-dl as an external downloader to avoid download speed throttling:

set download_command youtube-dl %i -x -o %F

EDIT: The above command will only download audio streams. You should rather use this command so that it works for everything:

set download_command youtube-dl --http-chunk-size 10485760 %u -o %F

For the curious one - this chunk size 10485760 comes directly from youtube-dl source.

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

No branches or pull requests

2 participants