yt-dlp / yt-dlp

A feature-rich command-line audio/video downloader
https://discord.gg/H5MNcFW63r
The Unlicense
89.15k stars 6.91k forks source link

Google Drive very slow download #4681

Open dizimax opened 2 years ago

dizimax commented 2 years ago

DO NOT REMOVE OR SKIP THE ISSUE TEMPLATE

Checklist

Please make sure the question is worded well enough to be understood

No matter which of the download quality I choose from Drive, it downloads very slowly, but if I don't choose quality it downloads pretty fast. I couldn't find anything about it.

Provide verbose output that clearly demonstrates the problem

Complete Verbose Output

yt>yt-dlp --cookies cookie.txt -f 18 "https://drive.google.com/file/d/1RI3TV8Slqew18U6Leud9bGpdjjvwM4mz/view?usp=sharing" -o tests.mp4 --verbose
[debug] Command-line config: ['--cookies', 'cookie.txt', '-f', '18', 'https://drive.google.com/file/d/1RI3TV8Slqew18U6Leud9bGpdjjvwM4mz/view?usp=sharing', '-o', 'tests.mp4', '--verbose']
[debug] Encodings: locale cp1252, fs utf-8, pref cp1252, out utf-8, error utf-8, screen utf-8
[debug] yt-dlp version 2022.08.14 [5593720] (win32_exe)
[debug] Python 3.8.10 (CPython 64bit) - Windows-10-10.0.14393-SP0
[debug] Checking exe version: ffmpeg -bsfs
[debug] Checking exe version: ffprobe -bsfs
[debug] exe versions: none
[debug] Optional libraries: Cryptodome-3.15.0, brotli-1.0.9, certifi-2022.06.15, mutagen-1.45.1, sqlite3-2.6.0, websockets-10.3
[debug] Proxy map: {}
[debug] [GoogleDrive] Extracting URL: https://drive.google.com/file/d/1RI3TV8Slqew18U6Leud9bGpdjjvwM4mz/view?usp=sharing
[GoogleDrive] 1RI3TV8Slqew18U6Leud9bGpdjjvwM4mz: Downloading webpage
[GoogleDrive] 1RI3TV8Slqew18U6Leud9bGpdjjvwM4mz: Requesting source file
[GoogleDrive] 1RI3TV8Slqew18U6Leud9bGpdjjvwM4mz: Requesting confirmed source file
[debug] Formats sorted by: hasvid, ie_pref, lang, quality, res, fps, hdr:12(7), vcodec:vp9.2(10), channels, acodec, filesize, fs_approx, tbr, vbr, abr, asr, proto, vext, aext, hasaud, source, id
[info] 1RI3TV8Slqew18U6Leud9bGpdjjvwM4mz: Downloading 1 format(s): 18
[debug] Invoking http downloader on "https://rr1---sn-4g5edn6r.c.drive.google.com/videoplayback?expire=1660714968&ei=mEf8Ytw6pZfYtg-IwKeYDQ&ip=167.235.69.110&cp=QVRLUkhfU1lUSVhPOnZYcl9ZVzJ3bVFZMUlVdUlVcHc3bWZ2UnVHbVVETXNUZVhsZmhWSzB3MEo&id=16bab3161f04a728&itag=18&source=webdrive&requiressl=yes&mh=Mp&mm=32&mn=sn-4g5edn6r&ms=su&mv=u&mvi=1&pl=24&ttl=transient&susc=dr&driveid=1RI3TV8Slqew18U6Leud9bGpdjjvwM4mz&app=explorer&mime=video/mp4&vprv=1&prv=1&dur=2458.273&lmt=1633704754261975&mt=1660699487&subapp=NONE&sparams=expire%2Cei%2Cip%2Ccp%2Cid%2Citag%2Csource%2Crequiressl%2Cttl%2Csusc%2Cdriveid%2Capp%2Cmime%2Cvprv%2Cprv%2Cdur%2Clmt&sig=AOq0QJ8wRAIgIS_Ehpuw-dcZePtxNvhhLbgzNsLGvUWpM4AMhg-nyVQCIAYwmiGpuyI2xFy65a9gqoWeLLwQphi-8_vrKscY-UgE&lsparams=mh%2Cmm%2Cmn%2Cms%2Cmv%2Cmvi%2Cpl&lsig=AG3C_xAwRAIgdehEovfvwemW49drH27ZDEz7WsHk0z44mq_LFjtjCagCIDM09W5YTzLprx-Fa6wJ8Czs9F9l0QMO7Ybl0wiN2PBq"
[download] Resuming download at byte 2866354
[debug] File locking is not supported. Proceeding without locking
[download] Destination: tests.mp4
[download]   3.3% of 86.83MiB at   76.15KiB/s ETA 18:49
mattsta commented 2 years ago

I noticed the same limited speed issue with regular youtube downloads starting yesterday and it is still happening today too.

Looks like the JS loader is busted so we're back to default bulk download max speeds of 60kB/s-70kB/s until (or even if) it can be fixed again?

[debug] Command-line config: ['--embed-chapters', '--embed-thumbnail', '--embed-subs', '--no-mtime', '--socket-timeout', '5', '-vU', '-f136+bestaudio', 'https://www.youtube.com/watch?v=0kgtS00uh6U']
[debug] Encodings: locale UTF-8, fs utf-8, pref UTF-8, out utf-8, error utf-8, screen utf-8
[debug] yt-dlp version 2022.08.14 [5593720] (pip)
[debug] Python 3.10.6 (CPython 64bit) - macOS-12.4-arm64-arm-64bit 
[debug] Checking exe version: ffmpeg -bsfs
[debug] Checking exe version: ffprobe -bsfs
[debug] exe versions: ffmpeg 5.1 (setts), ffprobe 5.1, rtmpdump 2.4
[debug] Optional libraries: Cryptodome-3.15.0, brotli-1.0.9, certifi-2022.06.15, mutagen-1.45.1, sqlite3-2.6.0, websockets-10.3
[debug] Proxy map: {}
[debug] Fetching release info: https://api.github.com/repos/yt-dlp/yt-dlp/releases/latest
Latest version: 2022.08.14, Current version: 2022.08.14
yt-dlp is up to date (2022.08.14)
[debug] [youtube] Extracting URL: https://www.youtube.com/watch?v=0kgtS00uh6U
[youtube] 0kgtS00uh6U: Downloading webpage
[youtube] 0kgtS00uh6U: Downloading android player API JSON
[debug] Loading youtube-nsig.c81bbb4a from cache
WARNING: [youtube] nsig extraction failed: You may experience throttling for some formats
n = fwQ6nqqb4e4K2jlEJ ; player = https://www.youtube.com/s/player/c81bbb4a/player_ias.vflset/en_US/base.js
[debug] [youtube] 0kgtS00uh6U: Traceback (most recent call last):
  File "/opt/homebrew/Cellar/yt-dlp/2022.8.14/libexec/lib/python3.10/site-packages/yt_dlp/extractor/youtube.py", line 2624, in _decrypt_nsig
    self._player_cache[sig_id] = func(s)
  File "/opt/homebrew/Cellar/yt-dlp/2022.8.14/libexec/lib/python3.10/site-packages/yt_dlp/extractor/youtube.py", line 2657, in <lambda>
    return lambda s: func([s])
  File "/opt/homebrew/Cellar/yt-dlp/2022.8.14/libexec/lib/python3.10/site-packages/yt_dlp/jsinterp.py", line 639, in resf
    ret, should_abort = self.interpret_statement(code.replace('\n', ''), var_stack, allow_recursion - 1)
  File "/opt/homebrew/Cellar/yt-dlp/2022.8.14/libexec/lib/python3.10/site-packages/yt_dlp/jsinterp.py", line 106, in interpret_statement
    ret, should_ret = f(self, stmt, local_vars, allow_recursion, *args, **kwargs)
  File "/opt/homebrew/Cellar/yt-dlp/2022.8.14/libexec/lib/python3.10/site-packages/yt_dlp/jsinterp.py", line 269, in interpret_statement
    try_expr, expr = self._separate_at_paren(expr[m.end():], '}')
  File "/opt/homebrew/Cellar/yt-dlp/2022.8.14/libexec/lib/python3.10/site-packages/yt_dlp/jsinterp.py", line 165, in _separate_at_paren
    raise cls.Exception(f'No terminating paren {delim}', expr)
yt_dlp.jsinterp.JSInterpreter.Exception: No terminating paren } in: {try{c[102]>new Date("01 January 1970 00:00:04 ...40*Math.pow(8,5)],(0,c[Math.pow(6,1)%195--11])())}; please report this issue on  https://github.com/yt-dlp/yt-dlp/issues?q= , filling out the appropriate issue template. Confirm you are on the latest version using  yt-dlp -U
 (caused by Exception('No terminating paren } in: {try{c[102]>new Date("01 January 1970 00:00:04 ...40*Math.pow(8,5)],(0,c[Math.pow(6,1)%195--11])())}; please report this issue on  https://github.com/yt-dlp/yt-dlp/issues?q= , filling out the appropriate issue template. Confirm you are on the latest version using  yt-dlp -U')); please report this issue on  https://github.com/yt-dlp/yt-dlp/issues?q= , filling out the appropriate issue template. Confirm you are on the latest version using  yt-dlp -U
[debug] Sort order given by extractor: quality, res, fps, hdr:12, source, vcodec:vp9.2, channels, acodec, lang, proto
[debug] Formats sorted by: hasvid, ie_pref, quality, res, fps, hdr:12(7), source, vcodec:vp9.2(10), channels, acodec, lang, proto, filesize, fs_approx, tbr, vbr, abr, asr, vext, aext, hasaud, id
[info] 0kgtS00uh6U: Downloading 1 format(s): 136+251
[info] Downloading video thumbnail 41 ...
[info] Writing video thumbnail 41 to: Arin FINALLY got past the part and... OH GOD. - Giraffe Town [0kgtS00uh6U].webp
[debug] Invoking http downloader on "https://rr2---sn-a5mekn6z.googlevideo.com/videoplayback?expire=1660780122&ei=-in9YpzzKvmFsfIPxrikiAU&ip=104.53.23.92&id=o-AFlamMmaFSpytPBFlLuLGsy68zEenBs84Nsu-4W3a0rK&itag=136&aitags=133%2C134%2C135%2C136%2C160%2C242%2C243%2C244%2C247%2C278%2C298%2C299%2C302%2C303&source=youtube&requiressl=yes&hcs=ir%2C&mh=Mx&mm=31%2C26&mn=sn-a5mekn6z%2Csn-o097znsl&ms=au%2Conr&mv=m&mvi=2&pl=20&rmhost=rr3---sn-a5mekn6z.googlevideo.com%2C&initcwndbps=1246250&spc=lT-KhqubckJUlsVZhmnmQuyoOmGs9y8&vprv=1&mime=video%2Fmp4&ns=EggwbIN9uGz8SKglo04UOMsH&gir=yes&clen=453952420&dur=3164.699&lmt=1660338263498501&mt=1660758087&fvip=5&keepalive=yes&fexp=24001373%2C24007246&c=WEB&rbqsm=fr&txp=4432434&n=fwQ6nqqb4e4K2jlEJ&sparams=expire%2Cei%2Cip%2Cid%2Caitags%2Csource%2Crequiressl%2Cspc%2Cvprv%2Cmime%2Cns%2Cgir%2Cclen%2Cdur%2Clmt&sig=AOq0QJ8wRgIhAOTzby8B3vXGOWJlex0rUZDFUqjMp3y-4rct-5V5VfJFAiEArkLQRqSjoUAfIL4Ce3JbYZQzT94Hf9JDcRld4gCmdTI%3D&lsparams=hcs%2Cmh%2Cmm%2Cmn%2Cms%2Cmv%2Cmvi%2Cpl%2Crmhost%2Cinitcwndbps&lsig=AG3C_xAwRgIhAMco6gFoLXniwkj5MqYPz7NZi2fqZAVWyTULtHhANZ77AiEA_4OQBAHzMd-F3Al0tz6kTX5EJOKc_KzeCBeeEFfDxPA%3D"
[download] Destination: Arin FINALLY got past the part and... OH GOD. - Giraffe Town [0kgtS00uh6U].f136.mp4
[download]   0.4% of 432.92MiB at   63.15KiB/s ETA 01:56:29
gamer191 commented 2 years ago

@mattsta That's a different issue, see #4635 Tl;dr update to yt-dlp version 2020.08.19, and report there if the issue continues (and use PhantomJS as a temporary workaround in the meantime)

dizimax commented 2 years ago

issue continue