{"record":{"id":"04568682cfabda76","repo":"tonhowtf/omniget","slug":"requested-format-is-not-available-the-download-will-retry","errorCode":null,"errorMessage":"Requested format is not available. The download will retry with a compatible format.","messagePattern":"Requested format is not available\\. The download will retry with a compatible format\\.","errorType":"exception","errorClass":null,"httpStatus":null,"severity":"warning","filePath":"src-tauri/omniget-core/src/core/ytdlp.rs","lineNumber":4463,"sourceCode":"    }\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\") {\n        return anyhow!(\"This video is private.\");\n    }\n    if lower.contains(\"copyright\") {\n        return anyhow!(\"Video blocked due to copyright.\");\n    }\n    if lower.contains(\"geo\") && lower.contains(\"block\") {\n        return anyhow!(\"Video restricted in your region.\");\n    }\n    if lower.contains(\"timed out\") || lower.contains(\"timeout\") {\n        return anyhow!(\"Connection timed out. Check your internet and try again.\");\n    }","sourceCodeStart":4445,"sourceCodeEnd":4481,"githubUrl":"https://github.com/tonhowtf/omniget/blob/8600b91f4246848bac346874daa9e61c1fc5677a/src-tauri/omniget-core/src/core/ytdlp.rs#L4445-L4481","documentation":"translate_ytdlp_error at ytdlp.rs:4463 maps stderr containing both 'requested format' and 'not available' to this message. yt-dlp could not satisfy the -f format selector because none of the video's available streams match it. The library throws it with a note that the download will retry with a compatible format.","triggerScenarios":"yt-dlp stderr reports 'ERROR: Requested format is not available' — the format selector (e.g. 'bestvideo+bestaudio', a specific format id or height like 1080p) matched no stream offered for this video.","commonSituations":"Requesting 1080p from a video only uploaded at 720p; format ids shifted after a site change; client-based format filters (e.g. android/ios clients) returning different format lists; stale metadata after a partially failed extraction.","solutions":["Let the pipeline retry with a fallback/compatible format selector.","Loosen the format selector (e.g. use 'best' or 'bestvideo*+bestaudio/best' with height caps like '[height<=720]').","Update yt-dlp so format extraction reflects the site's current stream list.","Check the video's actual available resolutions and pick an existing one."],"exampleFix":"// before: rigid selector fails on a 720p-only video\nlet args = [\"-f\", \"bestvideo[height=1080]+bestaudio\", url];\n\n// after: capped, with a generic fallback\nlet args = [\"-f\", \"bestvideo[height<=1080]+bestaudio/best\", url];","handlingStrategy":"fallback","validationCode":"// Probe available formats and pick one that exists before downloading\nconst formats = await listFormats(url);\nconst pick = formats.find(f => f.height <= 1080) ?? formats[0];\nconst selector = pick ? `${pick.format_id}` : 'best';","typeGuard":null,"tryCatchPattern":"try {\n  await download(url, '-f bestvideo[height<=1080]+bestaudio/best');\n} catch (e) {\n  if (isFormatUnavailable(e)) await download(url, '-f best'); // fallback selector\n  else throw e;\n}","preventionTips":["Always include a generic '/best' fallback in format selectors","Cap heights (e.g. [height<=1080]) instead of pinning exact resolutions","Probe formats first for videos known to have limited quality options"],"tags":["ytdlp","format-selection","fallback"],"backgroundTag":"invalid-argument-value","analyzedSha":"8600b91f4246848bac346874daa9e61c1fc5677a","analyzedAt":"2026-09-12T14:29:19.317Z","contentChangedAt":"2026-09-12T14:29:19.317Z","schemaVersion":2},"datasetVersion":"2026-09-23T08:17:48.524Z"}