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

Slow download Youtube-dl. WHY ? #15384

Closed
1 of 8 tasks
Strychu69 opened this issue Jan 21, 2018 · 16 comments
Closed
1 of 8 tasks

Slow download Youtube-dl. WHY ? #15384

Strychu69 opened this issue Jan 21, 2018 · 16 comments

Comments

@Strychu69
Copy link

Strychu69 commented Jan 21, 2018

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.21. If it's not, read this FAQ entry and update. Issues with outdated version will be rejected.

  • I've verified and I assure that I'm running youtube-dl 2018.01.21

Before submitting an issue make sure you have:

  • At least skimmed through the README, most notably the 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

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 ```):

[debug] System config: []
[debug] User config: []
[debug] Command-line args: [u'-v', u'http://www.youtube.com/watch?v=BaW_jenozKcj']
[debug] Encodings: locale cp1251, fs mbcs, out cp866, pref cp1251
[debug] youtube-dl version 2018.01.21
[debug] Python version 2.7.11 - Windows-2003Server-5.2.3790-SP2
[debug] exe versions: ffmpeg N-75573-g1d0487f, ffprobe N-75573-g1d0487f, rtmpdump 2.4
[debug] Proxy map: {}
...
<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

Explanation of your issue in arbitrary form goes here. Please make sure the description is worded well enough to be understood. Provide as much context and examples as possible.
If work on your issue requires account credentials please provide them or explain how one can obtain them.

@Hrxn
Copy link

Hrxn commented Jan 22, 2018

Because it's limited by YouTube itself.
Please use the search first and close this issue.

@mrfade
Copy link
Contributor

mrfade commented Jan 23, 2018

you can use aria2 downloader. it can download files with multiple connections. downloads can 16x faster than before with this code because it will download from 16 connections
--external-downloader aria2c --external-downloader-args "-x 16 -s 16 -k 1M"

@Strychu69
Copy link
Author

Where i past this?

@james3126
Copy link

I have been miffed by this issue as it's really bad. I have been testing with both the windows and Linux versions of youtube-dl.

With Linux (installed through apt-get):
Command:
youtube-dl -o '~/Red-DiscordBot/mp3storage/test.%(ext)s' https://www.youtube.com/watch?v=y6120QOlsfU

Result:
[download] 20.0% of 14.32MiB at 241.94KiB/s ETA 00:48
With Windows (installed through PIP):
Command:
youtube-dl -o "C:\Users\james\test.%(ext)s" https://www.youtube.com/watch?v=y6120QOlsfU

Result:
[download] 100% of 24.77MiB in 00:05

SAME VIDEO
SAME COMMAND (Apart from file save location)
SAME VERSION
DIFFERENT OS
DIFFERENT DOWNLOAD SPEEDS

@dstftw
Copy link
Collaborator

dstftw commented Jan 23, 2018

14.32MiB
24.77MiB

You are downloading two different files one of them falls under Youtube throttling.

@isabelcoolaf
Copy link

isabelcoolaf commented Jan 26, 2018

What exactly do you mean "falls under Youtube throttling"
what is the criteria for it to fall under that?

edit: sorry for posting on a closed issue

@stefanos82
Copy link

I came here to report this, because I saw the first report, like 8 days ago and they closed it with the excuse of being YouTube's problem.

I have tried aria2c as well as my external downloader and the issue was the same.

I have downloaded my files with JDownloader2 without a fuss.

What's the catch here?

Cheers.

@Hrxn
Copy link

Hrxn commented Jan 27, 2018

I have downloaded my files with JDownloader2 without a fuss.

Very likely different formats, i.e. similar to youtube-dl with -f best.
(Which is not actually the best, but this is all in youtube-dl's Readme.md)

@rudolphos
Copy link

rudolphos commented Feb 3, 2018

@TRNAME

Can I do this somehow by using Ubuntu (Store app version) on Windows?
I usually have a .bat file which I open and input the URL to download videos, but can I somehow link the .bat script to Ubuntu subsystem?

The easiest way I figured is to download aria2 for windows and put it in the same folder where .bat is, I did that, but aria2c.exe is not launching somehow.

I use this script to download subtitles:

@echo off
cls
:start
echo
set /p input="Input URL: "
youtube-dl --external-downloader /aria2c/aria2c.exe --external-downloader-args "-x 16 -s 16 -k 1M"-ci --no-check-certificate --convert-subs srt --write-auto-sub  --skip-download  -w --download-archive /Subtitles/file.txt -o "/Subtitles/%%(title)s (%%(id)s).%%(ext)s" %input%
goto start

Also another problem is having is with .vtt subtitles download from youtube, they are not being converted to SRT.

@dstftw
Copy link
Collaborator

dstftw commented Feb 3, 2018

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.

@ofekp
Copy link

ofekp commented Feb 17, 2018

Sorry for pooping this up again, is there a way to use this --http-chunk-size with python, meaning the options available when you create a new object youtube_dl.YoutubeDL(options).
The list of options is describe in the following link, but I could not find the aforementioned setting there:
https://github.com/rg3/youtube-dl/blob/3e4cedf9e8cd3157df2457df7274d0c842421945/youtube_dl/YoutubeDL.py#L137-L312

@dstftw
Copy link
Collaborator

dstftw commented Feb 17, 2018

It's described in downloader since it's a downloader option.

@ofekp
Copy link

ofekp commented Feb 17, 2018

Thanks for replying, not sure I understand, though.
Just saw this:
ba51538#diff-28d2a60e59d5c0e2b113f2863e935e16R354

so I guess I need to use it like so http_chunk_size, am I right?

I am using the following options, and still getting very slow speeds after about 10 seconds:

    options = {
        'writethumbnail': True,
        'outtmpl': yt_song_structure['playlist_path'] + '/' + yt_song_structure['title'] + '.%(ext)s',
        #'force-ipv4': True,
        'extractaudio': True,
        'noplaylist': True,
        'http_chunk_size': 2097152,
        #'max_downloads': 1,
        'progress_hooks': [youtubeDlHook],
        'format': 'bestaudio/best',
        'format': 'webm',
        #'ignoreerrors': True,
        'postprocessors': [
          {
            'key': 'FFmpegExtractAudio',
            'preferredcodec': 'mp3',
            #'preferredquality': '192',
          },
          {'key': 'FFmpegMetadata'},
          {'key': 'EmbedThumbnail'},
        ]
    }

@dstftw
Copy link
Collaborator

dstftw commented Feb 17, 2018

Simply don't touch it. It's enabled by default. Most likely your version is outdated.

@ofekp
Copy link

ofekp commented Feb 17, 2018

Don't think this is a version issue:

$ youtube-dl --version
2018.02.11

@dstftw
Copy link
Collaborator

dstftw commented Feb 17, 2018

Well, I'm not a telepathist. If you believe there is a bug open a new issue with properly filled issue template.

@ytdl-org ytdl-org locked as resolved and limited conversation to collaborators Feb 17, 2018
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

No branches or pull requests

9 participants