yt-dlp: WARNING: [youtube] unable to extract initial player response

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

  • I’m reporting a bug unrelated to a specific site
  • I’ve verified that I’m running yt-dlp version 2023.07.06 (update instructions) or later (specify commit)
  • I’ve checked that all provided URLs are playable in a browser with the same IP and same login details
  • I’ve checked that all URLs and arguments with special characters are properly quoted or escaped
  • I’ve searched known issues and the bugtracker for similar issues including closed ones. DO NOT post duplicates
  • I’ve read the guidelines for opening an issue

Provide a description that is worded well enough to be understood

this is the error I get ( and it should be reported ) : [youtube] Extracting URL: https://www.youtube.com/watch?v=QYZ81Vl0qeI [youtube] QYZ81Vl0qeI: Downloading webpage WARNING: [youtube] unable to extract initial player response; please report this issue on https://github.com/yt-dlp/yt-dlp/issues?q= , filling out the appropriate issue template. Confirm you are on the latest version using yt-dlp -U [youtube] QYZ81Vl0qeI: Downloading ios player API JSON [youtube] QYZ81Vl0qeI: Downloading android player API JSON [youtube] QYZ81Vl0qeI: Downloading iframe API JS [youtube] QYZ81Vl0qeI: Downloading player 4cc5d082 [youtube] QYZ81Vl0qeI: Downloading web player API JSON [youtube] QYZ81Vl0qeI: Downloading m3u8 information WARNING: [youtube] unable to extract yt initial data; please report this issue on https://github.com/yt-dlp/yt-dlp/issues?q= , filling out the appropriate issue template. Confirm you are on the latest version using yt-dlp -U WARNING: [youtube] Incomplete data received in embedded initial data; re-fetching using API. [youtube] QYZ81Vl0qeI: Downloading initial data API JSON [info] QYZ81Vl0qeI: Downloading 1 format(s): 251 [download] Destination: 28. Francesco Onofrio Manfredini - Concerto Grosso in F Major, Op. 3, No. 8: IV. Presto.webm [download] 100% of 2.32MiB in 00:00:01 at 1.68MiB/s

I’m using version : E:\youtube4-dl\KLASSIEK\Baroque Concerto grosso\Francesco Onofrio Manfredini\Concerti Grossi Op. 3, Nos. 1-12>yt-dlp -vU [debug] Command-line config: [‘-vU’] [debug] Encodings: locale cp65001, fs utf-8, pref cp65001, out utf-8, error utf-8, screen utf-8 [debug] yt-dlp version stable@2023.07.06 [b532a3481] (win_exe) [debug] Python 3.8.10 (CPython AMD64 64bit) - Windows-10-10.0.19044-SP0 (OpenSSL 1.1.1k 25 Mar 2021) [debug] exe versions: ffmpeg N-109989-g7a8560cb22-20230310 (setts), ffprobe N-109989-g7a8560cb22-20230310 [debug] Optional libraries: Cryptodome-3.18.0, brotli-1.0.9, certifi-2023.05.07, mutagen-1.46.0, sqlite3-2.6.0, websockets-11.0.3 [debug] Proxy map: {} [debug] Loaded 1855 extractors [debug] Fetching release info: https://api.github.com/repos/yt-dlp/yt-dlp/releases/latest Available version: stable@2023.07.06, Current version: stable@2023.07.06 Current Build Hash: 5ff3e702171a50175c34397494e2d18ce35d771c2110b1e59bd173ec2fb352aa yt-dlp is up to date (stable@2023.07.06)

Provide verbose output that clearly demonstrates the problem

  • Run your yt-dlp command with -vU flag added (yt-dlp -vU <your command line>)
  • If using API, add 'verbose': True to YoutubeDL params instead
  • Copy the WHOLE output (starting with [debug] Command-line config) and insert it below

Complete Verbose Output

E:\youtube4-dl\KLASSIEK\Baroque Concerto grosso\Francesco Onofrio Manfredini\Concerti Grossi Op. 3, Nos. 1-12>yt-dlp -vU
[debug] Command-line config: ['-vU']
[debug] Encodings: locale cp65001, fs utf-8, pref cp65001, out utf-8, error utf-8, screen utf-8
[debug] yt-dlp version stable@2023.07.06 [b532a3481] (win_exe)
[debug] Python 3.8.10 (CPython AMD64 64bit) - Windows-10-10.0.19044-SP0 (OpenSSL 1.1.1k  25 Mar 2021)
[debug] exe versions: ffmpeg N-109989-g7a8560cb22-20230310 (setts), ffprobe N-109989-g7a8560cb22-20230310
[debug] Optional libraries: Cryptodome-3.18.0, brotli-1.0.9, certifi-2023.05.07, mutagen-1.46.0, sqlite3-2.6.0, websockets-11.0.3
[debug] Proxy map: {}
[debug] Loaded 1855 extractors
[debug] Fetching release info: https://api.github.com/repos/yt-dlp/yt-dlp/releases/latest
Available version: stable@2023.07.06, Current version: stable@2023.07.06
Current Build Hash: 5ff3e702171a50175c34397494e2d18ce35d771c2110b1e59bd173ec2fb352aa
yt-dlp is up to date (stable@2023.07.06)

About this issue

  • Original URL
  • State: closed
  • Created a year ago
  • Reactions: 9
  • Comments: 40 (19 by maintainers)

Commits related to this issue

Most upvoted comments

I have a page dump with the issue and the latest version of yt-dlp: yt-dlp-7594.zip.

Verbose log is inside the zip in yt-dlp.log. I also included the output of yt-dlp -vU in yt-dlp-vU.log. Another thing, the video isn’t the same as arnot-bot. (It is ixQEzV7FQVc)

I hope the page dump will help.

Run yt-dlp --update-to nightly and it should be fixed

[youtube] ixQEzV7FQVc: Downloading webpage [youtube] Saving request to ixQEzV7FQVc_https_-_consent.youtube.com_mcontinue=https%3A%2F%2Fwww.youtube.com%2Fwatch%3Fv%3DixQEzV7FQVc%26bpctr%3D9999999999%26has_verified%3D1%26cbrd%3D1_gl=FR_m=0_pc=yt_cm=4_hl=en_src=1.dump

So it’s being sent to the consent page, which I thought was supposed to be prevented by adding these query parameters:

            query = {'bpctr': '9999999999', 'has_verified': '1'}

In the redirect URL, and in its <noscript><meta http-equiv="refresh" content="0;URL='{URL}'"> element the page is redirected via this URL https://consent.youtube.com/ml?continue=https://www.youtube.com/watch?v%3DixQEzV7FQVc%26bpctr%3D9999999999%26has_verified%3D1%26cbrd%3D1&amp;gl=FR&amp;hl=en&amp;cm=4&amp;pc=yt&amp;src=1&amp;rffu=true, whose continue URL has these additional parameters:

{ 'cbrd': '1',            # ?
  'gl': 'FR', 'hl': 'en', # language codes
  'cm': '4',              # ?
  'pc': 'yt',             # ?
  'src': '1',             # ?
  'rffu': 'true' }        # ?

As expected the redirection is not reproducible with yt-dlp stable (or yt-dl master) so it’s not possible to determine whether setting any of these parameters would avoid the problem.

Maybe try just detecting and following the redirected URL (with a loop detector, like Sheldon Cooper’s friendship algorithm)?

Run yt-dlp --update-to nightly and it should be fixed

Hello guys. Guess this one can also be used a link for testing: https://www.youtube.com/watch?v=ruvPCs4i_G4

Also getting “WARNING: [youtube] unable to extract initial player response” ./yt-dlp -vU -F “https://www.youtube.com/watch?v=ruvPCs4i_G4” [debug] Command-line config: [‘-vU’, ‘-F’, ‘https://www.youtube.com/watch?v=ruvPCs4i_G4’] [debug] Encodings: locale UTF-8, fs utf-8, pref UTF-8, out utf-8, error utf-8, screen utf-8 [debug] yt-dlp version stable@2023.07.06 [b532a3481] (zip) [debug] Python 3.11.4 (CPython arm64 64bit) - macOS-13.5-arm64-arm-64bit (OpenSSL 3.1.2 1 Aug 2023) [debug] exe versions: phantomjs 2.1.1 [debug] Optional libraries: sqlite3-2.6.0 [debug] Proxy map: {} [debug] Extractor Plugins: SamplePluginIE [debug] Post-Processor Plugins: SamplePluginPP [debug] Loaded 1934 extractors [debug] Fetching release info: https://api.github.com/repos/yt-dlp/yt-dlp/releases/latest Available version: stable@2023.07.06, Current version: stable@2023.07.06 Current Build Hash: 94c2abc8ac8b03e128067aee1a07937884068af049431620f76579612c0f8da0 yt-dlp is up to date (stable@2023.07.06) [youtube] Extracting URL: https://www.youtube.com/watch?v=ruvPCs4i_G4 [youtube] ruvPCs4i_G4: Downloading webpage WARNING: [youtube] unable to extract initial player response; please report this issue on https://github.com/yt-dlp/yt-dlp/issues?q= , filling out the appropriate issue template. Confirm you are on the latest version using yt-dlp -U [youtube] ruvPCs4i_G4: Downloading ios player API JSON [youtube] ruvPCs4i_G4: Downloading android player API JSON [youtube] ruvPCs4i_G4: Downloading iframe API JS [youtube] ruvPCs4i_G4: Downloading player 3cd2d050 [youtube] ruvPCs4i_G4: Downloading web player API JSON [youtube] ruvPCs4i_G4: Downloading m3u8 information WARNING: [youtube] unable to extract yt initial data; please report this issue on https://github.com/yt-dlp/yt-dlp/issues?q= , filling out the appropriate issue template. Confirm you are on the latest version using yt-dlp -U WARNING: [youtube] Incomplete data received in embedded initial data; re-fetching using API. [youtube] ruvPCs4i_G4: Downloading initial data 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, size, br, asr, vext, aext, hasaud, id …

If this works, this may be the way to go. The 1689897600 value in the protobuf makes me think that hard-coding it would only be useful for a limited time

Sounds very plausible, since that 1689897600 value represents a date and time value of Fri 21 Jul 2023 00:00:00 UTC (as number of seconds since epoch, 1970-01-01 UTC):

$ date --date='@1689897600' --utc
Fri 21 Jul 2023 00:00:00 UTC

Reproducible in EU. There is a new consent page that YouTube is redirecting to (A/B testing). The CONSENT cookie does not seem to be used anymore in this case (for consenting YES), rather looks to be reliant on a new cookie called SOCS?

SOCS cookie after consenting looks like this: CAISNQgDEitib3FfaWRlbnRpdHlmcm9udGVuZHVpc2VydmVyXzIwMjMwNzE4LjA3X3AyGgJlbiACGgYIgJXnpQY

which is b64 encoded protobuf:

{
    "1": 2,
    "2": {
        "1": 3,
        "2": "boq_identityfrontenduiserver_20230718.07_p2",
        "3": "en",
        "4": 2
    },
    "3": {
        "1": 1689897600
    }
}

This might be generic enough for us to hardcode, but will need to investigate some of these values.

And prior to consenting the SOCS cookie looks like:

CAAaBgiAleelBg =

{
    "1": 0,
    "3": {
        "1": 1689897600
    }
}

Edit: Alternative is to set ucbcb=1 query parameter on urls, which some other clients (e.g. NewPipe) do.

I got this error today:

yt-dlp.exe https://www.youtube.com/watch?v=yIR3NU3P_bU
[youtube] Extracting URL: https://www.youtube.com/watch?v=yIR3NU3P_bU
[youtube] yIR3NU3P_bU: Downloading webpage
WARNING: [youtube] unable to extract initial player response; please report this issue on  https://github.com/yt-dlp/yt-dlp/issues?q= , filling out the appropriate issue template. Confirm you are on the latest version using  yt-dlp -U
[youtube] yIR3NU3P_bU: Downloading ios player API JSON
[youtube] yIR3NU3P_bU: Downloading android player API JSON
[youtube] yIR3NU3P_bU: Downloading iframe API JS
[youtube] yIR3NU3P_bU: Downloading player 0a835141
[youtube] yIR3NU3P_bU: Downloading web player API JSON
[youtube] yIR3NU3P_bU: Downloading m3u8 information
WARNING: [youtube] unable to extract yt initial data; please report this issue on  https://github.com/yt-dlp/yt-dlp/issues?q= , filling out the appropriate issue template. Confirm you are on the latest version using  yt-dlp -U
WARNING: [youtube] Incomplete data received in embedded initial data; re-fetching using API.
[youtube] yIR3NU3P_bU: Downloading initial data API JSON
[info] yIR3NU3P_bU: Downloading 1 format(s): 22
[download] Destination: Car with giant bull as passenger pulled over by Nebraska police [yIR3NU3P_bU].mp4
[download] 100% of    5.18MiB in 00:00:01 at 4.81MiB/s

Using latest version:

yt-dlp.exe  -U
Available version: stable@2023.07.06, Current version: stable@2023.07.06
Current Build Hash: 5ff3e702171a50175c34397494e2d18ce35d771c2110b1e59bd173ec2fb352aa
yt-dlp is up to date (stable@2023.07.06)

can you share a verbose log?

FWIW, the video ID posted by @Atulin has no issue whatsoever 🎉 here being downloaded with the latest nightly yt-dlp_x86.exe build:

yt-dlp -v "OQ5VjYwYnfs" => 

[debug] Command-line config: ['--ffmpeg-location', '..\\FFmpeg', '--downloader-args', 'ffmpeg:-v 8 -stats', '-v', 'OQ5VjYwYnfs']
[debug] Encodings: locale cp1253, fs utf-8, pref cp1253, out utf-8 (No VT), error utf-8 (No VT), screen utf-8 (No VT)
[debug] yt-dlp version nightly@2023.08.14.182926 [876b70c8e] (win_x86_exe)
[debug] Python 3.7.9 (CPython x86 32bit) - Windows-Vista-6.0.6003-SP2 (OpenSSL 1.1.1g  21 Apr 2020)
[debug] exe versions: ffmpeg n6.1-dev-1700-N-111584-ga4e6168 (setts), ffprobe n6.1-dev-1700-N-111584-ga4e6168, phantomjs 2.1.1, rtmpdump 2.4
[debug] Optional libraries: Cryptodome-3.18.0, brotli-1.0.9, certifi-2023.07.22, mutagen-1.46.0, sqlite3-2.6.0, websockets-11.0.3
[debug] Proxy map: {}
[debug] Extractor Plugins: AGB+NSIG (YoutubeIE)
[debug] Plugin directories: ['REDACTED\\yt-dlp-plugins\\YTAgeGateBypass.zip\\yt_dlp_plugins', 'REDACTED\\yt-dlp-plugins\\YTNSigProxy.zip\\yt_dlp_plugins']
[debug] Loaded 1863 extractors
[youtube+AGB+NSIG] Extracting URL: OQ5VjYwYnfs
[youtube+AGB+NSIG] OQ5VjYwYnfs: Downloading webpage
[youtube+AGB+NSIG] OQ5VjYwYnfs: Downloading ios player API JSON
[youtube+AGB+NSIG] OQ5VjYwYnfs: Downloading android player API JSON
[debug] Loading youtube-nsig.f980f2a9 from cache
[debug] [youtube+AGB+NSIG] Decrypted nsig 8QdWbkRnhO2AIBWidj => vi9SK5NL6ew6uQ
[youtube+AGB+NSIG] OQ5VjYwYnfs: Downloading m3u8 information
[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, size, br, asr, vext, aext, hasaud, id
[debug] Default format spec: bestvideo*+bestaudio/best
[info] OQ5VjYwYnfs: Downloading 1 format(s): 303+251
[debug] Invoking http downloader on "https://rr2---sn-4vguioxu-n3bl.googlevideo.com/videoplayback?expire=1692512597&ei=9VzhZNWtDNKI6dsPyruP2Ak&ip=REDACTED&id=o-AHUki6MIthgvt3oqAghImjNC0Ti9OalpWOvdlWzqinwu&itag=303&source=youtube&requiressl=yes&mh=Hs&mm=31%2C29&mn=sn-4vguioxu-n3bl%2Csn-nv47zn7r&ms=au%2Crdu&mv=m&mvi=2&pcm2cms=yes&pl=21&initcwndbps=957500&vprv=1&svpuc=1&mime=video%2Fwebm&gir=yes&clen=152855813&dur=385.799&lmt=1659258766929508&mt=1692490623&fvip=5&keepalive=yes&fexp=24007246%2C51000023&beids=24350017&c=IOS&txp=5437434&sparams=expire%2Cei%2Cip%2Cid%2Citag%2Csource%2Crequiressl%2Cvprv%2Csvpuc%2Cmime%2Cgir%2Cclen%2Cdur%2Clmt&sig=AOq0QJ8wRgIhAMh-A3l_DPuFfhIUyac82AGLV_fKMQGxkB_cCtiP1gjBAiEApIUnPjLvJIPGy74OpG7VkvVCtgsLMQ09F37bqENQS9A%3D&lsparams=mh%2Cmm%2Cmn%2Cms%2Cmv%2Cmvi%2Cpcm2cms%2Cpl%2Cinitcwndbps&lsig=AG3C_xAwRgIhAM1BnQ5AJzsO9YDiyfhHzW1OggfuuOwRl4nsWEl4VTeNAiEAhdRj3wRC_6wpPOAUD-CSq_4PBwhBlPwUZldGOjshJVQ%3D"
[debug] File locking is not supported. Proceeding without locking
[download] Destination: IW-9 | AFK Strategy |?Arknights? [OQ5VjYwYnfs].f303.webm

[download] 100% of  145.77MiB in 00:02:01 at 1.20MiB/s
[debug] Invoking http downloader on "https://rr2---sn-4vguioxu-n3bl.googlevideo.com/videoplayback?expire=1692512597&ei=9VzhZIakIord-gbYh4mwDQ&ip=REDACTED&id=o-AAx8joELbulSdHbf6U-z8vTHbjyKe-IXAs1ev8n9rZoz&itag=251&source=youtube&requiressl=yes&mh=Hs&mm=31%2C29&mn=sn-4vguioxu-n3bl%2Csn-nv47zn7r&ms=au%2Crdu&mv=m&mvi=2&pl=21&initcwndbps=957500&spc=UWF9f-w0-cGrNiHuw1ZqbJw2J1-S89E&vprv=1&svpuc=1&mime=audio%2Fwebm&gir=yes&clen=6252179&dur=385.861&lmt=1659249211237467&mt=1692490623&fvip=5&keepalive=yes&fexp=24007246%2C24362685%2C24363392&c=ANDROID&txp=5432434&sparams=expire%2Cei%2Cip%2Cid%2Citag%2Csource%2Crequiressl%2Cspc%2Cvprv%2Csvpuc%2Cmime%2Cgir%2Cclen%2Cdur%2Clmt&sig=AOq0QJ8wRAIgVu4XZc9bw7ZoDkM1m6pzFhvMr06zGkkK7Q2N3xeDF2ACIHeHlkM77dQEtHXHwOls0pJQRz23G2qsHUfN8HklmCxY&lsparams=mh%2Cmm%2Cmn%2Cms%2Cmv%2Cmvi%2Cpl%2Cinitcwndbps&lsig=AG3C_xAwRQIhALp2p1o_Xex_1WgnTEXoq6DGuzLTgbpgLBfhEMp1-WwpAiAqiKV4mvb6KMZZtR8ftAd7chkO4Jlp8d5ACNvpfmR-WQ%3D%3D"
[download] Destination: IW-9 | AFK Strategy |?Arknights? [OQ5VjYwYnfs].f251.webm

[download] 100% of    5.96MiB in 00:00:04 at 1.22MiB/s
[Merger] Merging formats into "IW-9 | AFK Strategy |?Arknights? [OQ5VjYwYnfs].webm"
[debug] ffmpeg command line: "..\FFmpeg\ffmpeg" -y -loglevel "repeat+info" -i "file:IW-9 | AFK Strategy |?Arknights? [OQ5VjYwYnfs].f303.webm" -i "file:IW-9 | AFK Strategy |?Arknights? [OQ5VjYwYnfs].f251.webm" -c copy -map "0:v:0" -map "1:a:0" -movflags "+faststart" "file:IW-9 | AFK Strategy |?Arknights? [OQ5VjYwYnfs].temp.webm"
Deleting original file IW-9 | AFK Strategy |?Arknights? [OQ5VjYwYnfs].f303.webm (pass -k to keep)
Deleting original file IW-9 | AFK Strategy |?Arknights? [OQ5VjYwYnfs].f251.webm (pass -k to keep)

I had the same issue and updating to nightly fixed it, but now the downloads seem to be time-outing

D:\Downloads
❯ ytdlp --update-to nightly
Available version: nightly@2023.08.14.182926, Current version: stable@2023.07.06
Current Build Hash: 5ff3e702171a50175c34397494e2d18ce35d771c2110b1e59bd173ec2fb352aa
Updating to nightly@2023.08.14.182926 ...
Updated yt-dlp to nightly@2023.08.14.182926

D:\Downloads took 4s
❯ ytdlp https://youtu.be/OQ5VjYwYnfs
[youtube] Extracting URL: https://youtu.be/OQ5VjYwYnfs
[youtube] OQ5VjYwYnfs: Downloading webpage
[youtube] OQ5VjYwYnfs: Downloading ios player API JSON
[youtube] OQ5VjYwYnfs: Downloading android player API JSON
[youtube] OQ5VjYwYnfs: Downloading m3u8 information
[info] OQ5VjYwYnfs: Downloading 1 format(s): 303+251
[download] Got error: timed out. Retrying (1/10)...
[download] Got error: timed out. Retrying (2/10)...
[download] Got error: timed out. Retrying (3/10)...
[download] Got error: timed out. Retrying (4/10)...
[download] Destination: IW-9 | AFK Strategy |【Arknights】 [OQ5VjYwYnfs].f303.webm
[download] 100% of  145.77MiB in 00:01:38 at 1.48MiB/s
[download] Destination: IW-9 | AFK Strategy |【Arknights】 [OQ5VjYwYnfs].f251.webm
[download]  67.1% of    5.96MiB at   66.01MiB/s ETA 00:00[download] Got error: The read operation timed out. Retrying (1/10)...
[download] Got error: timed out. Retrying (2/10)...
[download] Got error: timed out. Retrying (3/10)...
[download] Got error: timed out. Retrying (4/10)...
[download] Got error: timed out. Retrying (5/10)...
[download] Got error: timed out. Retrying (6/10)...
[download] Got error: timed out. Retrying (7/10)...

This URL affected too: https://www.youtube.com/watch?v=l0vveyYODpQ

yt-dlp 2023.07.06

Alternative is to set ucbcb=1 query parameter on urls

This isn’t effective in yt-dl at least.

Alternative is to set ucbcb=1 query parameter on urls

If this works, this may be the way to go. The 1689897600 value in the protobuf makes me think that hard-coding it would only be useful for a limited time

We should make sure to check that this works with cookies - this parameter is apprently used by Google to bypass consent pages when cookies are blocked.

We also need to figure out what pages need this parameter. Since this may also impact tab extractor and other webpages we download from YouTube.

Alternative is to set ucbcb=1 query parameter on urls

If this works, this may be the way to go. The 1689897600 value in the protobuf makes me think that hard-coding it would only be useful for a limited time

I believe that I saw this, intermittently, with yt-dl while testing https://github.com/ytdl-org/youtube-dl/issues/32458, but assumed there was a network glitch. In some cases, extraction was sent down the age-gate path (youtube-dl/youtube_dl/extractor/youtube.py#L1880). The YT video was imZxxximci0. Now, ofc, it’s all fine. Can we put it down to a CDN bug? Or perhaps a new page structure was being trialled?

“me too” comments are SPAM. If you want to actually help, do https://github.com/yt-dlp/yt-dlp/issues/7594#issuecomment-1636870165