yt-dlp: [youtube] player `fc2a56a5`: nsig extraction failed: Some formats may be missing

EDIT:

This has been fixed in the latest release! (2025.06.09)

Update!

yt-dlp -U


Checklist

  • I’m reporting that yt-dlp is broken on a supported site
  • I’ve verified that I have updated yt-dlp to nightly or master (update instructions)
  • 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, the FAQ, and the bugtracker for similar issues including closed ones. DO NOT post duplicates
  • I’ve read about sharing account credentials and I’m willing to share it if required

Region

No response

Provide a description that is worded well enough to be understood

the function _extract_n_function_name of extractor/youtube/_video.py not working with the playerId fc2a56a5

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

Sorry I don't have the output on my hand because I don't know how to force using the player, but I use the extract function code and have this output:

https://www.youtube.com/s/player/fc2a56a5/player_ias.vflset/en_US/base.js
Initial search was unable to find nsig function name
Falling back to generic n function search
Unable to extract Initial JS player n function name

About this issue

  • Original URL
  • State: closed
  • Created a year ago
  • Comments: 16 (6 by maintainers)

Commits related to this issue

Most upvoted comments

This is now fixed in the master branch.

If you’re using one of the single-file yt-dlp executables, run:

yt-dlp --update-to master

Or else see https://github.com/yt-dlp/yt-dlp/wiki/Installation#pip-master

Thanks for the report; I understand about not being able to reproduce this to get a proper verbose log.

If anyone else can reliably reproduce this, please share verbose output.

Looks like a regex fix is needed

Using --cookies-from-browser may allow you to frequently reproduce the issue, but it’s not the cause of the issue. This player will eventually be rolled out to everyone, and you’ll start seeing it without cookies. The new player’s javascript code breaks our regex search for the nsig function name.

I can reproduce this issue. Here is the output of --verbose:

[debug] Command-line config: ['https://www.youtube.com/watch?v=OIuG1bBkfs0', '--verbose']
[debug] Home config "yt-dlp.conf": ['-N4', '--progress', '--embed-chapters', '--embed-metadata', '--embed-subs', '--embed-thumbnail', '--abort-on-error', '--color', 'always', '--continue', '--output', '~/Videos/YTDLP/%(channel)s/%(title)s.%(ext)s', '--format', 'bestvideo*[height<=1080][vcodec!*=av01]+bestaudio/best[height<=1080][vcodec!*=av01]', '--cookies-from-browser', 'firefox']
[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@2025.05.22 from yt-dlp/yt-dlp [7977b329e]
[debug] Python 3.13.3 (CPython x86_64 64bit) - Linux-6.14.7-arch2-1-x86_64-with-glibc2.41 (OpenSSL 3.5.0 8 Apr 2025, glibc 2.41)
[debug] exe versions: ffmpeg 7.1.1 (setts), ffprobe 7.1.1, rtmpdump 2.4
[debug] Optional libraries: certifi-2025.04.26, mutagen-1.47.0, requests-2.32.3, secretstorage-3.3.3, sqlite3-3.50.0, urllib3-2.4.0
[debug] Proxy map: {}
Extracting cookies from firefox
[debug] Extracting cookies from: "/home/ruttie/.mozilla/firefox/3ucgsdum.default-release/cookies.sqlite"
Extracted 106 cookies from firefox
[debug] Request Handlers: urllib, requests
[debug] Plugin directories: none
[debug] Loaded 1859 extractors
[debug] [youtube] Found YouTube account cookies
[debug] [youtube] [pot] PO Token Providers: none
[debug] [youtube] [pot] PO Token Cache Providers: memory
[debug] [youtube] [pot] PO Token Cache Spec Providers: webpo
[youtube] Extracting URL: https://www.youtube.com/watch?v=OIuG1bBkfs0
[youtube] OIuG1bBkfs0: Downloading webpage
[youtube] OIuG1bBkfs0: Downloading tv client config
[debug] Loading youtube-sts.fc2a56a5-main from cache
[youtube] OIuG1bBkfs0: Downloading tv player API JSON
[youtube] OIuG1bBkfs0: Downloading player fc2a56a5-main
[debug] [youtube] Initial search was unable to find nsig function name
        player = https://www.youtube.com/s/player/fc2a56a5/player_ias.vflset/en_US/base.js
WARNING: [youtube] Falling back to generic n function search
         player = https://www.youtube.com/s/player/fc2a56a5/player_ias.vflset/en_US/base.js
WARNING: [youtube] OIuG1bBkfs0: nsig extraction failed: Some formats may be missing
         n = YXaJW1yBYDS06TX ; player = https://www.youtube.com/s/player/fc2a56a5/player_ias.vflset/en_US/base.js
         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
[debug] [youtube] Unable to extract nsig function code (caused by RegexNotFoundError('Unable to extract \x1b[0;94mInitial JS player n function name\x1b[0m; 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')); 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] OIuG1bBkfs0: nsig extraction failed: Some formats may be missing
         n = _-6V8cYBz2VnfuA ; player = https://www.youtube.com/s/player/fc2a56a5/player_ias.vflset/en_US/base.js
         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] OIuG1bBkfs0: nsig extraction failed: Some formats may be missing
         n = U3vpz1Lzvf7K1vF ; player = https://www.youtube.com/s/player/fc2a56a5/player_ias.vflset/en_US/base.js
         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] OIuG1bBkfs0: Some web client https formats have been skipped as they are missing a url. YouTube is forcing SABR streaming for this client. See  https://github.com/yt-dlp/yt-dlp/issues/12482  for more details
[info] OIuG1bBkfs0: Downloading subtitles: en
WARNING: Only images are available for download. use --list-formats to see them
[debug] Sort order given by extractor: quality, res, fps, hdr:12, source, vcodec, channels, acodec, lang, proto
[debug] Formats sorted by: hasvid, ie_pref, quality, res, fps, hdr:12(7), source, vcodec, channels, acodec, lang, proto, size, br, asr, vext, aext, hasaud, id
ERROR: [youtube] OIuG1bBkfs0: Requested format is not available. Use --list-formats for a list of available formats
Traceback (most recent call last):
  File "/usr/lib/python3.13/site-packages/yt_dlp/YoutubeDL.py", line 1662, in wrapper
    return func(self, *args, **kwargs)
  File "/usr/lib/python3.13/site-packages/yt_dlp/YoutubeDL.py", line 1818, in __extract_info
    return self.process_ie_result(ie_result, download, extra_info)
           ~~~~~~~~~~~~~~~~~~~~~~^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/lib/python3.13/site-packages/yt_dlp/YoutubeDL.py", line 1877, in process_ie_result
    ie_result = self.process_video_result(ie_result, download=download)
  File "/usr/lib/python3.13/site-packages/yt_dlp/YoutubeDL.py", line 3011, in process_video_result
    raise ExtractorError(
        'Requested format is not available. Use --list-formats for a list of available formats',
        expected=True, video_id=info_dict['id'], ie=info_dict['extractor'])
yt_dlp.utils.ExtractorError: [youtube] OIuG1bBkfs0: Requested format is not available. Use --list-formats for a list of available formats

The issue appears to happen with all videos I tried. Example video used here: https://www.youtube.com/watch?v=OIuG1bBkfs0 Version is latest:

Latest version: stable@2025.05.22 from yt-dlp/yt-dlp
yt-dlp is up to date (stable@2025.05.22 from yt-dlp/yt-dlp)

I am on linux.

Edit: Using no parameters fixes the issue, I’m going to try adding and removing parameters to figure out the one that breaks it.

For anyone on macOS using Homebrew, this is what I had to do:

brew unlink yt-dlp brew install --HEAD yt-dlp