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

Youtube Download Slows Down after 10 seconds #355

Closed
phil2508 opened this issue Jun 4, 2012 · 19 comments
Closed

Youtube Download Slows Down after 10 seconds #355

phil2508 opened this issue Jun 4, 2012 · 19 comments

Comments

@phil2508
Copy link

@phil2508 phil2508 commented Jun 4, 2012

Tried this on 4 different machines, two Suse, one Ubuntu, one Mac. The same problem on every environment: Download starts with about 800kb/s but slows down to 200kb/s after about 10 seconds and then drifts all the way down to 50-80kb/s. Videos that are 3 minutes or longer take forever to download. Can this be fixed?

@rg3
Copy link
Collaborator

@rg3 rg3 commented Jun 4, 2012

This is due to YouTube limiting the download speed server-side to
approximately match the video streaming needs.

@jcarlosgarciasegovia
Copy link
Contributor

@jcarlosgarciasegovia jcarlosgarciasegovia commented Jun 6, 2012

@rg3 So, why did you not close this issue?

@rg3
Copy link
Collaborator

@rg3 rg3 commented Jun 6, 2012

I'm not the current maintainer, so I don't close issues. :)

@phihag phihag closed this Jun 6, 2012
@phihag
Copy link
Contributor

@phihag phihag commented Jun 6, 2012

In my (non-scientific) experience, youtube may send videos with a constant fast speed if you don't run into any congestion at all (i.e. with a 100MBit/s link). Since the same seems to apply to videos in the web browser as well, I don't think there's anything we can do about it.

@phil2508
Copy link
Author

@phil2508 phil2508 commented Jun 6, 2012

Tried this on a 200Mb/s connection and same slow down happening. Bummer. Would be interesting to get best practices on which format has the best speed/quality ratio.

@phil2508
Copy link
Author

@phil2508 phil2508 commented Jun 10, 2012

Ok, after some research it seems like the solution is multi-threading. Other (mostly desktop tools) use that technique to speed up the download process and trick Youtube that way.

Should I post this as a feature request??

@rbrito
Copy link
Contributor

@rbrito rbrito commented Aug 9, 2012

Downloading the videos with external downloaders (like my branch that passes the videos to aria2c) mitigate this issue (I open 4 parallel connections at a time). Nota bene: mitigates, but doesn't solve.

@hickford
Copy link

@hickford hickford commented Sep 18, 2012

I have this issue too.

@phil2508
Copy link
Author

@phil2508 phil2508 commented Sep 18, 2012

Can you make this available?
On Aug 9, 2012 12:57 AM, "Rogério Brito" notifications@github.com wrote:

Downloading the videos with external downloaders (like my branch that
passes the videos to aria2c) mitigate this issue (I open 4 parallel
connections at a time). Nota bene: mitigates, but doesn't solve.


Reply to this email directly or view it on GitHubhttps://github.com//issues/355#issuecomment-7607737.

@LouisPlisso
Copy link

@LouisPlisso LouisPlisso commented Sep 19, 2012

Nowadays, YouTube sends the first 40 seconds of video at maximum rate, and then limits the throughput of the connection.
You can find the details (it depends on the browser...) here: http://www-sop.inria.fr/members/Chadi.Barakat/CONEXT2011.pdf

@rbrito
Copy link
Contributor

@rbrito rbrito commented Sep 20, 2012

@phil2508, you can see the aria2c downloading that I mentioned at #182

@gettalong
Copy link

@gettalong gettalong commented Feb 4, 2013

Using -f 43 works for me for fast downloads, ie. I download with roughly 100MBit which is my network speed.

@phil2508
Copy link
Author

@phil2508 phil2508 commented Feb 4, 2013

I ended up using AXEL at 23 threads in parallel. I get 200 MB/s at times

@rbrito
Copy link
Contributor

@rbrito rbrito commented Feb 6, 2013

@phil2508, I'm surprised that they didn't start rejecting your connections. Using aria2c with only 4 concurrent connections, I surely did see my connections being rejected and the use of only 1 thread.

Another thing that I observed was that if a given video is available in HD, then they didn't throttle the download and I could get my downloads as fast as my pipe allowed, compared to if I use --max-quality set to, say, 35.

@NoahY
Copy link

@NoahY NoahY commented Mar 6, 2013

-f 43 fixed it for me, thanks :)

@mpenkov
Copy link

@mpenkov mpenkov commented Mar 15, 2013

For the record, -f 43 downloads the video in Google's WebM format (VP8 video, Orbis audio). It's a faster download, but also different to what YouTube would normally serve (H.264 video, mp3 audio, if I'm not mistaken).

@FiloSottile FiloSottile mentioned this issue Apr 4, 2013
@corwin-of-amber
Copy link

@corwin-of-amber corwin-of-amber commented Mar 18, 2017

Can someone explain what the -f flag does? I looked at the source and there is a flag -q but it looks as if -f should not even be valid, but it is! Losing my mind here. Pls help.

@SalimF
Copy link

@SalimF SalimF commented Apr 16, 2018

I know this is bit old bu I manged to get full speed using external downloaded

youtube-dl -f http-480 http://www.dailymotion.com/video/ --external-downloader axel --external-downloader-args " -U 'Mozilla' -o out.ts -n 16"

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
You can’t perform that action at this time.