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

Youtube get URL with slow speed download #6369

Closed
8 tasks done
Alehap opened this issue Feb 27, 2023 · 94 comments
Closed
8 tasks done

Youtube get URL with slow speed download #6369

Alehap opened this issue Feb 27, 2023 · 94 comments
Labels
high-priority site-bug Issue with a specific website

Comments

@Alehap
Copy link

Alehap commented Feb 27, 2023

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
@Alehap Alehap added the question Question label Feb 27, 2023
@GrauBlitz

This comment was marked as duplicate.

@sergeychur

This comment was marked as duplicate.

@pukkandan pukkandan added cant-reproduce The issue cannot be reliably reproduced site-bug Issue with a specific website and removed question Question labels Feb 27, 2023
@pukkandan

This comment was marked as resolved.

@GrauBlitz

This comment was marked as resolved.

@pukkandan

This comment was marked as resolved.

@CorentinB

This comment was marked as duplicate.

@caidorn

This comment was marked as duplicate.

@Alehap
Copy link
Author

Alehap commented Feb 27, 2023

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.

@scrutinizer11
Copy link

scrutinizer11 commented Feb 27, 2023

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.

@nicolaasjan

This comment was marked as duplicate.

@scrutinizer11

This comment was marked as duplicate.

@shibe2

This comment was marked as duplicate.

@triplesixman

This comment was marked as duplicate.

@scrutinizer11

This comment was marked as duplicate.

@HaveDex

This comment was marked as duplicate.

@sergeychur
Copy link

sergeychur commented Feb 27, 2023

Seems like videos which get throttled don't have "n" parameter. This parameter is required to bypass throttling (#4635, etc.)
Look "#6369 (comment)" for example.

The same video in browser has "n" parameter.

@KPackratt2k
Copy link

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

@pukkandan
Copy link
Member

pukkandan commented Feb 28, 2023

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

Edit: No, all clients seem affected

@pukkandan pukkandan pinned this issue Feb 28, 2023
@alexjsteffen

This comment was marked as duplicate.

@judera2121

This comment was marked as duplicate.

@Rubydesic

This comment was marked as duplicate.

@scrutinizer11

This comment was marked as resolved.

@memaicon

This comment was marked as duplicate.

@Alehap

This comment was marked as duplicate.

@lb-d
Copy link

lb-d commented Feb 28, 2023

Over here it started happening with newer channels then with all of them. Probably on the youtube side.

Vangelis66 referenced this issue in ytdl-org/youtube-dl Mar 1, 2023
* implement #31530 (comment)
* update affected tests
* misc clean-ups
Vangelis66 referenced this issue in dirkf/youtube-dl Mar 2, 2023
@pukkandan
Copy link
Member

Continued in #6400

@yt-dlp yt-dlp unlocked this conversation Mar 4, 2023
weltonrodrigo added a commit to weltonrodrigo/youtube-to-anchorfm that referenced this issue Mar 6, 2023
yt-dlp/yt-dlp#6369 was fixed and released upstream. `youtube-dl-exec`
always download the latest version, so it is already fixed here.

Docker images just need to be rebuilt.
@suhail993
Copy link

$$$

@pukkandan pukkandan unpinned this issue Apr 21, 2023
@Smokietr
Copy link

Am I the only one experiencing this problem in this version?

stable@2023.11.16

yt-dlp --get-url --throttled-rate 100k --extractor-args "youtube:player-client=ANDROID" https://www.youtube.com/watch?v=xxx --ignore-no-formats-error --no-warnings --print-json

The links it provides are very slow.

@Masterolic
Copy link

Masterolic commented Dec 29, 2023

@Smokietr Did you tried after removing --throttled-rate?

@bashonly
Copy link
Member

bashonly commented Dec 29, 2023

--print-json

@Smokietr are you extracting the download URLs with yt-dlp and then trying to download them with another program? Youtube throttles you if you don't download with an http chunk size of 10MB or less (which yt-dlp does natively, but most other programs will not)

If this is not the case, then open a new issue with a complete verbose log (-vU)

@Smokietr
Copy link

@Masterolic

Unfortunately the problem is the same. I added it to find a solution.

@bashonly

Yes, the situation is as you say. I provide download links to the mobile application. I am looking at other sites that use YT-DLP and there are those that give very fast results.

Example Site :

https://video.genyt.net/5OyDO_02yj8

After entering the site, please click on the generate links button.

@Masterolic

This comment was marked as off-topic.

@bashonly
Copy link
Member

https://video.genyt.net/5OyDO_02yj8

this link (and every other page on that site) redirects me to https://www.genytb.net/?e503 with a 503 NA - Service Deprecating message

Yes, the situation is as you say. I provide download links to the mobile application. I am looking at other sites that use YT-DLP and there are those that give very fast results.

you need to only use the links for formats 22 and 18, which are unthrottled (and it looks like what that "genyt" site may have been doing)

aalsuwaidi pushed a commit to aalsuwaidi/yt-dlp that referenced this issue Apr 21, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
high-priority site-bug Issue with a specific website
Projects
None yet
Development

No branches or pull requests