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

Is it normal to have a < 100kb rate for Youtube videos? #873

Closed
3 tasks done
jlcd opened this issue Sep 2, 2021 · 19 comments
Closed
3 tasks done

Is it normal to have a < 100kb rate for Youtube videos? #873

jlcd opened this issue Sep 2, 2021 · 19 comments
Labels
cant-reproduce The issue cannot be reliably reproduced

Comments

@jlcd
Copy link

jlcd commented Sep 2, 2021

Checklist

  • I'm asking a question
  • I've looked through the README and FAQ for similar questions
  • I've searched the bugtracker for similar questions including closed ones

Question

I got yt-dlp through python3 and I'm trying to download some videos, but all of them stay at around 80KiB/s, which is quite slow. Opened Youtube on a regular browser and the videos play just fine.

Tried using it without any arguments but finally, after browsing the issues page for some time, tried this:

yt-dlp -N 4 --throttled-rate 100K https://www.youtube.com/watch?v=l4Iu3YB0pTs

Now it retries every couple seconds and the rate doesn't get above 100K.

Any tips on how to proceed and get a decent download speed?

@jlcd jlcd added the question Question label Sep 2, 2021
@coletdjnz
Copy link
Member

Hmm. could you provide a verbose log showing this speed drop (with and without the throttled rate option)?

@jlcd
Copy link
Author

jlcd commented Sep 2, 2021

Sure, here it is:

with --throttled-rate

root@D:/mnt/c/Users/j# yt-dlp -N 4 --throttled-rate 100K https://www.youtube.com/watch?v=l4Iu3YB0pTs --verbose
[debug] Command-line config: ['-N', '4', '--throttled-rate', '100K', 'https://www.youtube.com/watch?v=l4Iu3YB0pTs', '--verbose']
[debug] Encodings: locale UTF-8, fs utf-8, out UTF-8, pref UTF-8
[debug] yt-dlp version 2021.09.02
[debug] Python version 3.6.9 (CPython 64bit) - Linux-5.10.16.3-microsoft-standard-WSL2-x86_64-with-Ubuntu-18.04-bionic
[debug] exe versions: none
[debug] Optional libraries: keyring, mutagen, pycryptodome, sqlite, websockets
[debug] Proxy map: {}
[debug] [youtube] Extracting URL: https://www.youtube.com/watch?v=l4Iu3YB0pTs
[youtube] l4Iu3YB0pTs: Downloading webpage
[youtube] l4Iu3YB0pTs: Downloading android player API JSON
[debug] Sort order given by extractor: quality, res, fps, source, codec:vp9.2, lang
[debug] Formats sorted by: hasvid, ie_pref, quality, res, fps, source, vcodec:vp9.2(10), acodec, lang, filesize, fs_approx, tbr, vbr, abr, asr, proto, vext, aext, hasaud, id
[debug] Testing thumbnail 45
[debug] Default format spec: best/bestvideo+bestaudio
[info] l4Iu3YB0pTs: Downloading 1 format(s): 22
[debug] Invoking downloader on "https://r2---sn-oxunxg8pjvn-jo4s.googlevideo.com/videoplayback?expire=1630634799&ei=zy4xYZfEA8jYwgSMo7TwCA&ip=201.17.158.5&id=o-ADkgUqeH_MZxw8vB7i8y0-MXoKHn80hFHPjxy8lEQ1G1&itag=22&source=youtube&requiressl=yes&mh=Mb&mm=31%2C26&mn=sn-oxunxg8pjvn-jo4s%2Csn-bg07dnze&ms=au%2Conr&mv=m&mvi=2&pl=25&initcwndbps=993750&vprv=1&mime=video%2Fmp4&cnr=14&ratebypass=yes&dur=4009.993&lmt=1628701081854038&mt=1630612867&fvip=3&fexp=24001373%2C24007246&c=ANDROID&txp=5511222&sparams=expire%2Cei%2Cip%2Cid%2Citag%2Csource%2Crequiressl%2Cvprv%2Cmime%2Ccnr%2Cratebypass%2Cdur%2Clmt&sig=AOq0QJ8wRgIhAJIOSPUmDNnEfLzBPjsYGLn8X7hPCBfEFr9QjD4SJiebAiEAhiTqEWwILYf2ApAge2olAD4xUHAgM11RspJ0Q_Sw0xw%3D&lsparams=mh%2Cmm%2Cmn%2Cms%2Cmv%2Cmvi%2Cpl%2Cinitcwndbps&lsig=AG3C_xAwRQIgMBnYrRiQ2zAK97C7PC4CbNs3be-g3u3mW2XwvPmUdtICIQCnkQRncxMiRNnjYPme0pgbfQv_sVaSoXIuTz5WsRv0tQ%3D%3D"
[download] Resuming download at byte 12012328
[download] Destination: A Year Alone In An Abandoned Ghost Town [l4Iu3YB0pTs].mp4
[download]   1.1% of 1.03GiB at 86.30KiB/s ETA 03:26:17
WARNING: The download speed is below throttle limit. Re-extracting data
[debug] [youtube] Extracting URL: https://www.youtube.com/watch?v=l4Iu3YB0pTs
[youtube] l4Iu3YB0pTs: Downloading webpage
[youtube] l4Iu3YB0pTs: Downloading android player API JSON
[debug] Sort order given by extractor: quality, res, fps, source, codec:vp9.2, lang
[debug] Formats sorted by: hasvid, ie_pref, quality, res, fps, source, vcodec:vp9.2(10), acodec, lang, filesize, fs_approx, tbr, vbr, abr, asr, proto, vext, aext, hasaud, id
[debug] Testing thumbnail 45
[debug] Default format spec: best/bestvideo+bestaudio
[info] l4Iu3YB0pTs: Downloading 1 format(s): 22
[debug] Invoking downloader on "https://r2---sn-oxunxg8pjvn-jo4s.googlevideo.com/videoplayback?expire=1630634809&ei=2S4xYZ_AJYLgwQTmxpz4CA&ip=201.17.158.5&id=o-AC9NanzxAy4U0q16zzQp1Fn8-y64ddeyRSm5nc56WlfS&itag=22&source=youtube&requiressl=yes&mh=Mb&mm=31%2C26&mn=sn-oxunxg8pjvn-jo4s%2Csn-bg07dnze&ms=au%2Conr&mv=m&mvi=2&pl=25&initcwndbps=993750&vprv=1&mime=video%2Fmp4&cnr=14&ratebypass=yes&dur=4009.993&lmt=1628701081854038&mt=1630612867&fvip=3&fexp=24001373%2C24007246&beids=9466588&c=ANDROID&txp=5511222&sparams=expire%2Cei%2Cip%2Cid%2Citag%2Csource%2Crequiressl%2Cvprv%2Cmime%2Ccnr%2Cratebypass%2Cdur%2Clmt&sig=AOq0QJ8wRQIgRcf6Kv_4v8kn0s-fAYBlvt2la6yC4GzshDnlbTQij_kCIQC4IvgmIvh8jXAS4A1lhU4nbN6ll24m3Tx04pw6uFYmWA%3D%3D&lsparams=mh%2Cmm%2Cmn%2Cms%2Cmv%2Cmvi%2Cpl%2Cinitcwndbps&lsig=AG3C_xAwRAIgbTBcjv-LfyaGJl6LpkxUXc9rG6pMv6BlEhQC5gn0Wi4CICkHXETAcYsK7gF2fjrnEx_8Wo7NSwzEZGWz_zDAuK_X"
[download] Resuming download at byte 12455045
[download] Destination: A Year Alone In An Abandoned Ghost Town [l4Iu3YB0pTs].mp4
[download]   1.2% of 1.03GiB at 65.74KiB/s ETA 04:30:45
WARNING: The download speed is below throttle limit. Re-extracting data
[debug] [youtube] Extracting URL: https://www.youtube.com/watch?v=l4Iu3YB0pTs
[youtube] l4Iu3YB0pTs: Downloading webpage
[youtube] l4Iu3YB0pTs: Downloading android player API JSON
[debug] Sort order given by extractor: quality, res, fps, source, codec:vp9.2, lang
[debug] Formats sorted by: hasvid, ie_pref, quality, res, fps, source, vcodec:vp9.2(10), acodec, lang, filesize, fs_approx, tbr, vbr, abr, asr, proto, vext, aext, hasaud, id
[debug] Testing thumbnail 45
[debug] Default format spec: best/bestvideo+bestaudio
[info] l4Iu3YB0pTs: Downloading 1 format(s): 22
[debug] Invoking downloader on "https://r2---sn-oxunxg8pjvn-jo4s.googlevideo.com/videoplayback?expire=1630634818&ei=4i4xYeyaEKXIwwTZmpjgDg&ip=201.17.158.5&id=o-AKJzeLbxwZNBN1r_cLAHB-HlmrzYA5fCJUMmL2Isu2dr&itag=22&source=youtube&requiressl=yes&mh=Mb&mm=31%2C26&mn=sn-oxunxg8pjvn-jo4s%2Csn-bg07dnze&ms=au%2Conr&mv=m&mvi=2&pl=25&initcwndbps=993750&vprv=1&mime=video%2Fmp4&cnr=14&ratebypass=yes&dur=4009.993&lmt=1628701081854038&mt=1630612867&fvip=3&fexp=24001373%2C24007246&beids=9466585&c=ANDROID&txp=5511222&sparams=expire%2Cei%2Cip%2Cid%2Citag%2Csource%2Crequiressl%2Cvprv%2Cmime%2Ccnr%2Cratebypass%2Cdur%2Clmt&sig=AOq0QJ8wRAIgHn3dXBcNpjoup_AroPQIZE3tQe_M32TNL_rDTLDzlDICIC1s04IgLwq4d5S-qDZvxfLMEhlL4ig0jIKBm6VM05Ru&lsparams=mh%2Cmm%2Cmn%2Cms%2Cmv%2Cmvi%2Cpl%2Cinitcwndbps&lsig=AG3C_xAwRQIhAI56d6pWnwvSW05mOH6avXEdlz9Y1nCeEVbz2Ds3Z54JAiBMA9-COkTPHVSUg801ZBhqn76RAJbneLT5IaD0nvOFLg%3D%3D"
[download] Resuming download at byte 12758318
[download] Destination: A Year Alone In An Abandoned Ghost Town [l4Iu3YB0pTs].mp4
[download]   1.2% of 1.03GiB at 37.86KiB/s ETA 07:50:05
WARNING: The download speed is below throttle limit. Re-extracting data

without --throttled-rate

root@D:/mnt/c/Users/j# yt-dlp -N 4 https://www.youtube.com/watch?v=l4Iu3YB0pTs --verbose
[debug] Command-line config: ['-N', '4', 'https://www.youtube.com/watch?v=l4Iu3YB0pTs', '--verbose']
[debug] Encodings: locale UTF-8, fs utf-8, out UTF-8, pref UTF-8
[debug] yt-dlp version 2021.09.02
[debug] Python version 3.6.9 (CPython 64bit) - Linux-5.10.16.3-microsoft-standard-WSL2-x86_64-with-Ubuntu-18.04-bionic
[debug] exe versions: none
[debug] Optional libraries: keyring, mutagen, pycryptodome, sqlite, websockets
[debug] Proxy map: {}
[debug] [youtube] Extracting URL: https://www.youtube.com/watch?v=l4Iu3YB0pTs
[youtube] l4Iu3YB0pTs: Downloading webpage
[youtube] l4Iu3YB0pTs: Downloading android player API JSON
[debug] Sort order given by extractor: quality, res, fps, source, codec:vp9.2, lang
[debug] Formats sorted by: hasvid, ie_pref, quality, res, fps, source, vcodec:vp9.2(10), acodec, lang, filesize, fs_approx, tbr, vbr, abr, asr, proto, vext, aext, hasaud, id
[debug] Testing thumbnail 45
[debug] Default format spec: best/bestvideo+bestaudio
[info] l4Iu3YB0pTs: Downloading 1 format(s): 22
[debug] Invoking downloader on "https://r2---sn-oxunxg8pjvn-jo4s.googlevideo.com/videoplayback?expire=1630634879&ei=Hy8xYYn4Isb0wgSbjJiICQ&ip=201.17.158.5&id=o-ACaByODaacwZ_IUXDV3-fH82Uy49CzXSQtTB7_F4k3WR&itag=22&source=youtube&requiressl=yes&mh=Mb&mm=31%2C26&mn=sn-oxunxg8pjvn-jo4s%2Csn-bg07dnze&ms=au%2Conr&mv=m&mvi=2&pl=25&initcwndbps=1003750&vprv=1&mime=video%2Fmp4&cnr=14&ratebypass=yes&dur=4009.993&lmt=1628701081854038&mt=1630613099&fvip=3&fexp=24001373%2C24007246&c=ANDROID&txp=5511222&sparams=expire%2Cei%2Cip%2Cid%2Citag%2Csource%2Crequiressl%2Cvprv%2Cmime%2Ccnr%2Cratebypass%2Cdur%2Clmt&sig=AOq0QJ8wRQIhAIOkwYsGRIcFEp1vp3g0JrzELdmahw6gtN7OAnd2d1pWAiAmRwo_0hUnoBsf_ankApb3lx08ulLwxdzhe7uzumT8JQ%3D%3D&lsparams=mh%2Cmm%2Cmn%2Cms%2Cmv%2Cmvi%2Cpl%2Cinitcwndbps&lsig=AG3C_xAwRgIhAMUVMx7xX5LvXG873T_qaDvUNYaQL6UN_LMF8jachdPbAiEA62rMuh_dMptLcmT5Bq7HI8Pyg6r2UASz5zJgkolFYz0%3D"
[download] Resuming download at byte 12923248
[download] Destination: A Year Alone In An Abandoned Ghost Town [l4Iu3YB0pTs].mp4
[download]   1.5% of 1.03GiB at 89.07KiB/s ETA 03:19:05

Additional info that might be relevant: I'm on a WSL2 with Ubuntu 18.04

@coletdjnz
Copy link
Member

Strange. I reused the links generated in your logs and I'm getting normal speeds here. I think I can rule out this being related to the 'n-param' throttling issue in ytdl-org/youtube-dl#29326. So --throttled-rate is unlikely to be useful.

Couple things to check:
In the browser on YouTube, open the stats for nerds info for this video.

  • What does it say your connection speed is?
  • Can you try downloading the format(s) YouTube is using and see if you get the same behaviour (e.g. mine is using 248 for the video)?

I'm leaning on the side this might be related to your connection to YT but not entirely sure myself.

Sidenote: you may want to install ffmpeg since you are not getting the highest quality by default.

@jlcd
Copy link
Author

jlcd commented Sep 2, 2021

Great, will install ffmpeg, didn't know I wasn't getting the best quality.

As per YT stats:
image

How may I use these exact settings with yt-dlp?

@coletdjnz
Copy link
Member

Great, will install ffmpeg, didn't know I wasn't getting the best quality.

As per YT stats:
image

How may I use these exact settings with yt-dlp?

Hmm, connection speed seems fine.
For this video, -f 398+251 will give you the same as what YouTube is serving, if you want to test that.

@pukkandan
Copy link
Member

pukkandan commented Sep 2, 2021

Can you run yt-dlp l4Iu3YB0pTs -v --print-traffic -f 22 and post the output?

@jlcd
Copy link
Author

jlcd commented Sep 2, 2021

@coletdjnz with -f 398+251 it gave me [youtube] l4Iu3YB0pTs: Requested format is not available

@pukkandan here it goes:

root@D:/mnt/c/Users/j# yt-dlp l4Iu3YB0pTs -v --print-traffic -f 22
[debug] Command-line config: ['l4Iu3YB0pTs', '-v', '--print-traffic', '-f', '22']
[debug] Encodings: locale UTF-8, fs utf-8, out UTF-8, pref UTF-8
[debug] yt-dlp version 2021.09.02
[debug] Python version 3.6.9 (CPython 64bit) - Linux-5.10.16.3-microsoft-standard-WSL2-x86_64-with-Ubuntu-18.04-bionic
[debug] exe versions: ffmpeg 3.4.8, ffprobe 3.4.8
[debug] Optional libraries: keyring, mutagen, pycryptodome, sqlite, websockets
[debug] Proxy map: {}
[debug] [youtube] Extracting URL: l4Iu3YB0pTs
[youtube] l4Iu3YB0pTs: Downloading webpage
send: b'GET /watch?v=l4Iu3YB0pTs&bpctr=9999999999&has_verified=1 HTTP/1.1\r\nHost: www.youtube.com\r\nCookie: CONSENT=YES+cb.20210328-17-p0.en+FX+406\r\nUser-Agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/72.0.3626.39 Safari/537.36\r\nAccept-Charset: ISO-8859-1,utf-8;q=0.7,*;q=0.7\r\nAccept: text/html,application/xhtml+xml,application/xml;q=0.9,*/*;q=0.8\r\nAccept-Encoding: gzip, deflate\r\nAccept-Language: en-us,en;q=0.5\r\nConnection: close\r\n\r\n'
reply: 'HTTP/1.1 200 OK\r\n'
header: Content-Type: text/html; charset=utf-8
header: X-Content-Type-Options: nosniff
header: Cache-Control: no-cache, no-store, max-age=0, must-revalidate
header: Pragma: no-cache
header: Expires: Mon, 01 Jan 1990 00:00:00 GMT
header: Date: Thu, 02 Sep 2021 22:38:45 GMT
header: X-Frame-Options: SAMEORIGIN
header: Strict-Transport-Security: max-age=31536000
header: accept-ch: Sec-CH-UA-Arch, Sec-CH-UA-Full-Version, Sec-CH-UA-Model, Sec-CH-UA-Platform, Sec-CH-UA-Platform-Version
header: permissions-policy: ch-ua-full-version=*, ch-ua-platform=*, ch-ua-platform-version=*, ch-ua-arch=*, ch-ua-model=*
header: P3P: CP="This is not a P3P policy! See http://support.google.com/accounts/answer/151657?hl=en for more info."
header: Content-Encoding: gzip
header: Server: ESF
header: X-XSS-Protection: 0
header: Set-Cookie: GPS=1; Domain=.youtube.com; Expires=Thu, 02-Sep-2021 23:08:45 GMT; Path=/; Secure; HttpOnly
header: Set-Cookie: GPS=1; Domain=.youtube.com; Expires=Thu, 02-Sep-2021 23:08:45 GMT; Path=/; Secure; HttpOnly
header: Set-Cookie: GPS=1; Domain=.youtube.com; Expires=Thu, 02-Sep-2021 23:08:45 GMT; Path=/; Secure; HttpOnly
header: Alt-Svc: h3=":443"; ma=2592000,h3-29=":443"; ma=2592000,h3-T051=":443"; ma=2592000,h3-Q050=":443"; ma=2592000,h3-Q046=":443"; ma=2592000,h3-Q043=":443"; ma=2592000,quic=":443"; ma=2592000; v="46,43"
header: Connection: close
header: Transfer-Encoding: chunked
[youtube] l4Iu3YB0pTs: Downloading android player API JSON
send: b'POST /youtubei/v1/player?key=AIzaSyAO_FJ2SlqU8Q4STEHLGCilw_Y9_11qcW8 HTTP/1.1\r\nContent-Length: 276\r\nHost: www.youtube.com\r\nCookie: CONSENT=YES+cb.20210328-17-p0.en+FX+406; GPS=1; YSC=FhaPpcOHPJ0; VISITOR_INFO1_LIVE=UIVRnr1Hz60\r\nX-Youtube-Client-Name: 3\r\nX-Youtube-Client-Version: 16.20\r\nOrigin: https://www.youtube.com\r\nContent-Type: application/json\r\nUser-Agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/72.0.3626.39 Safari/537.36\r\nAccept-Charset: ISO-8859-1,utf-8;q=0.7,*;q=0.7\r\nAccept: text/html,application/xhtml+xml,application/xml;q=0.9,*/*;q=0.8\r\nAccept-Encoding: gzip, deflate\r\nAccept-Language: en-us,en;q=0.5\r\nConnection: close\r\n\r\n'
send: b'{"context": {"client": {"clientName": "ANDROID", "clientVersion": "16.20", "hl": "en"}}, "videoId": "l4Iu3YB0pTs", "playbackContext": {"contentPlaybackContext": {"html5Preference": "HTML5_PREF_WANTS", "signatureTimestamp": 18871}}, "contentCheckOk": true, "racyCheckOk": true}'
reply: 'HTTP/1.1 200 OK\r\n'
header: Content-Type: application/json; charset=UTF-8
header: Vary: Origin
header: Vary: Origin
header: Vary: Origin
header: Content-Encoding: gzip
header: Date: Thu, 02 Sep 2021 22:38:48 GMT
header: Server: ESF
header: Cache-Control: private
header: X-XSS-Protection: 0
header: X-Frame-Options: SAMEORIGIN
header: X-Content-Type-Options: nosniff
header: Alt-Svc: h3=":443"; ma=2592000,h3-29=":443"; ma=2592000,h3-T051=":443"; ma=2592000,h3-Q050=":443"; ma=2592000,h3-Q046=":443"; ma=2592000,h3-Q043=":443"; ma=2592000,quic=":443"; ma=2592000; v="46,43"
header: Connection: close
header: Transfer-Encoding: chunked
[debug] Sort order given by extractor: quality, res, fps, source, codec:vp9.2, lang
[debug] Formats sorted by: hasvid, ie_pref, quality, res, fps, source, vcodec:vp9.2(10), acodec, lang, filesize, fs_approx, tbr, vbr, abr, asr, proto, vext, aext, hasaud, id
[debug] Testing thumbnail 45
send: b'HEAD /vi_webp/l4Iu3YB0pTs/maxresdefault.webp HTTP/1.1\r\nHost: i.ytimg.com\r\nUser-Agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/72.0.3626.39 Safari/537.36\r\nAccept-Charset: ISO-8859-1,utf-8;q=0.7,*;q=0.7\r\nAccept: text/html,application/xhtml+xml,application/xml;q=0.9,*/*;q=0.8\r\nAccept-Encoding: gzip, deflate\r\nAccept-Language: en-us,en;q=0.5\r\nConnection: close\r\n\r\n'
reply: 'HTTP/1.1 200 OK\r\n'
header: Accept-Ranges: bytes
header: Content-Type: image/webp
header: Content-Length: 179696
header: Vary: Origin
header: Cross-Origin-Resource-Policy: cross-origin
header: Date: Thu, 02 Sep 2021 22:38:49 GMT
header: Expires: Fri, 03 Sep 2021 00:38:49 GMT
header: Cache-Control: public, max-age=7200
header: ETag: "1615635997"
header: X-Content-Type-Options: nosniff
header: Server: sffe
header: X-XSS-Protection: 0
header: Alt-Svc: h3=":443"; ma=2592000,h3-29=":443"; ma=2592000,h3-T051=":443"; ma=2592000,h3-Q050=":443"; ma=2592000,h3-Q046=":443"; ma=2592000,h3-Q043=":443"; ma=2592000,quic=":443"; ma=2592000; v="46,43"
header: Connection: close
[info] l4Iu3YB0pTs: Downloading 1 format(s): 22
[debug] Invoking downloader on "https://r2---sn-oxunxg8pjvn-jo4s.googlevideo.com/videoplayback?expire=1630643927&ei=d1IxYdm5NsuQ1sQPqJiz8AI&ip=201.17.158.5&id=o-AKZGQxs5ZNocJTQli1PqfI6ObD0LHEcgcx1TXaqPfUoN&itag=22&source=youtube&requiressl=yes&mh=Mb&mm=31%2C26&mn=sn-oxunxg8pjvn-jo4s%2Csn-bg07dnze&ms=au%2Conr&mv=m&mvi=2&pcm2cms=yes&pl=25&initcwndbps=780000&vprv=1&mime=video%2Fmp4&cnr=14&ratebypass=yes&dur=4009.993&lmt=1628701081854038&mt=1630621974&fvip=3&fexp=24001373%2C24007246&c=ANDROID&txp=5511222&sparams=expire%2Cei%2Cip%2Cid%2Citag%2Csource%2Crequiressl%2Cvprv%2Cmime%2Ccnr%2Cratebypass%2Cdur%2Clmt&sig=AOq0QJ8wRAIgZ6ACQVvMIW6aCFJMQe4gzA9Ux2O3FwH_D9VPS3NETEYCIBT99-JbwR-8qVEmrOtXuzHulQ5Z0fWUgJI7B8hY_sDs&lsparams=mh%2Cmm%2Cmn%2Cms%2Cmv%2Cmvi%2Cpcm2cms%2Cpl%2Cinitcwndbps&lsig=AG3C_xAwRQIgWTzSY1Sn_dIgS5NIIlFYXBklmlq7-cF1e-xVQz9iiHkCIQDPttz5k1KwxM4CRqXE_2wJvqR_AZNrbk28sDrLB-k0mw%3D%3D"
[download] Resuming download at byte 16754241
send: b'GET /videoplayback?expire=1630643927&ei=d1IxYdm5NsuQ1sQPqJiz8AI&ip=201.17.158.5&id=o-AKZGQxs5ZNocJTQli1PqfI6ObD0LHEcgcx1TXaqPfUoN&itag=22&source=youtube&requiressl=yes&mh=Mb&mm=31%2C26&mn=sn-oxunxg8pjvn-jo4s%2Csn-bg07dnze&ms=au%2Conr&mv=m&mvi=2&pcm2cms=yes&pl=25&initcwndbps=780000&vprv=1&mime=video%2Fmp4&cnr=14&ratebypass=yes&dur=4009.993&lmt=1628701081854038&mt=1630621974&fvip=3&fexp=24001373%2C24007246&c=ANDROID&txp=5511222&sparams=expire%2Cei%2Cip%2Cid%2Citag%2Csource%2Crequiressl%2Cvprv%2Cmime%2Ccnr%2Cratebypass%2Cdur%2Clmt&sig=AOq0QJ8wRAIgZ6ACQVvMIW6aCFJMQe4gzA9Ux2O3FwH_D9VPS3NETEYCIBT99-JbwR-8qVEmrOtXuzHulQ5Z0fWUgJI7B8hY_sDs&lsparams=mh%2Cmm%2Cmn%2Cms%2Cmv%2Cmvi%2Cpcm2cms%2Cpl%2Cinitcwndbps&lsig=AG3C_xAwRQIgWTzSY1Sn_dIgS5NIIlFYXBklmlq7-cF1e-xVQz9iiHkCIQDPttz5k1KwxM4CRqXE_2wJvqR_AZNrbk28sDrLB-k0mw%3D%3D HTTP/1.1\r\nAccept-Encoding: identity\r\nHost: r2---sn-oxunxg8pjvn-jo4s.googlevideo.com\r\nUser-Agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/72.0.3626.39 Safari/537.36\r\nAccept-Charset: ISO-8859-1,utf-8;q=0.7,*;q=0.7\r\nAccept: text/html,application/xhtml+xml,application/xml;q=0.9,*/*;q=0.8\r\nAccept-Language: en-us,en;q=0.5\r\nRange: bytes=16754241-\r\nConnection: close\r\n\r\n'
reply: 'HTTP/1.1 206 Partial Content\r\n'
header: Last-Modified: Wed, 11 Aug 2021 16:58:01 GMT
header: Content-Type: video/mp4
header: Date: Thu, 02 Sep 2021 22:38:49 GMT
header: Expires: Thu, 02 Sep 2021 22:38:49 GMT
header: Cache-Control: private, max-age=21298
header: Content-Range: bytes 16754241-1106291095/1106291096
header: Accept-Ranges: bytes
header: Content-Length: 1089536855
header: Connection: close
header: Alt-Svc: h3=":443"; ma=2592000,h3-29=":443"; ma=2592000,h3-T051=":443"; ma=2592000,h3-Q050=":443"; ma=2592000,h3-Q046=":443"; ma=2592000,h3-Q043=":443"; ma=2592000,quic=":443"; ma=2592000; v="46,43"
header: Vary: Origin
header: Cross-Origin-Resource-Policy: cross-origin
header: X-Content-Type-Options: nosniff
header: Server: gvs 1.0
[download] Destination: A Year Alone In An Abandoned Ghost Town [l4Iu3YB0pTs].mp4
[download]   2.0% of 1.03GiB at 87.56KiB/s ETA 03:21:37

@coletdjnz
Copy link
Member

@coletdjnz with -f 398+251 it gave me [youtube] l4Iu3YB0pTs: Requested format is not available

my bad. since you have ffmpeg now, run without -f 398+251 since it will grab highest quality/something other than format 22.

@pukkandan
Copy link
Member

pukkandan commented Sep 2, 2021

my bad. since you have ffmpeg now, run without -f 398+251 since it will grab highest quality/something other than format 22.

While this helps you get the best quality, it doesnot adress the issue at hand


From your log, I have a suspicion of what is happening. Could u try:

yt-dlp l4Iu3YB0pTs -v --print-traffic -f 22 --header "Cookie: CONSENT=YES+cb.20210328-17-p0.en+FX+644; GPS=1; YSC=bQMAuPSMDRI; VISITOR_INFO1_LIVE=4AnIZgoeWW4"

@jlcd
Copy link
Author

jlcd commented Sep 2, 2021

Here you go @pukkandan (I used --add-header instead of --header as the later doesn't exist, let me know if it was the right thing to do):

root@D:/mnt/c/Users/j# yt-dlp l4Iu3YB0pTs -v --print-traffic -f 22 --add-header "Cookie: CONSENT=YES+c
b.20210328-17-p0.en+FX+644; GPS=1; YSC=bQMAuPSMDRI; VISITOR_INFO1_LIVE=4AnIZgoeWW4"
[debug] Command-line config: ['l4Iu3YB0pTs', '-v', '--print-traffic', '-f', '22', '--add-header', 'Cookie: CONSENT=YES+cb.20210328-17-p0.en+FX+644; GPS=1; YSC=bQMAuPSMDRI; VISITOR_INFO1_LIVE=4AnIZgoeWW4']
[debug] Encodings: locale UTF-8, fs utf-8, out UTF-8, pref UTF-8
[debug] yt-dlp version 2021.09.02
[debug] Python version 3.6.9 (CPython 64bit) - Linux-5.10.16.3-microsoft-standard-WSL2-x86_64-with-Ubuntu-18.04-bionic
[debug] exe versions: ffmpeg 3.4.8, ffprobe 3.4.8
[debug] Optional libraries: keyring, mutagen, pycryptodome, sqlite, websockets
[debug] Proxy map: {}
[debug] [youtube] Extracting URL: l4Iu3YB0pTs
[youtube] l4Iu3YB0pTs: Downloading webpage
send: b'GET /watch?v=l4Iu3YB0pTs&bpctr=9999999999&has_verified=1 HTTP/1.1\r\nHost: www.youtube.com\r\nCookie: CONSENT=YES+cb.20210328-17-p0.en+FX+576\r\nUser-Agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/73.0.3627.1 Safari/537.36\r\nAccept-Charset: ISO-8859-1,utf-8;q=0.7,*;q=0.7\r\nAccept: text/html,application/xhtml+xml,application/xml;q=0.9,*/*;q=0.8\r\nAccept-Encoding: gzip, deflate\r\nAccept-Language: en-us,en;q=0.5\r\nConnection: close\r\n\r\n'
reply: 'HTTP/1.1 200 OK\r\n'
header: Content-Type: text/html; charset=utf-8
header: X-Content-Type-Options: nosniff
header: Cache-Control: no-cache, no-store, max-age=0, must-revalidate
header: Pragma: no-cache
header: Expires: Mon, 01 Jan 1990 00:00:00 GMT
header: Date: Thu, 02 Sep 2021 22:56:35 GMT
header: X-Frame-Options: SAMEORIGIN
header: Strict-Transport-Security: max-age=31536000
header: accept-ch: Sec-CH-UA-Arch, Sec-CH-UA-Full-Version, Sec-CH-UA-Model, Sec-CH-UA-Platform, Sec-CH-UA-Platform-Version
header: permissions-policy: ch-ua-full-version=*, ch-ua-platform=*, ch-ua-platform-version=*, ch-ua-arch=*, ch-ua-model=*
header: P3P: CP="This is not a P3P policy! See http://support.google.com/accounts/answer/151657?hl=en for more info."
header: Content-Encoding: gzip
header: Server: ESF
header: X-XSS-Protection: 0
header: Set-Cookie: GPS=1; Domain=.youtube.com; Expires=Thu, 02-Sep-2021 23:26:35 GMT; Path=/; Secure; HttpOnly
header: Set-Cookie: GPS=1; Domain=.youtube.com; Expires=Thu, 02-Sep-2021 23:26:35 GMT; Path=/; Secure; HttpOnly
header: Set-Cookie: GPS=1; Domain=.youtube.com; Expires=Thu, 02-Sep-2021 23:26:35 GMT; Path=/; Secure; HttpOnly
header: Alt-Svc: h3=":443"; ma=2592000,h3-29=":443"; ma=2592000,h3-T051=":443"; ma=2592000,h3-Q050=":443"; ma=2592000,h3-Q046=":443"; ma=2592000,h3-Q043=":443"; ma=2592000,quic=":443"; ma=2592000; v="46,43"
header: Connection: close
header: Transfer-Encoding: chunked
[youtube] l4Iu3YB0pTs: Downloading android player API JSON
send: b'POST /youtubei/v1/player?key=AIzaSyAO_FJ2SlqU8Q4STEHLGCilw_Y9_11qcW8 HTTP/1.1\r\nContent-Length: 276\r\nHost: www.youtube.com\r\nCookie: CONSENT=YES+cb.20210328-17-p0.en+FX+576; GPS=1; YSC=ge2qtzB_QHE; VISITOR_INFO1_LIVE=--H1QPFhbB4\r\nX-Youtube-Client-Name: 3\r\nX-Youtube-Client-Version: 16.20\r\nOrigin: https://www.youtube.com\r\nContent-Type: application/json\r\nUser-Agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/73.0.3627.1 Safari/537.36\r\nAccept-Charset: ISO-8859-1,utf-8;q=0.7,*;q=0.7\r\nAccept: text/html,application/xhtml+xml,application/xml;q=0.9,*/*;q=0.8\r\nAccept-Encoding: gzip, deflate\r\nAccept-Language: en-us,en;q=0.5\r\nConnection: close\r\n\r\n'
send: b'{"context": {"client": {"clientName": "ANDROID", "clientVersion": "16.20", "hl": "en"}}, "videoId": "l4Iu3YB0pTs", "playbackContext": {"contentPlaybackContext": {"html5Preference": "HTML5_PREF_WANTS", "signatureTimestamp": 18871}}, "contentCheckOk": true, "racyCheckOk": true}'
reply: 'HTTP/1.1 200 OK\r\n'
header: Content-Type: application/json; charset=UTF-8
header: Vary: Origin
header: Vary: Origin
header: Vary: Origin
header: Content-Encoding: gzip
header: Date: Thu, 02 Sep 2021 22:56:38 GMT
header: Server: ESF
header: Cache-Control: private
header: X-XSS-Protection: 0
header: X-Frame-Options: SAMEORIGIN
header: X-Content-Type-Options: nosniff
header: Alt-Svc: h3=":443"; ma=2592000,h3-29=":443"; ma=2592000,h3-T051=":443"; ma=2592000,h3-Q050=":443"; ma=2592000,h3-Q046=":443"; ma=2592000,h3-Q043=":443"; ma=2592000,quic=":443"; ma=2592000; v="46,43"
header: Connection: close
header: Transfer-Encoding: chunked
[debug] Sort order given by extractor: quality, res, fps, source, codec:vp9.2, lang
[debug] Formats sorted by: hasvid, ie_pref, quality, res, fps, source, vcodec:vp9.2(10), acodec, lang, filesize, fs_approx, tbr, vbr, abr, asr, proto, vext, aext, hasaud, id
[debug] Testing thumbnail 45
send: b'HEAD /vi_webp/l4Iu3YB0pTs/maxresdefault.webp HTTP/1.1\r\nHost: i.ytimg.com\r\nUser-Agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/73.0.3627.1 Safari/537.36\r\nAccept-Charset: ISO-8859-1,utf-8;q=0.7,*;q=0.7\r\nAccept: text/html,application/xhtml+xml,application/xml;q=0.9,*/*;q=0.8\r\nAccept-Encoding: gzip, deflate\r\nAccept-Language: en-us,en;q=0.5\r\nCookie:  CONSENT=YES+cb.20210328-17-p0.en+FX+644; GPS=1; YSC=bQMAuPSMDRI; VISITOR_INFO1_LIVE=4AnIZgoeWW4\r\nConnection: close\r\n\r\n'
reply: 'HTTP/1.1 200 OK\r\n'
header: Accept-Ranges: bytes
header: Content-Type: image/webp
header: Content-Length: 179696
header: Vary: Origin
header: Cross-Origin-Resource-Policy: cross-origin
header: Date: Thu, 02 Sep 2021 22:56:39 GMT
header: Expires: Fri, 03 Sep 2021 00:56:39 GMT
header: Cache-Control: public, max-age=7200
header: ETag: "1615635997"
header: X-Content-Type-Options: nosniff
header: Server: sffe
header: X-XSS-Protection: 0
header: Alt-Svc: h3=":443"; ma=2592000,h3-29=":443"; ma=2592000,h3-T051=":443"; ma=2592000,h3-Q050=":443"; ma=2592000,h3-Q046=":443"; ma=2592000,h3-Q043=":443"; ma=2592000,quic=":443"; ma=2592000; v="46,43"
header: Connection: close
[info] l4Iu3YB0pTs: Downloading 1 format(s): 22
[debug] Invoking downloader on "https://r2---sn-oxunxg8pjvn-jo4s.googlevideo.com/videoplayback?expire=1630644997&ei=pVYxYeLvNMj9wATMhI_ADw&ip=201.17.158.5&id=o-AH5ovx1y33tankAn64OrDKCGjZYna76KlFzTm10WmLcE&itag=22&source=youtube&requiressl=yes&mh=Mb&mm=31%2C26&mn=sn-oxunxg8pjvn-jo4s%2Csn-bg07dnze&ms=au%2Conr&mv=m&mvi=2&pl=25&initcwndbps=696250&vprv=1&mime=video%2Fmp4&cnr=14&ratebypass=yes&dur=4009.993&lmt=1628701081854038&mt=1630623172&fvip=3&fexp=24001373%2C24007246&c=ANDROID&txp=5511222&sparams=expire%2Cei%2Cip%2Cid%2Citag%2Csource%2Crequiressl%2Cvprv%2Cmime%2Ccnr%2Cratebypass%2Cdur%2Clmt&sig=AOq0QJ8wRAIgbAe7BFMsD3DquROHBKfnpxcv8r18JvjbH2qVmDbQUy8CIBpxfkNNv7ZjjLQ2il7trj13Zqdg8BkNaL2PdVoqur1B&lsparams=mh%2Cmm%2Cmn%2Cms%2Cmv%2Cmvi%2Cpl%2Cinitcwndbps&lsig=AG3C_xAwRgIhAI2IPo0FuwPoHGLPye_agqVgB5BjFdQ9YLF9TU1HHUvdAiEAySHJL_PU6XvrKxPzpY_BVxV9d0E5h3AUZo6oVZ0mBoQ%3D"
[download] Resuming download at byte 21905855
send: b'GET /videoplayback?expire=1630644997&ei=pVYxYeLvNMj9wATMhI_ADw&ip=201.17.158.5&id=o-AH5ovx1y33tankAn64OrDKCGjZYna76KlFzTm10WmLcE&itag=22&source=youtube&requiressl=yes&mh=Mb&mm=31%2C26&mn=sn-oxunxg8pjvn-jo4s%2Csn-bg07dnze&ms=au%2Conr&mv=m&mvi=2&pl=25&initcwndbps=696250&vprv=1&mime=video%2Fmp4&cnr=14&ratebypass=yes&dur=4009.993&lmt=1628701081854038&mt=1630623172&fvip=3&fexp=24001373%2C24007246&c=ANDROID&txp=5511222&sparams=expire%2Cei%2Cip%2Cid%2Citag%2Csource%2Crequiressl%2Cvprv%2Cmime%2Ccnr%2Cratebypass%2Cdur%2Clmt&sig=AOq0QJ8wRAIgbAe7BFMsD3DquROHBKfnpxcv8r18JvjbH2qVmDbQUy8CIBpxfkNNv7ZjjLQ2il7trj13Zqdg8BkNaL2PdVoqur1B&lsparams=mh%2Cmm%2Cmn%2Cms%2Cmv%2Cmvi%2Cpl%2Cinitcwndbps&lsig=AG3C_xAwRgIhAI2IPo0FuwPoHGLPye_agqVgB5BjFdQ9YLF9TU1HHUvdAiEAySHJL_PU6XvrKxPzpY_BVxV9d0E5h3AUZo6oVZ0mBoQ%3D HTTP/1.1\r\nAccept-Encoding: identity\r\nHost: r2---sn-oxunxg8pjvn-jo4s.googlevideo.com\r\nUser-Agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/73.0.3627.1 Safari/537.36\r\nAccept-Charset: ISO-8859-1,utf-8;q=0.7,*;q=0.7\r\nAccept: text/html,application/xhtml+xml,application/xml;q=0.9,*/*;q=0.8\r\nAccept-Language: en-us,en;q=0.5\r\nCookie:  CONSENT=YES+cb.20210328-17-p0.en+FX+644; GPS=1; YSC=bQMAuPSMDRI; VISITOR_INFO1_LIVE=4AnIZgoeWW4\r\nRange: bytes=21905855-\r\nConnection: close\r\n\r\n'
reply: 'HTTP/1.1 206 Partial Content\r\n'
header: Last-Modified: Wed, 11 Aug 2021 16:58:01 GMT
header: Content-Type: video/mp4
header: Date: Thu, 02 Sep 2021 22:56:39 GMT
header: Expires: Thu, 02 Sep 2021 22:56:39 GMT
header: Cache-Control: private, max-age=21298
header: Content-Range: bytes 21905855-1106291095/1106291096
header: Accept-Ranges: bytes
header: Content-Length: 1084385241
header: Connection: close
header: Alt-Svc: h3=":443"; ma=2592000,h3-29=":443"; ma=2592000,h3-T051=":443"; ma=2592000,h3-Q050=":443"; ma=2592000,h3-Q046=":443"; ma=2592000,h3-Q043=":443"; ma=2592000,quic=":443"; ma=2592000; v="46,43"
header: Vary: Origin
header: Cross-Origin-Resource-Policy: cross-origin
header: X-Content-Type-Options: nosniff
header: Server: gvs 1.0
[download] Destination: A Year Alone In An Abandoned Ghost Town [l4Iu3YB0pTs].mp4
[download]   2.1% of 1.03GiB at 78.62KiB/s ETA 03:44:07

ps. where is the User Agent header?

@pukkandan
Copy link
Member

where is the User Agent header?

In this line

    send: b'GET /watch?v=l4Iu3YB0pTs&bpctr=9999999999&has_verified=1 HTTP/1.1\r\nHost: www.youtube.com\r\nCookie: CONSENT=YES+cb.20210328-17-p0.en+FX+576\r\nUser-Agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/73.0.3627.1 Safari/537.36\r\nAccept-Charset: ISO-8859-1,utf-8;q=0.7,*;q=0.7\r\nAccept: text/html,application/xhtml+xml,application/xml;q=0.9,*/*;q=0.8\r\nAccept-Encoding: gzip, deflate\r\nAccept-Language: en-us,en;q=0.5\r\nConnection: close\r\n\r\n'
    Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/73.0.3627.1 Safari/537.36

I used --add-header instead of --header as the later doesn't exist, let me know if it was the right thing to do

Yes, my bad

But doesnt look like it helped 😢

@pukkandan pukkandan added cant-reproduce The issue cannot be reliably reproduced help-wanted Extra attention is needed and removed question Question labels Sep 2, 2021
@jlcd
Copy link
Author

jlcd commented Sep 3, 2021

Not sure if that's the issue @89z, as I've already tried setting the chunk size to 10MB before and it didn't make any difference.

@jlcd
Copy link
Author

jlcd commented Sep 3, 2021

@89z Results with yt-dlp -f 243 l4Iu3YB0pTs:

root@D:/mnt/c/Users/j# yt-dlp -f 243 l4Iu3YB0pTs
[youtube] l4Iu3YB0pTs: Downloading webpage
[youtube] l4Iu3YB0pTs: Downloading android player API JSON
[info] l4Iu3YB0pTs: Downloading 1 format(s): 243
[download] Destination: A Year Alone In An Abandoned Ghost Town [l4Iu3YB0pTs].webm
[download]   0.7% of 166.74MiB at 95.31KiB/s ETA 29:38

@jlcd
Copy link
Author

jlcd commented Sep 3, 2021

I used -N 4 (4 threads IIRC) and --http-chunk-size 10M:

[debug] Command-line config: ['-N', '4', '--http-chunk-size', '10M', '-f', '243', '--verbose', 'l4Iu3YB0pTs']
[debug] Encodings: locale UTF-8, fs utf-8, out UTF-8, pref UTF-8
[debug] yt-dlp version 2021.09.02
[debug] Python version 3.6.9 (CPython 64bit) - Linux-5.10.16.3-microsoft-standard-WSL2-x86_64-with-Ubuntu-18.04-bionic
[debug] exe versions: ffmpeg 3.4.8, ffprobe 3.4.8
[debug] Optional libraries: keyring, mutagen, pycryptodome, sqlite, websockets
[debug] Proxy map: {}
[debug] [youtube] Extracting URL: l4Iu3YB0pTs
[youtube] l4Iu3YB0pTs: Downloading webpage
[youtube] l4Iu3YB0pTs: Downloading android player API JSON
[debug] Sort order given by extractor: quality, res, fps, source, codec:vp9.2, lang
[debug] Formats sorted by: hasvid, ie_pref, quality, res, fps, source, vcodec:vp9.2(10), acodec, lang, filesize, fs_approx, tbr, vbr, abr, asr, proto, vext, aext, hasaud, id
[debug] Testing thumbnail 45
[info] l4Iu3YB0pTs: Downloading 1 format(s): 243
[debug] Invoking downloader on "https://r2---sn-oxunxg8pjvn-jo4s.googlevideo.com/videoplayback?expire=1630703701&ei=9TsyYbKEAaG41sQP_7mlIA&ip=201.17.158.5&id=o-AE24_mYwcoWGKng60ForHXRBeIl19pPP8FUH2crumayh&itag=243&source=youtube&requiressl=yes&mh=Mb&mm=31%2C26&mn=sn-oxunxg8pjvn-jo4s%2Csn-bg0eznle&ms=au%2Conr&mv=m&mvi=2&pcm2cms=yes&pl=25&initcwndbps=1032500&vprv=1&mime=video%2Fwebm&gir=yes&clen=174839383&dur=4009.939&lmt=1628709425360156&mt=1630681729&fvip=3&keepalive=yes&fexp=24001373%2C24007246&c=ANDROID&txp=5511222&sparams=expire%2Cei%2Cip%2Cid%2Citag%2Csource%2Crequiressl%2Cvprv%2Cmime%2Cgir%2Cclen%2Cdur%2Clmt&sig=AOq0QJ8wRQIgLC8felwoEnjYHFucCN68Te9YYjbqLElLOYG9bWMoeiMCIQCd12sGtyJteljtrMXUWN0aH83nQPoctA49YFmOHxjsQw%3D%3D&lsparams=mh%2Cmm%2Cmn%2Cms%2Cmv%2Cmvi%2Cpcm2cms%2Cpl%2Cinitcwndbps&lsig=AG3C_xAwRQIhANfjCs3o8BmT_3MlvKoninZNK5m6h-HaneoekNJwDwp0AiB7Lmu1adBSCEneKMhByNCo6tCU46yAvPd6emlMHDdo8g%3D%3D"
[download] Resuming download at byte 1539197
[download] Destination: A Year Alone In An Abandoned Ghost Town [l4Iu3YB0pTs].webm
[download]   1.9% of 166.74MiB at 86.33KiB/s ETA 32:20^C
ERROR: Interrupted by user

@jlcd
Copy link
Author

jlcd commented Sep 3, 2021

[debug] Command-line config: ['--http-chunk-size', '10M', '-f', '243', '--verbose', 'l4Iu3YB0pTs']
[debug] Encodings: locale UTF-8, fs utf-8, out UTF-8, pref UTF-8
[debug] yt-dlp version 2021.09.02
[debug] Python version 3.6.9 (CPython 64bit) - Linux-5.10.16.3-microsoft-standard-WSL2-x86_64-with-Ubuntu-18.04-bionic
[debug] exe versions: ffmpeg 3.4.8, ffprobe 3.4.8
[debug] Optional libraries: keyring, mutagen, pycryptodome, sqlite, websockets
[debug] Proxy map: {}
[debug] [youtube] Extracting URL: l4Iu3YB0pTs
[youtube] l4Iu3YB0pTs: Downloading webpage
[youtube] l4Iu3YB0pTs: Downloading android player API JSON
[debug] Sort order given by extractor: quality, res, fps, source, codec:vp9.2, lang
[debug] Formats sorted by: hasvid, ie_pref, quality, res, fps, source, vcodec:vp9.2(10), acodec, lang, filesize, fs_approx, tbr, vbr, abr, asr, proto, vext, aext, hasaud, id
[debug] Testing thumbnail 45
[info] l4Iu3YB0pTs: Downloading 1 format(s): 243
[debug] Invoking downloader on "https://r2---sn-oxunxg8pjvn-jo4s.googlevideo.com/videoplayback?expire=1630703911&ei=xzwyYYawGvDq1sQP0_Kd4AI&ip=201.17.158.5&id=o-AB1Bx0mVOk6R_kfTeKRMlrRXNpAMT_w6nKDHWXZv6WqZ&itag=243&source=youtube&requiressl=yes&mh=Mb&mm=31%2C26&mn=sn-oxunxg8pjvn-jo4s%2Csn-bg0eznle&ms=au%2Conr&mv=m&mvi=2&pl=25&pcm2=no&initcwndbps=1053750&vprv=1&mime=video%2Fwebm&gir=yes&clen=174839383&dur=4009.939&lmt=1628709425360156&mt=1630681969&fvip=3&keepalive=yes&fexp=24001373%2C24007246&c=ANDROID&txp=5511222&sparams=expire%2Cei%2Cip%2Cid%2Citag%2Csource%2Crequiressl%2Cpcm2%2Cvprv%2Cmime%2Cgir%2Cclen%2Cdur%2Clmt&sig=AOq0QJ8wRgIhAPpeQDFy-pBfAOEQ34qdpXsoVTkCemOqMzRcWLc4aPxYAiEAwkjihupFcIIPfZcZ9hRsIF4NSKti351nnP1sVLamaDE%3D&lsparams=mh%2Cmm%2Cmn%2Cms%2Cmv%2Cmvi%2Cpl%2Cinitcwndbps&lsig=AG3C_xAwRgIhAM87Q2xStbWc36EtCozWJxz4wcurzWq_xmPVNVaGnSf8AiEA_REq52fv2bOThS-5WVyCZhY2HHnT9dxOJRmvfABvgoA%3D"
[download] Resuming download at byte 3278682
[download] Destination: A Year Alone In An Abandoned Ghost Town [l4Iu3YB0pTs].webm
[download]   2.4% of 166.74MiB at 80.11KiB/s ETA 34:41^C
ERROR: Interrupted by user

@jlcd
Copy link
Author

jlcd commented Sep 3, 2021

[debug] Command-line config: ['--http-chunk-size', '10M', '-f', '243', '--verbose', '--print-traffic', 'l4Iu3YB0pTs']
[debug] Encodings: locale UTF-8, fs utf-8, out UTF-8, pref UTF-8
[debug] yt-dlp version 2021.09.02
[debug] Python version 3.6.9 (CPython 64bit) - Linux-5.10.16.3-microsoft-standard-WSL2-x86_64-with-Ubuntu-18.04-bionic
[debug] exe versions: ffmpeg 3.4.8, ffprobe 3.4.8
[debug] Optional libraries: keyring, mutagen, pycryptodome, sqlite, websockets
[debug] Proxy map: {}
[debug] [youtube] Extracting URL: l4Iu3YB0pTs
[youtube] l4Iu3YB0pTs: Downloading webpage
send: b'GET /watch?v=l4Iu3YB0pTs&bpctr=9999999999&has_verified=1 HTTP/1.1\r\nHost: www.youtube.com\r\nCookie: CONSENT=YES+cb.20210328-17-p0.en+FX+956\r\nUser-Agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/69.0.3497.33 Safari/537.36\r\nAccept-Charset: ISO-8859-1,utf-8;q=0.7,*;q=0.7\r\nAccept: text/html,application/xhtml+xml,application/xml;q=0.9,*/*;q=0.8\r\nAccept-Encoding: gzip, deflate\r\nAccept-Language: en-us,en;q=0.5\r\nConnection: close\r\n\r\n'
reply: 'HTTP/1.1 200 OK\r\n'
header: Content-Type: text/html; charset=utf-8
header: X-Content-Type-Options: nosniff
header: Cache-Control: no-cache, no-store, max-age=0, must-revalidate
header: Pragma: no-cache
header: Expires: Mon, 01 Jan 1990 00:00:00 GMT
header: Date: Fri, 03 Sep 2021 15:20:35 GMT
header: X-Frame-Options: SAMEORIGIN
header: Strict-Transport-Security: max-age=31536000
header: permissions-policy: ch-ua-full-version=*, ch-ua-platform=*, ch-ua-platform-version=*, ch-ua-arch=*, ch-ua-model=*
header: accept-ch: Sec-CH-UA-Arch, Sec-CH-UA-Full-Version, Sec-CH-UA-Model, Sec-CH-UA-Platform, Sec-CH-UA-Platform-Version
header: P3P: CP="This is not a P3P policy! See http://support.google.com/accounts/answer/151657?hl=en for more info."
header: Content-Encoding: gzip
header: Server: ESF
header: X-XSS-Protection: 0
header: Set-Cookie: GPS=1; Domain=.youtube.com; Expires=Fri, 03-Sep-2021 15:50:35 GMT; Path=/; Secure; HttpOnly
header: Set-Cookie: GPS=1; Domain=.youtube.com; Expires=Fri, 03-Sep-2021 15:50:35 GMT; Path=/; Secure; HttpOnly
header: Set-Cookie: GPS=1; Domain=.youtube.com; Expires=Fri, 03-Sep-2021 15:50:35 GMT; Path=/; Secure; HttpOnly
header: Alt-Svc: h3=":443"; ma=2592000,h3-29=":443"; ma=2592000,h3-T051=":443"; ma=2592000,h3-Q050=":443"; ma=2592000,h3-Q046=":443"; ma=2592000,h3-Q043=":443"; ma=2592000,quic=":443"; ma=2592000; v="46,43"
header: Connection: close
header: Transfer-Encoding: chunked
[youtube] l4Iu3YB0pTs: Downloading android player API JSON
send: b'POST /youtubei/v1/player?key=AIzaSyAO_FJ2SlqU8Q4STEHLGCilw_Y9_11qcW8 HTTP/1.1\r\nContent-Length: 276\r\nHost: www.youtube.com\r\nCookie: CONSENT=YES+cb.20210328-17-p0.en+FX+956; GPS=1; YSC=THalLMiEAoU; VISITOR_INFO1_LIVE=qqT1kIbxSD4\r\nX-Youtube-Client-Name: 3\r\nX-Youtube-Client-Version: 16.20\r\nOrigin: https://www.youtube.com\r\nContent-Type: application/json\r\nUser-Agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/69.0.3497.33 Safari/537.36\r\nAccept-Charset: ISO-8859-1,utf-8;q=0.7,*;q=0.7\r\nAccept: text/html,application/xhtml+xml,application/xml;q=0.9,*/*;q=0.8\r\nAccept-Encoding: gzip, deflate\r\nAccept-Language: en-us,en;q=0.5\r\nConnection: close\r\n\r\n'
send: b'{"context": {"client": {"clientName": "ANDROID", "clientVersion": "16.20", "hl": "en"}}, "videoId": "l4Iu3YB0pTs", "playbackContext": {"contentPlaybackContext": {"html5Preference": "HTML5_PREF_WANTS", "signatureTimestamp": 18872}}, "contentCheckOk": true, "racyCheckOk": true}'
reply: 'HTTP/1.1 200 OK\r\n'
header: Content-Type: application/json; charset=UTF-8
header: Vary: Origin
header: Vary: Origin
header: Vary: Origin
header: Content-Encoding: gzip
header: Date: Fri, 03 Sep 2021 15:20:38 GMT
header: Server: ESF
header: Cache-Control: private
header: X-XSS-Protection: 0
header: X-Frame-Options: SAMEORIGIN
header: X-Content-Type-Options: nosniff
header: Alt-Svc: h3=":443"; ma=2592000,h3-29=":443"; ma=2592000,h3-T051=":443"; ma=2592000,h3-Q050=":443"; ma=2592000,h3-Q046=":443"; ma=2592000,h3-Q043=":443"; ma=2592000,quic=":443"; ma=2592000; v="46,43"
header: Connection: close
header: Transfer-Encoding: chunked
[debug] Sort order given by extractor: quality, res, fps, source, codec:vp9.2, lang
[debug] Formats sorted by: hasvid, ie_pref, quality, res, fps, source, vcodec:vp9.2(10), acodec, lang, filesize, fs_approx, tbr, vbr, abr, asr, proto, vext, aext, hasaud, id
[debug] Testing thumbnail 45
send: b'HEAD /vi_webp/l4Iu3YB0pTs/maxresdefault.webp HTTP/1.1\r\nHost: i.ytimg.com\r\nUser-Agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/69.0.3497.33 Safari/537.36\r\nAccept-Charset: ISO-8859-1,utf-8;q=0.7,*;q=0.7\r\nAccept: text/html,application/xhtml+xml,application/xml;q=0.9,*/*;q=0.8\r\nAccept-Encoding: gzip, deflate\r\nAccept-Language: en-us,en;q=0.5\r\nConnection: close\r\n\r\n'
reply: 'HTTP/1.1 200 OK\r\n'
header: Accept-Ranges: bytes
header: Content-Type: image/webp
header: Content-Length: 179696
header: Vary: Origin
header: Cross-Origin-Resource-Policy: cross-origin
header: Date: Fri, 03 Sep 2021 15:20:39 GMT
header: Expires: Fri, 03 Sep 2021 17:20:39 GMT
header: Cache-Control: public, max-age=7200
header: ETag: "1615635997"
header: X-Content-Type-Options: nosniff
header: Server: sffe
header: X-XSS-Protection: 0
header: Alt-Svc: h3=":443"; ma=2592000,h3-29=":443"; ma=2592000,h3-T051=":443"; ma=2592000,h3-Q050=":443"; ma=2592000,h3-Q046=":443"; ma=2592000,h3-Q043=":443"; ma=2592000,quic=":443"; ma=2592000; v="46,43"
header: Connection: close
[info] l4Iu3YB0pTs: Downloading 1 format(s): 243
[debug] Invoking downloader on "https://r2---sn-oxunxg8pjvn-jo4s.googlevideo.com/videoplayback?expire=1630704038&ei=Rj0yYamyD_-B-LAPu7y84Ag&ip=201.17.158.5&id=o-AE6hSqRDchEfG5svp9jddp1e84uZ6WJQKMd33RHAaGbX&itag=243&source=youtube&requiressl=yes&mh=Mb&mm=31%2C26&mn=sn-oxunxg8pjvn-jo4s%2Csn-bg07dnze&ms=au%2Conr&mv=m&mvi=2&pl=25&initcwndbps=1053750&vprv=1&mime=video%2Fwebm&gir=yes&clen=174839383&dur=4009.939&lmt=1628709425360156&mt=1630681969&fvip=3&keepalive=yes&fexp=24001373%2C24007246&c=ANDROID&txp=5511222&sparams=expire%2Cei%2Cip%2Cid%2Citag%2Csource%2Crequiressl%2Cvprv%2Cmime%2Cgir%2Cclen%2Cdur%2Clmt&sig=AOq0QJ8wRgIhANCqJaq7VgICykraOLBoDHvt99ENAA6Ib38U0ORIPARvAiEAxF4sYxyActoL_zb7JiUY8E4E-huedCrRAKZuHXa-9Gc%3D&lsparams=mh%2Cmm%2Cmn%2Cms%2Cmv%2Cmvi%2Cpl%2Cinitcwndbps&lsig=AG3C_xAwRgIhAJbefDjxCv5j6AE6DGkZTl92HC566vtgEwL935HjLZnpAiEAg7skHu7AfP2CQ23C09RbWJFjQ039512tQPIMUi-cDKo%3D"
[download] Resuming download at byte 4111289
send: b'GET /videoplayback?expire=1630704038&ei=Rj0yYamyD_-B-LAPu7y84Ag&ip=201.17.158.5&id=o-AE6hSqRDchEfG5svp9jddp1e84uZ6WJQKMd33RHAaGbX&itag=243&source=youtube&requiressl=yes&mh=Mb&mm=31%2C26&mn=sn-oxunxg8pjvn-jo4s%2Csn-bg07dnze&ms=au%2Conr&mv=m&mvi=2&pl=25&initcwndbps=1053750&vprv=1&mime=video%2Fwebm&gir=yes&clen=174839383&dur=4009.939&lmt=1628709425360156&mt=1630681969&fvip=3&keepalive=yes&fexp=24001373%2C24007246&c=ANDROID&txp=5511222&sparams=expire%2Cei%2Cip%2Cid%2Citag%2Csource%2Crequiressl%2Cvprv%2Cmime%2Cgir%2Cclen%2Cdur%2Clmt&sig=AOq0QJ8wRgIhANCqJaq7VgICykraOLBoDHvt99ENAA6Ib38U0ORIPARvAiEAxF4sYxyActoL_zb7JiUY8E4E-huedCrRAKZuHXa-9Gc%3D&lsparams=mh%2Cmm%2Cmn%2Cms%2Cmv%2Cmvi%2Cpl%2Cinitcwndbps&lsig=AG3C_xAwRgIhAJbefDjxCv5j6AE6DGkZTl92HC566vtgEwL935HjLZnpAiEAg7skHu7AfP2CQ23C09RbWJFjQ039512tQPIMUi-cDKo%3D HTTP/1.1\r\nAccept-Encoding: identity\r\nHost: r2---sn-oxunxg8pjvn-jo4s.googlevideo.com\r\nUser-Agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/69.0.3497.33 Safari/537.36\r\nAccept-Charset: ISO-8859-1,utf-8;q=0.7,*;q=0.7\r\nAccept: text/html,application/xhtml+xml,application/xml;q=0.9,*/*;q=0.8\r\nAccept-Language: en-us,en;q=0.5\r\nRange: bytes=4111289-14490985\r\nConnection: close\r\n\r\n'
reply: 'HTTP/1.1 206 Partial Content\r\n'
header: Last-Modified: Wed, 11 Aug 2021 19:17:05 GMT
header: Content-Type: video/webm
header: Date: Fri, 03 Sep 2021 15:20:39 GMT
header: Expires: Fri, 03 Sep 2021 15:20:39 GMT
header: Cache-Control: private, max-age=21299
header: Content-Range: bytes 4111289-14490985/174839383
header: Accept-Ranges: bytes
header: Content-Length: 10379697
header: Connection: keep-alive
header: Alt-Svc: h3=":443"; ma=2592000,h3-29=":443"; ma=2592000,h3-T051=":443"; ma=2592000,h3-Q050=":443"; ma=2592000,h3-Q046=":443"; ma=2592000,h3-Q043=":443"; ma=2592000,quic=":443"; ma=2592000; v="46,43"
header: Vary: Origin
header: Cross-Origin-Resource-Policy: cross-origin
header: X-Content-Type-Options: nosniff
header: Server: gvs 1.0
[download] Destination: A Year Alone In An Abandoned Ghost Town [l4Iu3YB0pTs].webm
[download]   2.7% of 166.74MiB at 82.51KiB/s ETA 33:32^C
ERROR: Interrupted by user

@jlcd
Copy link
Author

jlcd commented Sep 3, 2021

It may be something related to WSL2 (ref microsoft/WSL#4901):

Retrieving speedtest.net configuration...
Testing from Claro NET ()...
Retrieving speedtest.net server list...
Selecting best server based on ping...
Hosted by VIA BAND (Rio de Janeiro) [343.74 km]: 32.888 ms
Testing download speed................................................................................
Download: 2.19 Mbit/s
Testing upload speed......................................................................................................
Upload: 20.20 Mbit/s

I'll keep digging.

@pukkandan
Copy link
Member

It may be something related to WSL2

It is unlikely, but why dont u test on windows too so that we can confirm

@89z The range end isn't sent with the first request so that we can get what the total content length is. All other requests (for youtube) are made with a chunksize of 10M by default

@jlcd
Copy link
Author

jlcd commented Sep 3, 2021

It was exactly that... for some reason wsl2 doesn't like a lot of traffic.

C:\Users\j\Downloads>yt-dlp.exe  -N 4 --http-chunk-size 10M -f 243 --verbose l4Iu3YB0pTs
[debug] Command-line config: ['-N', '4', '--http-chunk-size', '10M', '-f', '243', '--verbose', 'l4Iu3YB0pTs']
[debug] Encodings: locale cp1252, fs utf-8, out utf-8, pref cp1252
[debug] yt-dlp version 2021.09.02 (exe)
[debug] Python version 3.8.10 (CPython 64bit) - Windows-10-10.0.19042-SP0
[debug] exe versions: none
[debug] Optional libraries: mutagen, pycryptodome, sqlite, websockets
[debug] Proxy map: {}
[debug] [youtube] Extracting URL: l4Iu3YB0pTs
[youtube] l4Iu3YB0pTs: Downloading webpage
[youtube] l4Iu3YB0pTs: Downloading android player API JSON
[debug] Sort order given by extractor: quality, res, fps, source, codec:vp9.2, lang
[debug] Formats sorted by: hasvid, ie_pref, quality, res, fps, source, vcodec:vp9.2(10), acodec, lang, filesize, fs_approx, tbr, vbr, abr, asr, proto, vext, aext, hasaud, id
[debug] Testing thumbnail 45
[info] l4Iu3YB0pTs: Downloading 1 format(s): 243
[debug] Invoking downloader on "https://r2---sn-oxunxg8pjvn-jo4s.googlevideo.com/videoplayback?expire=1630716556&ei=LG4yYduaK9zY1sQPjd65GA&ip=201.17.158.5&id=o-AIh1k_1ZkF3VoPinNwXSbo2Ddfx76AHQCsbmyzBLj0RH&itag=243&source=youtube&requiressl=yes&mh=Mb&mm=31%2C26&mn=sn-oxunxg8pjvn-jo4s%2Csn-bg0eznle&ms=au%2Conr&mv=m&mvi=2&pl=25&initcwndbps=857500&vprv=1&mime=video%2Fwebm&gir=yes&clen=174839383&dur=4009.939&lmt=1628709425360156&mt=1630694482&fvip=3&keepalive=yes&fexp=24001373%2C24007246&c=ANDROID&txp=5511222&sparams=expire%2Cei%2Cip%2Cid%2Citag%2Csource%2Crequiressl%2Cvprv%2Cmime%2Cgir%2Cclen%2Cdur%2Clmt&sig=AOq0QJ8wRQIhAOs6oZ5UtMP6oiwwH56ECVB0e22azpTxqN6cDzvAuOn6AiAmcuRe138v5BipYjW5iPWpYzE40HdRCFtYk9bbnYVF_w%3D%3D&lsparams=mh%2Cmm%2Cmn%2Cms%2Cmv%2Cmvi%2Cpl%2Cinitcwndbps&lsig=AG3C_xAwRQIhAPwt0qhEWESDzggSzyEciNN7bGFXoncudFtYKxJXsTUmAiAyMYLW5VOwFjIhQp6aVimS4yPvlQ56A6S570Em1Qk0qA%3D%3D"
[download] Destination: A Year Alone In An Abandoned Ghost Town [l4Iu3YB0pTs].webm
[download]  34.2% of 166.74MiB at 12.97MiB/s ETA 00:08

@pukkandan pukkandan removed the help-wanted Extra attention is needed label Sep 3, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
cant-reproduce The issue cannot be reliably reproduced
Projects
None yet
Development

No branches or pull requests

3 participants