yt-dlp
yt-dlp copied to clipboard
Youtube get URL with slow speed download
DO NOT REMOVE OR SKIP THE ISSUE TEMPLATE
- [X] I understand that I will be blocked if I intentionally remove or skip any mandatory* field
Checklist
- [X] I'm asking a question and not reporting a bug or requesting a feature
- [X] I've looked through the README
- [X] I've verified that I'm running yt-dlp version 2023.02.17 (update instructions) or later (specify commit)
- [X] I've searched known issues and the bugtracker for similar questions including closed ones. DO NOT post duplicates
- [X] I've read the guidelines for opening an issue
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
- [X] Run your yt-dlp command with -vU flag added (
yt-dlp -vU <your command line>
) - [X] 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
Can confirm, but only on some URLs, don't see a pattern, it also variated on one channel with different videos.
Can confirm, same random behaviour.
I can't reproduce. Is this on a VPS? or on home IPs? Do you get same issue from different IP?
Edit: Can repro now
Normal home connection, reconnection/new leased ip does not change anything.
"new leased ip" would be in the same network, right? If you are able to, try with a different network or maybe a VPN. We have observed speed issues in the past due to CDN problems. Since multiple people reported this back to back, that may not be the issue this time - but worth checking
I can confirm I see the same behavior on my side.
Happened to me as well. Tried a couple times on different drives (SSD vs. HDD), tried different amounts of concurrent downloads and didn't help. Though I only tried with one vid and then I let it be until the next day, when everything went smooth again. I'm running optical internet so DL speed wouldn't be a problem.
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.
This video is particularly slow https://www.youtube.com/watch?v=kFp61MtbPbU Little Snitch shows a download speed of 300 Kb/s, the size is appr. 1GB, format - webm, h.264, 1080p.
It runs via proxy on port 3128 (macOS). What's interesting though is that glancing at the process yt-dlp in Activity Monitor reveals that it uses localhost:62760->localhost:ndl-aas
Relevant or not, it didn't pose a tangible problem related to speed.
This video is particularly slow https://www.youtube.com/watch?v=kFp61MtbPbU
(btw, your URL points to:
https://github.com/yt-dlp/yt-dlp/issues/url
... Should be https://www.youtube.com/watch?v=kFp61MtbPbU)
Here:
[download] 78.1% of 542.91MiB at 12.39MiB/s ETA 00:09^C
[Edit] That was yesterday. Now feb 28) it's slow... :
[download] 1.3% of 842.59MiB at 459.39KiB/s ETA 30:54^C
I have [download] 0.9% of 542.91MiB at 298.33KiB/s ETA 30:45
I get low speed for one YouTube video on a host where it is usually fast. And I get decent speed in another region for the same video.
Reassured to see that it doesn't just happen to me! For a few days now On my side too, it is very random, and the speed is limited to 500 kb/s, sometimes less
I guess the traffic to my IP is being throttled as if I reached an invisible cap and was rate limited. Is there a way to anonymize my location within the yt-dlp framework, without resorting to VPNs and anonymizers?
Same, there's seemingly no rhyme or reason to it. For me it is intermittent and usually goes away the next time the program is run. I get it maybe 1 in 20-30 times.
Seems like videos which get throttled don't have "n" parameter. This parameter is required to bypass throttling (https://github.com/yt-dlp/yt-dlp/issues/4635, etc.) Look "https://github.com/yt-dlp/yt-dlp/issues/6369#issuecomment-1446973752" for example.
The same video in browser has "n" parameter.
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
Does --extractor-args youtube:player-client=web
help?
Edit: No, all clients seem affected
I have been experiencing this issue as well. I noticed that it was hit-and-miss with some videos and not others. I also used another downloading application (not open source) and it seems rate-limited at the same speed. Tried all the options above but for 4K I am getting not more than 1.73 mb/sec.
Perhaps YouTube is using a new rate limiting system?
same issue here
Been using version 2022.05.18
or yt-dlp up until today, when it stopped working with an error about unable to resolve uploader id. When I updated it to 2023.02.17
, I encountered this throttling issue.
Does
--extractor-args youtube:player-client=web
help?
No. No extractor makes a difference.
Same problem here
Been using version
2022.05.18
or yt-dlp up until today, when it stopped working with an error about unable to resolve uploader id. When I updated it to2023.02.17
, I encountered this throttling issue.
me too
Over here it started happening with newer channels then with all of them. Probably on the youtube side.
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.
+1 -f 18 works likewise with no throttling
all others are throttled this not random anymore
Tried to download an audio format, and here's what I got, tried on both home IP and VPS, all are the same. Seems like some restrictions from Youtube website again?
[youtube] Extracting URL: https://youtu.be/7leGYgqSzq4
[youtube] 7leGYgqSzq4: Downloading webpage
[youtube] 7leGYgqSzq4: Downloading android player API JSON
[info] 7leGYgqSzq4: Downloading 1 format(s): 139
Deleting existing file 7leGYgqSzq4.webp
[info] Downloading video thumbnail 41 ...
[info] Writing video thumbnail 41 to: 7leGYgqSzq4.webp
[info] Writing video metadata as JSON to: 7leGYgqSzq4.info.json
[download] Resuming download at byte 188920
[download] Destination: 7leGYgqSzq4.m4a
[download] 100% of 3.99MiB in 00:05:28 at 12.43KiB/s
Download has been completed. Proceeding to next step...
[FixupM4a] Correcting container of "7leGYgqSzq4.m4a"
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.
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.