youtube-dl: youtube-dl downloading extremely slow (< 200KiB/s)

Please follow the guide below

  • You will be asked some questions and requested to provide some information, please read them carefully and answer honestly
  • Put an x into all the boxes [ ] relevant to your issue (like this: [x])
  • Use the Preview tab to see what your issue will actually look like

Make sure you are using the latest version: run youtube-dl --version and ensure your version is 2018.01.14. If it’s not, read this FAQ entry and update. Issues with outdated version will be rejected.

  • [x ] I’ve verified and I assure that I’m running youtube-dl 2018.01.14

Before submitting an issue make sure you have:

  • [x ] At least skimmed through the README, most notably the FAQ and BUGS sections
  • [x ] Searched the bugtracker for similar issues including closed ones

What is the purpose of your issue?

  • [x ] 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

The following sections concretize particular purposed issues, you can erase any section (the contents between triple —) not applicable to your issue


If the purpose of this issue is a bug report, site support request or you are not completely sure provide the full verbose output as follows:

Add the -v flag to your command line you run youtube-dl with (youtube-dl -v <your command line>), copy the whole output and insert it here. It should look similar to one below (replace it with your log inserted between triple ```):

root@srvr:/var/www/html# youtube-dl -v --format=140 -o songs/song11.m4a 'https://www.youtube.com/watch?v=4-BtZWGaPNY' 
[debug] System config: []
[debug] User config: []
[debug] Custom config: []
[debug] Command-line args: [u'-v', u'--format=140', u'-o', u'songs/song11.m4a', u'https://www.youtube.com/watch?v=4-BtZWGaPNY']
WARNING: Assuming --restrict-filenames since file system encoding cannot encode all characters. Set the LC_ALL environment variable to fix this.
[debug] Encodings: locale ANSI_X3.4-1968, fs ANSI_X3.4-1968, out ANSI_X3.4-1968, pref ANSI_X3.4-1968
[debug] youtube-dl version 2018.01.14
[debug] Python version 2.7.6 (CPython) - Linux-3.13.0-24-generic-x86_64-with-Ubuntu-14.04-trusty
[debug] exe versions: avconv 9.20-6, avprobe 9.20-6, rtmpdump 2.4
[debug] Proxy map: {}
[youtube] 4-BtZWGaPNY: Downloading webpage
[youtube] 4-BtZWGaPNY: Downloading video info webpage
[youtube] 4-BtZWGaPNY: Extracting video information
[youtube] {22} signature length 42.45, html5 player vflLCGcm0
[youtube] {43} signature length 42.45, html5 player vflLCGcm0
[youtube] {18} signature length 42.45, html5 player vflLCGcm0
[youtube] {36} signature length 42.45, html5 player vflLCGcm0
[youtube] {17} signature length 42.45, html5 player vflLCGcm0
[youtube] {136} signature length 42.45, html5 player vflLCGcm0
[youtube] {247} signature length 42.45, html5 player vflLCGcm0
[youtube] {298} signature length 42.45, html5 player vflLCGcm0
[youtube] {302} signature length 42.45, html5 player vflLCGcm0
[youtube] {135} signature length 42.45, html5 player vflLCGcm0
[youtube] {244} signature length 42.45, html5 player vflLCGcm0
[youtube] {134} signature length 42.45, html5 player vflLCGcm0
[youtube] {243} signature length 42.45, html5 player vflLCGcm0
[youtube] {133} signature length 42.45, html5 player vflLCGcm0
[youtube] {242} signature length 42.45, html5 player vflLCGcm0
[youtube] {160} signature length 42.45, html5 player vflLCGcm0
[youtube] {278} signature length 42.45, html5 player vflLCGcm0
[youtube] {140} signature length 42.45, html5 player vflLCGcm0
[youtube] {171} signature length 42.45, html5 player vflLCGcm0
[youtube] {249} signature length 42.45, html5 player vflLCGcm0
[youtube] {250} signature length 42.45, html5 player vflLCGcm0
[youtube] {251} signature length 42.45, html5 player vflLCGcm0
[debug] Invoking downloader on u'https://r5---sn-5hne6n7z.googlevideo.com/videoplayback?source=youtube&clen=2542652&ms=au&mt=1516109320&mv=m&id=o-AEMDEBbzlzj4SrO-hBEBcXGnvbTDkuN44VftfSf_imxk&dur=160.031&gir=yes&mime=audio%2Fmp4&mn=sn-5hne6n7z&ip=[MY_IP]&ei=iP5dWuSuDNvk1gKozqbIAg&requiressl=yes&itag=140&keepalive=yes&ipbits=0&initcwndbps=243750&pl=25&key=yt6&sparams=clen%2Cdur%2Cei%2Cgir%2Cid%2Cinitcwndbps%2Cip%2Cipbits%2Citag%2Ckeepalive%2Clmt%2Cmime%2Cmm%2Cmn%2Cms%2Cmv%2Cpl%2Crequiressl%2Csource%2Cexpire&lmt=1507243774824422&expire=1516131048&mm=31&signature=80F2ECB5005CE0B0B493625E5E11F0B2DAC2C9F6.DF4FCAF5F8D7F3B5EE37A90EF6772D331317930F&ratebypass=yes'
[download] Destination: songs/song11.m4a
[download] 100% of 2.42MiB in 00:35
[ffmpeg] Correcting container in "songs/song11.m4a"
WARNING: Your copy of avconv is outdated, update avconv to version 10-0 or newer if you encounter any errors.
[debug] ffmpeg command line: avconv -y -i 'file:songs/song11.m4a' -c copy -f mp4 'file:songs/song11.temp.m4a
<end of log>

If the purpose of this issue is a site support request please provide all kinds of example URLs support for which should be included (replace following example URLs by yours):

Note that youtube-dl does not support sites dedicated to copyright infringement. In order for site support request to be accepted all provided example URLs should not violate any copyrights.


Description of your issue, suggested solution and other information

It was working fine until yesterday, but today the speed is ridiculously slow. I tried installing youtube-dl both locally and on my production server, but the speed remains painfully slow, hovering just above 100KiB/s.

I am running the newest version of youtube-dl, and I’ve pasted the log above. I don’t know how to further debug this issue. Please help.

EDIT: running the following command:

curl -s https://raw.githubusercontent.com/sivel/speedtest-cli/master/speedtest.py | python -

gives me results:

Testing download speed… Download: 81.56 Mbit/s

and everything besides youtube-dl seems to be working within expected speed parameters.

EDIT2: sometimes running youtube-dl command simply produces output ‘Segmentation fault’

EDIT3: adding --force-ipv4 did not change anything

About this issue

  • Original URL
  • State: closed
  • Created 6 years ago
  • Comments: 22

Most upvoted comments

I just want to give props to whoever implemented the workaround. Good job and thank you.

~2018.02.03 introduces a new experimental option --http-chunk-size for chunk-based downloading. In particular it allows to speed up downloading of DASH formats on Youtube. According to my observations optimal chunk size for Youtube is <=10MiB (apparently that’s where throttling starts): --http-chunk-size 10M.~ Enforced in 2018.02.04.

PS E:\Test> youtube-dl -f 140 http://www.youtube.com/watch?v=4-BtZWGaPNY
[youtube] 4-BtZWGaPNY: Downloading webpage
[youtube] 4-BtZWGaPNY: Downloading video info webpage
[youtube] 4-BtZWGaPNY: Extracting video information
[youtube] 4-BtZWGaPNY: Downloading js player vflLCGcm0
[download] Destination: NAIMA - Let Me See You [NCS Release]-4-BtZWGaPNY.m4a
[download] 100% of 2.42MiB in 00:35
[ffmpeg] Correcting container in "NAIMA - Let Me See You [NCS Release]-4-BtZWGaPNY.m4a"
PS E:\Test>

That is definitely slow for YouTube. Strange, not sure what is going on.

Hmm. It is fast again today. Not sure if youtube-dl has a fix (2018.02.04) or something else was fixed?

Yes, I am also having the same problem since yesterday morning PST. I wonder if Google is throttling. I notice my downloads start very fast and the slow. For an example with a Verizon FIOS pipe (also seen on Time Warner/Spectrum Cable’s pipe):

$ youtube-dl https://www.youtube.com/watch?v=sC_qXF5UOtg [youtube] sC_qXF5UOtg: Downloading webpage [youtube] sC_qXF5UOtg: Downloading video info webpage [youtube] sC_qXF5UOtg: Extracting video information WARNING: Requested formats are incompatible for merge and will be merged into mkv. [download] Destination: DO TEENS KNOW 2000s TEEN MOVIES (REACT - Do They Know It)-sC_qXF5UOtg.f137.mp4 [download] 83.8% of 135.64MiB at 611.51KiB/s ETA 00:36