{"record":{"id":"195369ed5abfa6d9","repo":"ytdl-org/youtube-dl","slug":"cannot-find-player-id","errorCode":null,"errorMessage":"Cannot find player ID","messagePattern":"Cannot find player ID","errorType":"exception","errorClass":"ExtractorError","httpStatus":null,"severity":"error","filePath":"youtube_dl/extractor/brightcove.py","lineNumber":194,"sourceCode":"        else:\n            flashvars = {}\n\n        data_url = object_doc.attrib.get('data', '')\n        data_url_params = compat_parse_qs(compat_urllib_parse_urlparse(data_url).query)\n\n        def find_param(name):\n            if name in flashvars:\n                return flashvars[name]\n            node = find_xpath_attr(object_doc, './param', 'name', name)\n            if node is not None:\n                return node.attrib['value']\n            return data_url_params.get(name)\n\n        params = {}\n\n        playerID = find_param('playerID') or find_param('playerId')\n        if playerID is None:\n            raise ExtractorError('Cannot find player ID')\n        params['playerID'] = playerID\n\n        playerKey = find_param('playerKey')\n        # Not all pages define this value\n        if playerKey is not None:\n            params['playerKey'] = playerKey\n        # These fields hold the id of the video\n        videoPlayer = find_param('@videoPlayer') or find_param('videoId') or find_param('videoID') or find_param('@videoList')\n        if videoPlayer is not None:\n            if isinstance(videoPlayer, list):\n                videoPlayer = videoPlayer[0]\n            videoPlayer = videoPlayer.strip()\n            # UUID is also possible for videoPlayer (e.g.\n            # http://www.popcornflix.com/hoodies-vs-hooligans/7f2d2b87-bbf2-4623-acfb-ea942b4f01dd\n            # or http://www8.hp.com/cn/zh/home.html)\n            if not (re.match(\n                    r'^(?:\\d+|[\\da-fA-F]{8}-?[\\da-fA-F]{4}-?[\\da-fA-F]{4}-?[\\da-fA-F]{4}-?[\\da-fA-F]{12})$',\n                    videoPlayer) or videoPlayer.startswith('ref:')):","sourceCodeStart":176,"sourceCodeEnd":212,"githubUrl":"https://github.com/ytdl-org/youtube-dl/blob/956b8c585591b401a543e409accb163eeaaa1193/youtube_dl/extractor/brightcove.py#L176-L212","documentation":"Thrown by the legacy Brightcove (BrightcoveLegacyIE) extractor when it cannot find a 'playerID' in the embedded Flash player markup. The extractor looks the value up in three places (flashvars, <param name=\"playerID\"> nodes via XPath, and query parameters of the data URL); if all return None it raises this ExtractorError. It almost always means the page no longer contains a legacy Brightcove player that youtube-dl knows how to drive.","triggerScenarios":"Extracting a page whose <object class=\"BrightcoveExperience\"> embed lacks playerID/playerId in flashvars, lacks a <param name=\"playerID\"> node, and whose data@ URL query has no playerID parameter; or a page that has replaced the legacy player with the new players.brightcove.net iframe, which this code path does not handle.","commonSituations":"Sites migrated from the old Brightcove Experience player to Brightcove New (players.brightcove.net) — extremely common because Adobe Flash was retired. Also pages where the embed is injected dynamically by JavaScript after initial HTML load, so the param/flashvars never appear in the downloaded source.","solutions":["Get the direct new-player URL from the page (e.g. via browser devtools: https://players.brightcove.net/<account>/<player>_default/index.html?videoId=<id>) and pass that to youtube-dl instead of the embed page.","Update to a maintained fork (yt-dlp) whose BrightcoveLegacy extractor and generic embed detection handle modern pages.","If you control the calling code, catch ExtractorError from this URL and fall back to searching the raw page HTML for 'players.brightcove.net' links yourself.","Check the page in a browser: if the video is served by any other platform now, extract with that platform's URL."],"exampleFix":"# before\nyoutube_dl.extract('http://example.com/page_with_old_brightcove_embed')\n\n# after\n# find the real player URL in the page/source:\nyoutube_dl.extract('https://players.brightcove.net/1234567890/abcdef_default/index.html?videoId=987654321')","handlingStrategy":"try-catch","validationCode":"# Pre-check: does the page contain a legacy Brightcove player at all?\nimport re\nhtml = fetch(url)\nif not re.search(r'class=\"BrightcoveExperience\"|bcove\\.com', html):\n    raise Skip('no legacy brightcove embed; use players.brightcove.net URL')\nif not re.search(r'playerID|playerId', html):\n    raise Skip('embed has no playerID')","typeGuard":null,"tryCatchPattern":"from youtube_dl.utils import ExtractorError\ntry:\n    ydl.extract_info(url)\nexcept ExtractorError as e:\n    if 'Cannot find player ID' in str(e):\n        # page no longer uses the legacy player; find new-style URL yourself\n        m = re.search(r'https?://players\\.brightcove\\.net/[^\"\\']+', html)\n        if m:\n            ydl.extract_info(m.group(0))\n        else:\n            raise","preventionTips":["Prefer direct players.brightcove.net URLs over third-party embed pages.","Detect the legacy <object class=\"BrightcoveExperience\"> markup before invoking extraction.","Pin a maintained fork (yt-dlp) when targeting Brightcove-hosted sites."],"tags":["brightcove","extractor","legacy-flash","missing-parameter"],"backgroundTag":null,"analyzedSha":"956b8c585591b401a543e409accb163eeaaa1193","analyzedAt":"2026-08-14T18:59:47.863Z","schemaVersion":2},"datasetVersion":"2026-08-15T17:31:12.345Z"}