{"record":{"id":"6dd33544481c1a5e","repo":"tonhowtf/omniget","slug":"video-extraction-failed-update-yt-dlp-or-try-again","errorCode":null,"errorMessage":"Video extraction failed. Update yt-dlp or try again.","messagePattern":"Video extraction failed\\. Update yt-dlp or try again\\.","errorType":"exception","errorClass":null,"httpStatus":null,"severity":"error","filePath":"src-tauri/omniget-core/src/core/ytdlp.rs","lineNumber":4452,"sourceCode":"    if lower.contains(\"sign in to confirm\")\n        || lower.contains(\"login required\")\n        || stderr.contains(\"请先登录\")\n        || stderr.contains(\"需要登录\")\n        || stderr.contains(\"登录后可\")\n        || stderr.contains(\"仅登录用户\")\n        || lower.contains(\"this video is only available\") && lower.contains(\"members\")\n    {\n        return anyhow!(\n            \"This video requires login. Import cookies for this site in Settings → Cookies, then retry.\"\n        );\n    }\n    if lower.contains(\"invalid data found when processing input\") {\n        return anyhow!(\n            \"Downloaded streams are DRM-protected and cannot be merged. This content is not supported.\"\n        );\n    }\n    if lower.contains(\"nsig extraction failed\") || lower.contains(\"nsig\") {\n        return anyhow!(\"Video extraction failed. Update yt-dlp or try again.\");\n    }\n    if lower.contains(\"cannot parse data\")\n        || lower.contains(\"please report this issue\")\n        || (lower.contains(\"confirm you are on the latest version\") && lower.contains(\"yt-dlp\"))\n    {\n        return anyhow!(\n            \"yt-dlp extractor is broken for this site. Update yt-dlp in Settings → Dependencies, then retry.\"\n        );\n    }\n    if lower.contains(\"requested format\") && lower.contains(\"not available\") {\n        return anyhow!(\n            \"Requested format is not available. The download will retry with a compatible format.\"\n        );\n    }\n    if lower.contains(\"video unavailable\") || lower.contains(\"not available\") {\n        return anyhow!(\"Video unavailable or removed.\");\n    }\n    if lower.contains(\"private video\") {","sourceCodeStart":4434,"sourceCodeEnd":4470,"githubUrl":"https://github.com/tonhowtf/omniget/blob/8600b91f4246848bac346874daa9e61c1fc5677a/src-tauri/omniget-core/src/core/ytdlp.rs#L4434-L4470","documentation":"translate_ytdlp_error at ytdlp.rs:4452 maps stderr containing 'nsig extraction failed' (or the substring 'nsig') to this message. yt-dlp failed to solve the site's 'n-signature' throttling challenge, so it cannot generate working stream URLs. This almost always means the installed yt-dlp is outdated relative to the site's current obfuscation.","triggerScenarios":"yt-dlp stderr includes 'nsig extraction failed' or 'nsig' during YouTube extraction — the JavaScript n-parameter deobfuscation player code changed and the local yt-dlp build can't solve it.","commonSituations":"YouTube shipped a new player JS revision; the bundled/packaged yt-dlp is weeks old; downloads fail or fall back to throttled/broken URLs right after a site-side update.","solutions":["Update yt-dlp (Settings → Dependencies) to the latest release.","Retry the download after the update.","If the latest yt-dlp still fails, report/wait upstream — the extractor fix usually lands within days.","As a stopgap, retry later since the challenge may resolve with a player-code refresh."],"exampleFix":"// before: stale pinned binary fails on new nsig scheme\n// yt-dlp 2024.01.16 -> 'nsig extraction failed'\n\n// after: keep yt-dlp self-updating\n// run: yt-dlp -U (or reinstall via package manager)\nlet out = run_ytdlp(&[\"-U\"])?; // then retry extraction","handlingStrategy":"retry","validationCode":"// Check yt-dlp version freshness before long download sessions\nconst { stdout } = await exec('yt-dlp --version');\nconst ageDays = daysSince(ytdlpReleaseDate(stdout.trim()));\nif (ageDays > 30) await exec('yt-dlp -U');","typeGuard":null,"tryCatchPattern":"try {\n  await download(url);\n} catch (e) {\n  if (isNsigFailure(e)) {\n    await exec('yt-dlp -U');   // update, then retry once\n    await download(url);\n  } else throw e;\n}","preventionTips":["Auto-update yt-dlp on app start or weekly","Never pin ancient yt-dlp versions in shipped builds","Retry with backoff right after site-side player updates"],"tags":["ytdlp","extraction","outdated-dependency","youtube"],"backgroundTag":"upstream-api-error","analyzedSha":"8600b91f4246848bac346874daa9e61c1fc5677a","analyzedAt":"2026-09-12T14:29:19.317Z","contentChangedAt":"2026-09-12T14:29:19.317Z","schemaVersion":2},"datasetVersion":"2026-09-15T23:17:13.987Z"}