yt-dlp: Youtube get URL with slow speed download

DO NOT REMOVE OR SKIP THE ISSUE TEMPLATE

  • I understand that I will be blocked if I intentionally remove or skip any mandatory* field

Checklist

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

Hi, I’m wondering if anyone else is having the same problem as me in that the URL of the Youtube video occasionally has sluggish download speed (around 30KB/s), especially with video format id 137?

The download speed is too slow about 161KB/s but many videos have better speed:

[youtube] Extracting URL: yTCDVfMz15M
[youtube] yTCDVfMz15M: Downloading webpage
[youtube] yTCDVfMz15M: Downloading android player API JSON
[info] yTCDVfMz15M: Downloading 1 format(s): 22
[download] Destination: P!nk - Try (Official Video) [yTCDVfMz15M].mp4
[download] 100% of   19.67MiB in 00:00:00 at 51.88MiB/s

Do you think this is an issue? Thanks.

Provide verbose output that clearly demonstrates the problem

  • Run your yt-dlp command with -vU flag added (yt-dlp -vU <your command line>)
  • Copy the WHOLE output (starting with [debug] Command-line config) and insert it below

Complete Verbose Output

# yt-dlp -vUf 135 https://www.youtube.com/watch?v=xspg7SNxTWA
[debug] Command-line config: ['-vUf', '135', 'https://www.youtube.com/watch?v=xspg7SNxTWA']
[debug] Encodings: locale UTF-8, fs utf-8, pref UTF-8, out UTF-8, error UTF-8, screen UTF-8
[debug] yt-dlp version 2023.02.17 [a0a7c01] (pip)
[debug] Python 3.7.16 (CPython x86_64 64bit) - Linux-4.18.0-408.el8.x86_64-x86_64-with-Ubuntu-18.04-bionic (OpenSSL 1.1.1  11 Sep 2018, glibc 2.26)
[debug] exe versions: ffmpeg information (setts), ffprobe information
[debug] Optional libraries: Cryptodome-3.17, certifi-2022.12.07, mutagen-1.45.1, sqlite3-2.6.0, websockets-9.1
[debug] Proxy map: {}
[debug] Loaded 1782 extractors
[debug] Fetching release info: https://api.github.com/repos/yt-dlp/yt-dlp/releases/latest
Latest version: 2023.02.17, Current version: 2023.02.17
yt-dlp is up to date (2023.02.17)
[youtube] Extracting URL: https://www.youtube.com/watch?v=xspg7SNxTWA
[youtube] xspg7SNxTWA: Downloading webpage
[youtube] xspg7SNxTWA: Downloading android player API JSON
[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] xspg7SNxTWA: Downloading 1 format(s): 135
[debug] Invoking http downloader on "https://rr1---sn-4g5edndk.googlevideo.com/videoplayback?expire=1677515027&ei=s4T8Y8GHO5rUx_AP35WQqA4&ip=2a01%3A4f8%3Ac012%3Ab3a8%3A%3A1&id=o-AIxNKYAlgaop4aDLJjX4yRbnMKseszlaJ5r0ZJ0eVKrP&itag=135&source=youtube&requiressl=yes&mh=qW&mm=31%2C26&mn=sn-4g5edndk%2Csn-f5f7lnl7&ms=au%2Conr&mv=m&mvi=1&pl=55&initcwndbps=416250&spc=H3gIhs1kP_ug_Xp9ODDuze4ZxXFwTH4&vprv=1&svpuc=1&mime=video%2Fmp4&gir=yes&clen=36627864&dur=441.120&lmt=1651178714289365&mt=1677493029&fvip=5&keepalive=yes&fexp=24007246&c=ANDROID&txp=4532434&sparams=expire%2Cei%2Cip%2Cid%2Citag%2Csource%2Crequiressl%2Cspc%2Cvprv%2Csvpuc%2Cmime%2Cgir%2Cclen%2Cdur%2Clmt&sig=AOq0QJ8wRQIgPozUSci2egLWCG2vrCMVyejJl1j3bXxX1tG1_6tzEg4CIQDeE4-uoYSdwTlh-zYWPXfKFBh5FOVxp1Cr2q75kH34BA%3D%3D&lsparams=mh%2Cmm%2Cmn%2Cms%2Cmv%2Cmvi%2Cpl%2Cinitcwndbps&lsig=AG3C_xAwRQIhAPUiwVIkp1MlH9CHSuExUXn2Wrd9OYwkVkuAVv7YY-uCAiAtQ8hRWW3eWF9ZzOJ2AG7S-2SXagZRzJZurS-GARquSw%3D%3D"
[download] Resuming download at byte 915795
[download] Destination: At the Cross - Hillsong Worship [xspg7SNxTWA].mp4
[download]  16.4% of   34.93MiB at  161.57KiB/s ETA 03:05

About this issue

  • Original URL
  • State: closed
  • Created a year ago
  • Reactions: 45
  • Comments: 94 (17 by maintainers)

Commits related to this issue

Most upvoted comments

brief investigation for devs: It looks like using the &range param for videoplayback links instead of the Range header gives full speed for YouTube (i.e. YouTube is throttling our use of the Range header).

very hacky diff for POC:


diff --git a/yt_dlp/downloader/http.py b/yt_dlp/downloader/http.py
index fa72d5722..dbe7ca0f4 100644
--- a/yt_dlp/downloader/http.py
+++ b/yt_dlp/downloader/http.py
@@ -18,7 +18,7 @@
     parse_http_range,
     sanitized_Request,
     try_call,
-    write_xattr,
+    write_xattr, update_url_query,
 )
 
 RESPONSE_READ_EXCEPTIONS = (
@@ -120,12 +120,14 @@ def establish_connection():
             if try_call(lambda: range_end >= ctx.content_len):
                 range_end = ctx.content_len - 1
 
-            request = sanitized_Request(url, request_data, headers)
             has_range = range_start is not None
-            if has_range:
-                request.add_header('Range', f'bytes={int(range_start)}-{int_or_none(range_end) or ""}')
+            request = sanitized_Request(url if not has_range else update_url_query(url, {'range': f'{int(range_start)}-{int_or_none(range_end) or ""}'}), request_data, headers)
+
+            # if has_range:
+            #     request.add_header('Range', f'bytes={int(range_start)}-{int_or_none(range_end) or ""}')
             # Establish connection
             try:
+                total_length = int_or_none(self.ydl.urlopen(sanitized_Request(url, request_data, headers)).headers.get('Content-Length'))
                 ctx.data = self.ydl.urlopen(request)
                 # When trying to resume, Content-Range HTTP header of response has to be checked
                 # to match the value of requested Range HTTP header. This is due to a webservers
@@ -133,8 +135,8 @@ def establish_connection():
                 # set in response despite of requested Range (see
                 # https://github.com/ytdl-org/youtube-dl/issues/6057#issuecomment-126129799)
                 if has_range:
-                    content_range = ctx.data.headers.get('Content-Range')
-                    content_range_start, content_range_end, content_len = parse_http_range(content_range)
+                    # content_range = ctx.data.headers.get('Content-Range')
+                    content_range_start, content_range_end, content_len = range_start, range_end, total_length
                     # Content-Range is present and matches requested Range, resume is possible
                     if range_start == content_range_start and (
                             # Non-chunked download

YouTube’s range doesn’t return a Content-Range header which is a pain, nor does it appear you use the Range header alongside it. (edit: we’ll need to pull this data from the player response)

We may need a youtube-specific downloader 🤔

cc @pukkandan

Everyone can reproduce it now and we are investigating. Pls don’t post more "me too"s unless you have some new information to add

Thanks for the fast fix! When may we have a release with this fix?

very hacky diff for POC:

For anyone who uses the yt-dlp pre-compiled builds (such as myself), here is coletdev’s patch in binary form: https://github.com/gamer191/yt-dlp/releases/tag/2023.02.28.110119

DO NOT USE THESE BUILDS ON ANY WEBSITE OTHER THEN YOUTUBE.COM!!!

I will make release when I am able to, but not immediately. Maintaining this project is something I do in my free time, and not my whole life!

Until then, you have many options, including using Daily builds or PiP installing from master

I’m trying on many VPS, and the problem appears at random. (and I dont see the issue with profile 720p, 360p) Here’s some additional information: I have two VPSs, VPS A with regular download speeds and VPS B with sluggish download speeds. I attempt to download the URL ytdlp created on VPS A to VPS B => Download speed is normal. When I try to download on VPS A, the URL created on VPS B is sluggish.

So I think the issue may be come from URL generation function.

Here’s a link to daily yt-dlp builds of master. I’d highly recommend using them: https://github.com/ytdl-patched/yt-dlp/releases/tag/2023.03.01.19419

Hello admin please solve this issue yt_dlp used to download mp3 audio faster before but today i tried it’s too slow it problem from your side please fix yt_dlp as soon as possible

The method youtube uses is non-standard. So fixing this for external downloaders in general will be hard/impossible. We have an idea[^1] of how to fix this for just aria2c[^2], and is investigating it’s feasibility.

PS: This does mean all third party programs that use --get-url and download the file themselves will now need to write their own download logic 😢 - nothing we can do about it…

[^1]: Building a list of pseudo (dash) fragments, passing it to aria2c -i and merging natively [^2]: but not the other external-downloaders since we don’t have dash support for them

Reproduced just now for the first time.

 yt-dlp "https://www.youtube.com/watch?v=xNH43Xf24nQ" -v
[debug] Command-line config: ['https://www.youtube.com/watch?v=xNH43Xf24nQ', '-v']
[debug] Encodings: locale cp1252, fs utf-8, pref cp1252, out utf-8, error utf-8, screen utf-8
[debug] yt-dlp version 2023.02.17 [a0a7c01] (pip)
[debug] Python 3.10.6 (CPython AMD64 64bit) - Windows-10-10.0.22621-SP0 (OpenSSL 1.1.1n  15 Mar 2022)
[debug] exe versions: ffmpeg 5.1-full_build-www.gyan.dev (setts), ffprobe 5.1-full_build-www.gyan.dev
[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] Loaded 1782 extractors
[youtube] Extracting URL: https://www.youtube.com/watch?v=xNH43Xf24nQ
[youtube] xNH43Xf24nQ: Downloading webpage
[youtube] xNH43Xf24nQ: Downloading android player API JSON
[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
[debug] Default format spec: bestvideo*+bestaudio/best
[info] xNH43Xf24nQ: Downloading 1 format(s): 248+251
[debug] Invoking http downloader on "https://rr1---sn-nv0uixgo-5ual.googlevideo.com/videoplayback?expire=1677574643&ei=k239Y8X1DIqw4QTjyaaADg&ip=xxx&id=o-AAWb37oRXPwvlt8TbuPQO_GF51dpPbZ0eEa6FNbvwuE-&itag=248&source=youtube&requiressl=yes&mh=2L&mm=31%2C29&mn=sn-nv0uixgo-5ual%2Csn-p5qlsn7s&ms=au%2Crdu&mv=m&mvi=1&pl=20&initcwndbps=1007500&spc=H3gIht-ZawJj-X2rhVHHLdmjfBHJRXs&vprv=1&svpuc=1&mime=video%2Fwebm&gir=yes&clen=219382701&dur=1325.324&lmt=1664077932979547&mt=1677552790&fvip=1&keepalive=yes&fexp=24007246&beids=24472382&c=ANDROID&txp=5437434&sparams=expire%2Cei%2Cip%2Cid%2Citag%2Csource%2Crequiressl%2Cspc%2Cvprv%2Csvpuc%2Cmime%2Cgir%2Cclen%2Cdur%2Clmt&sig=AOq0QJ8wRAIgT5UcexnWT_X_kMZmDCWIQ-8EuEFcurD-SJUmfuYXkw4CIG2YyiUGr2Qnfd6Q73ghy-1AvW2JtF9n4YWjVcpR82fq&lsparams=mh%2Cmm%2Cmn%2Cms%2Cmv%2Cmvi%2Cpl%2Cinitcwndbps&lsig=AG3C_xAwRAIgT9jHLz_UzZPti85nBrvxzwGZwsjd2Tz_xGprPLYWlVYCIHgk58LjFL4LuXa2MY359Z1Rwos5tvNoH3lgp18zVQj0"
[download] Resuming download at byte 13894015
[debug] File locking is not supported. Proceeding without locking
[download] Destination: Funkmaster Flex Premieres Otis on Hot 97, July 20, 2011 FULL [xNH43Xf24nQ].f248.webm
[download]  11.1% of  209.22MiB at  323.48KiB/s ETA 09:50

Just piling on to add that I’m also seeing this behavior as of today.

Edit: Watching the actual content via browser in HD/UHD is full speed with no slowdown. Something seems to suddenly be actively throttling yt-dlp.

audio of recorded streams (yt-dlp -f 599 https://www.youtube.com/watch?v=yLWXJ22LUEc) is throttled to 7-12 KB/s

I too am having the same problem with a certain video. https://www.youtube.com/watch?v=mrdR43-sqKs

Funnily enough, I can download the actual video in -f 22 just fine without throttling, but if I attempt to download the elemental streams (-f 139, -f 140, and -f 298), it’s throttled to 20-50KiB/s.

Here’s my verbose log from attempting to download the 140 (128kbps M4A) format:

C:\Users\Kaz\Downloads\youtube-dl>yt-dlp.exe -vU -f 140 https://www.youtube.com/watch?v=mrdR43-sqKs
[debug] Command-line config: ['-vU', '-f', '140', 'https://www.youtube.com/watch?v=mrdR43-sqKs']
[debug] Encodings: locale cp1252, fs utf-8, pref cp1252, out utf-8 (No VT), error utf-8 (No VT), screen utf-8 (No VT)
[debug] yt-dlp version 2023.02.17 [a0a7c01] (win_exe)
[debug] Python 3.8.10 (CPython AMD64 64bit) - Windows-7-6.1.7601-SP1 (OpenSSL 1.1.1k  25 Mar 2021)
[debug] exe versions: phantomjs 2.1.1
[debug] Optional libraries: Cryptodome-3.17, brotli-1.0.9, certifi-2022.12.07, mutagen-1.46.0, sqlite3-2.6.0, websockets-10.4
[debug] Proxy map: {}
[debug] Loaded 1782 extractors
[debug] Fetching release info: https://api.github.com/repos/yt-dlp/yt-dlp/releases/latest
Latest version: 2023.02.17, Current version: 2023.02.17
yt-dlp is up to date (2023.02.17)
[youtube] Extracting URL: https://www.youtube.com/watch?v=mrdR43-sqKs
[youtube] mrdR43-sqKs: Downloading webpage
[youtube] mrdR43-sqKs: Downloading android player API JSON
[debug] Loading youtube-nsig.9419f2ea from cache
[debug] [youtube] Decrypted nsig ZpIpRaaYeR0wDnhs5 => zVcKhcpM20-ifg
[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] mrdR43-sqKs: Downloading 1 format(s): 140
[debug] Invoking http downloader on "https://rr2---sn-nx57ynsk.googlevideo.com/videoplayback?expire=1677562865&ei=kT_9Y_uHLI-ZsfIPis6boAk&ip=71.231.240.117&id=o-AAuv797I10Sjyt7VCVpTKqar7xfWsARrTVb8X5MRtpeA&itag=140&source=youtube&requiressl=yes&mh=ow&mm=31%2C29&mn=sn-nx57ynsk%2Csn-nx5s7nel&ms=au%2Crdu&mv=m&mvi=2&pl=21&initcwndbps=2003750&spc=H3gIhrN21SKaqdRHinjSnSQnoBqDSLg&vprv=1&svpuc=1&mime=audio%2Fmp4&gir=yes&clen=24833217&dur=1534.397&lmt=1675845429436172&mt=1677541035&fvip=2&keepalive=yesfexp=24007246&c=ANDROID&txp=5532434&sparams=expire%2Cei%2Cip%2Cid%2Citag%2Csource%2Crequiressl%2Cspc%2Cvprv%2Csvpuc%2Cmime%2Cgir%2Cclen%2Cdur%2Clmt&sig=AOq0QJ8wRQIgKOaTLhBOmdc3F_SqKLkWBQVll1vnVg5l4Bn5eQ7GuaECIQDyHWSSV_NctzrmVQuP3-DWEID3reVoVJAR8jIGFI4CxQ%3D%3D&lsparams=mh%2Cmm%2Cmn%2Cms%2Cmv%2Cmvi%2Cpl%2Cinitcwndbps&lsig=AG3C_xAwRAIgJXn8ge2xP9lDUVvIqPn-nLRp4DHX-XGBF1ys0r4mJoACIEluC3iSXs8ZtasgMVWiM2AfVyCf86QqJg5U0fbjjvdJ"
[debug] File locking is not supported. Proceeding without locking
[download] Destination: Installing Linux on the Nintendo Wii! [mrdR43-sqKs].m4a
[download]   6.6% of   23.68MiB at   31.61KiB/s ETA 11:56

I applied the latest fix 5038f6d as well.

Your log shows you are running the ytdl-patched/yt-dlp fork automated build, which does not have the fix, and editing PIP installs is not recommended. If you did install yt-dlp master with PIP, double-check your PATH, or uninstall all and install only yt-dlp master branch with PIP

Just chiming in to report I’m also having issues… “yt-dlp is up to date (2023.02.17)”

Audio downloading at only 30 KiB/s now.

Edit to add, this is happening with all videos, but here’s a sample…

yt-dlp.exe -f 251 https://youtu.be/LXb3EKWsInQ

This grabs audio… it took over two minutes to download just audio for a five-minute video

Edit 2… I just want to add, I’ve now also observed this happening in “4K Video Downloader”.

The behavior seems to be the same even with VPN and browser cookies.

Does --extractor-args youtube:player-client=web help?

Edit: No, all clients seem affected

Here’s my build for anyone who can’t build it themselves.

Edit by pukkandan: Download at your own risk

🚨 NOTE: 🚨 If you are still experiencing throttling after installing from master branch, 🚨 SHOW VERBOSE OUTPUT🚨 Run your command with -vU added and paste the entire log in your comment. It’s the only way we’ll be able to diagnose and/or fix anything. And please verify that you are actually on master

Hello, I also noticed that the download speeds have dropped to like 29.65KiB/s. It was fine till yesterday and I can see everyone here is facing this problem. Its not a code problem or a blocking problem.

All formats except 18/22 are affected now, though to varying degrees.

I tested a number of cases and it seems like the throttled download rate is proportional to the bitrate of the video. Specifically, it is very close to twice the bitrate, meaning the download time will be about half the duration of the video. In particular, trying to get a faster download by switching formats (other than to 18/22) is generally futile as they all take about the same amount of time to download.

very hacky diff for POC:

While this works for now, one caveat is, that it is ineffective in combination with the option --external-downloader aria2c 😦

yt-dlp -v "https://www.youtube.com/watch?v=xNH43Xf24nQ"
[debug] Command-line config: ['-v', 'https://www.youtube.com/watch?v=xNH43Xf24nQ']
[debug] User config "/home/nico/.config/yt-dlp/config": ['--rm-cache-dir', '-o', '/dev/shm/test-dlp/%(title)s.%(ext)s', '-f', 'bestvideo[height<=1080][ext=mp4][vcodec!*=av01]+bestaudio[ext=m4a]/best[ext=mp4]/best', '--no-mtime', '--add-metadata', '--convert-thumbnails', 'jpg', '--embed-thumbnail', '--ppa', 'ThumbnailsConvertor:-qmin 1 -q:v 1', '--ppa', 'ffmpeg:-metadata synopsis=""', '--force-ipv4', '--sponsorblock-remove', 'all', '--console-title', '--downloader', 'aria2c', '--downloader-args', 'aria2c:--http-accept-gzip=true -x 4 -s 4 -j 4 -k 1M --log-level=info --file-allocation=none']
[debug] Encodings: locale UTF-8, fs utf-8, pref UTF-8, out utf-8, error utf-8, screen utf-8
[debug] yt-dlp version 2023.02.28 [8e9fe43cd] (zip)
[debug] Python 3.8.10 (CPython x86_64 64bit) - Linux-5.4.0-139-generic-x86_64-with-glibc2.29 (OpenSSL 1.1.1f  31 Mar 2020, glibc 2.31)
[debug] exe versions: ffmpeg N-109874-gaeceefa622-Nico-20230218 (fdk,setts), ffprobe N-109874-gaeceefa622-Nico-20230218, phantomjs 2.1.1, rtmpdump 2.4
[debug] Optional libraries: Cryptodome-3.17, brotli-1.0.9, certifi-2022.12.07, mutagen-1.46.0, secretstorage-3.3.3, sqlite3-2.6.0, websockets-10.4, xattr-0.9.6
[debug] Proxy map: {}
[debug] Loaded 1782 extractors
Removing cache dir /home/nico/.cache/yt-dlp ..
[youtube] Extracting URL: https://www.youtube.com/watch?v=xNH43Xf24nQ
[youtube] xNH43Xf24nQ: Downloading webpage
[youtube] xNH43Xf24nQ: Downloading android player API JSON
[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
[SponsorBlock] Fetching SponsorBlock segments
[debug] SponsorBlock query: https://sponsor.ajay.app/api/skipSegments/2a07?service=YouTube&categories=%5B%22sponsor%22%2C+%22music_offtopic%22%2C+%22interaction%22%2C+%22selfpromo%22%2C+%22outro%22%2C+%22preview%22%2C+%22intro%22%2C+%22filler%22%5D&actionTypes=%5B%22skip%22%2C+%22poi%22%2C+%22chapter%22%5D
[SponsorBlock] No matching segments were found in the SponsorBlock database
[info] xNH43Xf24nQ: Downloading 1 format(s): 137+140
[info] Downloading video thumbnail 44 ...
WARNING: Unable to download video thumbnail 44: HTTP Error 404: Not Found
Deleting existing file /dev/shm/test-dlp/Funkmaster Flex Premieres Otis on Hot 97, July 20, 2011 FULL.jpg
[info] Downloading video thumbnail 43 ...
WARNING: Unable to download video thumbnail 43: HTTP Error 404: Not Found
[info] Downloading video thumbnail 42 ...
WARNING: Unable to download video thumbnail 42: HTTP Error 404: Not Found
[info] Downloading video thumbnail 41 ...
WARNING: Unable to download video thumbnail 41: HTTP Error 404: Not Found
[info] Downloading video thumbnail 40 ...
WARNING: Unable to download video thumbnail 40: HTTP Error 404: Not Found
[info] Downloading video thumbnail 39 ...
WARNING: Unable to download video thumbnail 39: HTTP Error 404: Not Found
[info] Downloading video thumbnail 38 ...
[info] Writing video thumbnail 38 to: /dev/shm/test-dlp/Funkmaster Flex Premieres Otis on Hot 97, July 20, 2011 FULL.webp
[ThumbnailsConvertor] Converting thumbnail "/dev/shm/test-dlp/Funkmaster Flex Premieres Otis on Hot 97, July 20, 2011 FULL.webp" to jpg
[debug] ffmpeg command line: ffmpeg -y -loglevel repeat+info -f image2 -pattern_type none -i 'file:/dev/shm/test-dlp/Funkmaster Flex Premieres Otis on Hot 97, July 20, 2011 FULL.webp' -update 1 -bsf:v mjpeg2jpeg -movflags +faststart -qmin 1 -q:v 1 -metadata synopsis= 'file:/dev/shm/test-dlp/Funkmaster Flex Premieres Otis on Hot 97, July 20, 2011 FULL.jpg'
Deleting original file /dev/shm/test-dlp/Funkmaster Flex Premieres Otis on Hot 97, July 20, 2011 FULL.webp (pass -k to keep)
[debug] Invoking aria2c downloader on "https://rr1---sn-5hneknes.googlevideo.com/videoplayback?expire=1677598684&ei=fMv9Y6XIKZrVgAeJmIDgDg&ip=<REDACTED>&id=o-AC3p3w4-lGrsImHzjFRXyADja4n2f5lKthxcl6TtCwaX&itag=137&source=youtube&requiressl=yes&mh=2L&mm=31%2C29&mn=sn-5hneknes%2Csn-5hne6nsd&ms=au%2Crdu&mv=m&mvi=1&pl=17&initcwndbps=2530000&spc=H3gIhoU5MhsGCR2eHg9dr6gaMJanXbo&vprv=1&svpuc=1&mime=video%2Fmp4&gir=yes&clen=336983942&dur=1325.323&lmt=1664076806504726&mt=1677576784&fvip=2&keepalive=yes&fexp=24007246&c=ANDROID&txp=5432434&sparams=expire%2Cei%2Cip%2Cid%2Citag%2Csource%2Crequiressl%2Cspc%2Cvprv%2Csvpuc%2Cmime%2Cgir%2Cclen%2Cdur%2Clmt&sig=AOq0QJ8wRQIhAJm_8CzotX8sJEPU3TMsyzBEH36J4ulGyCiReKxCdi_OAiBxApXCb49Ck5OEFki4rdvr0K2zrufveFBvToqgcdg9gQ%3D%3D&lsparams=mh%2Cmm%2Cmn%2Cms%2Cmv%2Cmvi%2Cpl%2Cinitcwndbps&lsig=AG3C_xAwRQIgd0FI2GXLqSl2PlEYT_7vbnvADzG0AgNeQyFWHu19WJgCIQDNWlYIrUCFJvb290YmgTcbgSMRULTD7eZNDr9dIFHOiQ%3D%3D"
[download] Destination: /dev/shm/test-dlp/Funkmaster Flex Premieres Otis on Hot 97, July 20, 2011 FULL.f137.mp4
[debug] aria2c command line: aria2c -c --console-log-level=warn --summary-interval=0 --download-result=hide --http-accept-gzip=true --file-allocation=none -x16 -j16 -s16 --min-split-size 1M --header 'User-Agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/96.0.4664.55 Safari/537.36' --header 'Accept: text/html,application/xhtml+xml,application/xml;q=0.9,*/*;q=0.8' --header 'Accept-Language: en-us,en;q=0.5' --header 'Sec-Fetch-Mode: navigate' --interface 0.0.0.0 --check-certificate=true --remote-time=false --show-console-readout=true --http-accept-gzip=true -x 4 -s 4 -j 4 -k 1M --log-level=info --file-allocation=none --dir /dev/shm/test-dlp/ --out './Funkmaster Flex Premieres Otis on Hot 97, July 20, 2011 FULL.f137.mp4.part' --auto-file-renaming=false -- 'https://rr1---sn-5hneknes.googlevideo.com/videoplayback?expire=1677598684&ei=fMv9Y6XIKZrVgAeJmIDgDg&ip=<REDACTED>&id=o-AC3p3w4-lGrsImHzjFRXyADja4n2f5lKthxcl6TtCwaX&itag=137&source=youtube&requiressl=yes&mh=2L&mm=31%2C29&mn=sn-5hneknes%2Csn-5hne6nsd&ms=au%2Crdu&mv=m&mvi=1&pl=17&initcwndbps=2530000&spc=H3gIhoU5MhsGCR2eHg9dr6gaMJanXbo&vprv=1&svpuc=1&mime=video%2Fmp4&gir=yes&clen=336983942&dur=1325.323&lmt=1664076806504726&mt=1677576784&fvip=2&keepalive=yes&fexp=24007246&c=ANDROID&txp=5432434&sparams=expire%2Cei%2Cip%2Cid%2Citag%2Csource%2Crequiressl%2Cspc%2Cvprv%2Csvpuc%2Cmime%2Cgir%2Cclen%2Cdur%2Clmt&sig=AOq0QJ8wRQIhAJm_8CzotX8sJEPU3TMsyzBEH36J4ulGyCiReKxCdi_OAiBxApXCb49Ck5OEFki4rdvr0K2zrufveFBvToqgcdg9gQ%3D%3D&lsparams=mh%2Cmm%2Cmn%2Cms%2Cmv%2Cmvi%2Cpl%2Cinitcwndbps&lsig=AG3C_xAwRQIgd0FI2GXLqSl2PlEYT_7vbnvADzG0AgNeQyFWHu19WJgCIQDNWlYIrUCFJvb290YmgTcbgSMRULTD7eZNDr9dIFHOiQ%3D%3D'
[#b03fbb 184MiB/321MiB(57%) CN:4 DL:1.9MiB ETA:1m11s]^C                        
ERROR: Interrupted by user

Without aria2c:

[download] 24.3% of 321.37MiB at 10.54MiB/s ETA 00:23^C

I’ve personally gotten it with format 251, the audio only webm, whereas something like 22 seems to download fine. Both from livestreams and standard vids. They’re probably noticing us requesting only the audio format and throttling the hell out of it. I’d really like my archives to be in opus though and 251 is the only decent opus format I know of, I don’t know of a combined audio/video that uses, say, opus+vp9 in one webm. Working cookies here, applies to all downloads as of today, was hit or miss the last few days. I get on the order of 20 KiB/s or less normally. Using --throttled-rate 100k causes it to attempt reextraction, which worked the day before yesterday, but now it doesn’t.

I don’t know if I’m wrong but I think that when normal links are sent it downloads fine, but then when they are links https://youtu.be/IE7AykMD3uw | youtube.be has problems extracting… maybe I’m wrong.

Well, at least with aria2c it’s a little bit faster. 😀️

yt-dlp -v "https://www.youtube.com/watch?v=kFp61MtbPbU"
[debug] Command-line config: ['-v', 'https://www.youtube.com/watch?v=kFp61MtbPbU']
[debug] User config "/home/nico/.config/yt-dlp/config": ['--rm-cache-dir', '-o', '/dev/shm/test-dlp/%(title)s.%(ext)s', '-f', 'bestvideo[height<=1080][ext=mp4][vcodec!*=av01]+bestaudio[ext=m4a]/best[ext=mp4]/best', '--no-mtime', '--add-metadata', '--convert-thumbnails', 'jpg', '--embed-thumbnail', '--ppa', 'ThumbnailsConvertor:-qmin 1 -q:v 1', '--ppa', 'ffmpeg:-metadata synopsis=""', '--force-ipv4', '--sponsorblock-remove', 'all', '--console-title', '--external-downloader', 'aria2c']
[debug] Encodings: locale UTF-8, fs utf-8, pref UTF-8, out utf-8, error utf-8, screen utf-8
[debug] yt-dlp version 2023.02.26 [8e9fe43cd] (zip)
[debug] Python 3.8.10 (CPython x86_64 64bit) - Linux-5.4.0-139-generic-x86_64-with-glibc2.29 (OpenSSL 1.1.1f  31 Mar 2020, glibc 2.31)
[debug] exe versions: ffmpeg N-109874-gaeceefa622-Nico-20230218 (fdk,setts), ffprobe N-109874-gaeceefa622-Nico-20230218, phantomjs 2.1.1, rtmpdump 2.4
[debug] Optional libraries: Cryptodome-3.17, brotli-1.0.9, certifi-2022.12.07, mutagen-1.46.0, secretstorage-3.3.3, sqlite3-2.6.0, websockets-10.4, xattr-0.9.6
[debug] Proxy map: {}
[debug] Loaded 1782 extractors
Removing cache dir /home/nico/.cache/yt-dlp ..
[youtube] Extracting URL: https://www.youtube.com/watch?v=kFp61MtbPbU
[youtube] kFp61MtbPbU: Downloading webpage
[youtube] kFp61MtbPbU: Downloading android player API JSON
[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
[SponsorBlock] Fetching SponsorBlock segments
[debug] SponsorBlock query: https://sponsor.ajay.app/api/skipSegments/5917?service=YouTube&categories=%5B%22sponsor%22%2C+%22filler%22%2C+%22intro%22%2C+%22selfpromo%22%2C+%22preview%22%2C+%22music_offtopic%22%2C+%22interaction%22%2C+%22outro%22%5D&actionTypes=%5B%22skip%22%2C+%22poi%22%2C+%22chapter%22%5D
[SponsorBlock] No matching segments were found in the SponsorBlock database
[info] kFp61MtbPbU: Downloading 1 format(s): 137+140
[info] Downloading video thumbnail 45 ...
[info] Writing video thumbnail 45 to: /dev/shm/test-dlp/СПРАШИВАЙТЕ ОТВЕЧАЕМ #13 Сергей Любарский отвечает на комментарии..webp
[ThumbnailsConvertor] Converting thumbnail "/dev/shm/test-dlp/СПРАШИВАЙТЕ ОТВЕЧАЕМ #13 Сергей Любарский отвечает на комментарии..webp" to jpg
[debug] ffmpeg command line: ffmpeg -y -loglevel repeat+info -f image2 -pattern_type none -i 'file:/dev/shm/test-dlp/СПРАШИВАЙТЕ ОТВЕЧАЕМ #13 Сергей Любарский отвечает на комментарии..webp' -update 1 -bsf:v mjpeg2jpeg -movflags +faststart -qmin 1 -q:v 1 -metadata synopsis= 'file:/dev/shm/test-dlp/СПРАШИВАЙТЕ ОТВЕЧАЕМ #13 Сергей Любарский отвечает на комментарии..jpg'
Deleting original file /dev/shm/test-dlp/СПРАШИВАЙТЕ ОТВЕЧАЕМ #13 Сергей Любарский отвечает на комментарии..webp (pass -k to keep)
[debug] Invoking aria2c downloader on "https://rr5---sn-5hne6nz6.googlevideo.com/videoplayback?expire=1677580482&ei=YoT9Y8LLL4ipx_AP8JCM6AU&ip=<REDACTED>&id=o-AGp7z_kSVWO7dElUZRJfZb6nX27hYQpJqSk3juorQoUS&itag=137&source=youtube&requiressl=yes&mh=Y4&mm=31%2C29&mn=sn-5hne6nz6%2Csn-5hnekn7l&ms=au%2Crdu&mv=m&mvi=5&pl=17&initcwndbps=2013750&spc=H3gIhjgidh0IsfIbEWQ29LsHDr8cgUo&vprv=1&svpuc=1&mime=video%2Fmp4&gir=yes&clen=883516112&dur=3721.320&lmt=1677497277424720&mt=1677558546&fvip=5&keepalive=yes&fexp=24007246&c=ANDROID&txp=5535434&sparams=expire%2Cei%2Cip%2Cid%2Citag%2Csource%2Crequiressl%2Cspc%2Cvprv%2Csvpuc%2Cmime%2Cgir%2Cclen%2Cdur%2Clmt&sig=AOq0QJ8wRAIgbnfEMQ9GD8sRohS1-syQCAD8s7l-iR5J4pL7BJkMrZ4CIASMKqHls_Yfl9EXl-iyBti1aIHEyPoPhD6CpSoFGzxK&lsparams=mh%2Cmm%2Cmn%2Cms%2Cmv%2Cmvi%2Cpl%2Cinitcwndbps&lsig=AG3C_xAwRAIgMK6D7ZYf1zF8QfGf6SzJp43Sf1Qgbr3NtUKIXX4pEnECIFLBwnQrKd_oNgjMWLgcX4o8wDOR3FXoSqJtIpS6NeuE"
[download] Destination: /dev/shm/test-dlp/СПРАШИВАЙТЕ ОТВЕЧАЕМ #13 Сергей Любарский отвечает на комментарии..f137.mp4
[debug] aria2c command line: aria2c -c --console-log-level=warn --summary-interval=0 --download-result=hide --http-accept-gzip=true --file-allocation=none -x16 -j16 -s16 --min-split-size 1M --header 'User-Agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/90.0.4430.70 Safari/537.36' --header 'Accept: text/html,application/xhtml+xml,application/xml;q=0.9,*/*;q=0.8' --header 'Accept-Language: en-us,en;q=0.5' --header 'Sec-Fetch-Mode: navigate' --interface 0.0.0.0 --check-certificate=true --remote-time=false --show-console-readout=true --dir /dev/shm/test-dlp/ --out './СПРАШИВАЙТЕ ОТВЕЧАЕМ #13 Сергей Любарский отвечает на комментарии..f137.mp4.part' --auto-file-renaming=false -- 'https://rr5---sn-5hne6nz6.googlevideo.com/videoplayback?expire=1677580482&ei=YoT9Y8LLL4ipx_AP8JCM6AU&ip=<REDACTED>&id=o-AGp7z_kSVWO7dElUZRJfZb6nX27hYQpJqSk3juorQoUS&itag=137&source=youtube&requiressl=yes&mh=Y4&mm=31%2C29&mn=sn-5hne6nz6%2Csn-5hnekn7l&ms=au%2Crdu&mv=m&mvi=5&pl=17&initcwndbps=2013750&spc=H3gIhjgidh0IsfIbEWQ29LsHDr8cgUo&vprv=1&svpuc=1&mime=video%2Fmp4&gir=yes&clen=883516112&dur=3721.320&lmt=1677497277424720&mt=1677558546&fvip=5&keepalive=yes&fexp=24007246&c=ANDROID&txp=5535434&sparams=expire%2Cei%2Cip%2Cid%2Citag%2Csource%2Crequiressl%2Cspc%2Cvprv%2Csvpuc%2Cmime%2Cgir%2Cclen%2Cdur%2Clmt&sig=AOq0QJ8wRAIgbnfEMQ9GD8sRohS1-syQCAD8s7l-iR5J4pL7BJkMrZ4CIASMKqHls_Yfl9EXl-iyBti1aIHEyPoPhD6CpSoFGzxK&lsparams=mh%2Cmm%2Cmn%2Cms%2Cmv%2Cmvi%2Cpl%2Cinitcwndbps&lsig=AG3C_xAwRAIgMK6D7ZYf1zF8QfGf6SzJp43Sf1Qgbr3NtUKIXX4pEnECIFLBwnQrKd_oNgjMWLgcX4o8wDOR3FXoSqJtIpS6NeuE'
[#67006e 218MiB/842MiB(25%) CN:16 DL:7.0MiB ETA:1m28s]^C                       
ERROR: Interrupted by user

Normal home connection, reconnection/new leased ip does not change anything.