{"record":{"id":"3ab287ad1f8cc041","repo":"tonhowtf/omniget","slug":"no-video-formats-found-for-this-link","errorCode":null,"errorMessage":"No video formats found for this link.","messagePattern":"No video formats found for this link\\.","errorType":"exception","errorClass":null,"httpStatus":null,"severity":"error","filePath":"src-tauri/omniget-core/src/core/ytdlp.rs","lineNumber":4492,"sourceCode":"        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    }\n    if lower.contains(\"ffmpeg\") && (lower.contains(\"not found\") || lower.contains(\"no such file\")) {\n        return anyhow!(\"FFmpeg not found. Install FFmpeg to download this format.\");\n    }\n    if lower.contains(\"unsupported url\") || lower.contains(\"no suitable infojson\") {\n        return anyhow!(\"Unsupported URL. Check that the link is correct.\");\n    }\n    if lower.contains(\"unable to download\") && lower.contains(\"webpage\") {\n        return anyhow!(\"Failed to access the page. Check the link and your connection.\");\n    }\n    if lower.contains(\"is not a valid url\") || lower.contains(\"no video formats\") {\n        return anyhow!(\"No video formats found for this link.\");\n    }\n\n    let last_error_line = stderr\n        .lines()\n        .rev()\n        .find(|l| {\n            let t = l.trim().to_lowercase();\n            t.starts_with(\"error:\") || t.starts_with(\"error \")\n        })\n        .unwrap_or(\"\")\n        .trim();\n\n    let msg = if !last_error_line.is_empty() {\n        last_error_line\n            .strip_prefix(\"ERROR: \")\n            .or_else(|| last_error_line.strip_prefix(\"ERROR:\"))\n            .or_else(|| last_error_line.strip_prefix(\"error: \"))\n            .unwrap_or(last_error_line)","sourceCodeStart":4474,"sourceCodeEnd":4510,"githubUrl":"https://github.com/tonhowtf/omniget/blob/8600b91f4246848bac346874daa9e61c1fc5677a/src-tauri/omniget-core/src/core/ytdlp.rs#L4474-L4510","documentation":"Raised when yt-dlp reports 'is not a valid url' or 'no video formats': either the input is malformed as a URL, or the page parsed fine but yielded no playable formats (removed/private/DRM video). The wrapper maps both to a 'no formats' message.","triggerScenarios":"Passing a non-URL string or a URL with no scheme to the extractor; or a video exists but exposes zero downloadable formats (private/deleted/age/DRM-restricted).","commonSituations":"Users pasting search-result page URLs, region-locked videos that hide formats, removed livestream VODs, or DRM-protected content yt-dlp cannot parse.","solutions":["Confirm the URL is well-formed and points to an actual video page","Check the video is public and not region/age-restricted in a browser","Update yt-dlp, as extractor fixes often restore format extraction","Try `yt-dlp -F <url>` to list formats and confirm availability"],"exampleFix":"// before\nif !url.starts_with(\"http\") { /* unvalidated input passed down */ }\n// after\nif lower.contains(\"is not a valid url\") || lower.contains(\"no video formats\") {\n    return anyhow!(\"No video formats found for this link.\");\n}","handlingStrategy":"validation","validationCode":"// require a well-formed http(s) URL before extraction\nlet parsed = url::Url::parse(input)?;\nif parsed.scheme() != \"http\" && parsed.scheme() != \"https\" {\n    return Err(anyhow!(\"Not a valid media URL\"));\n}","typeGuard":null,"tryCatchPattern":"match result {\n    Err(e) if e.to_string().contains(\"No video formats\") => {\n        eprintln!(\"Video may be private, removed, or region-locked\");\n    }\n    other => other?,\n}","preventionTips":["Validate URL format and scheme up front","Check video availability in a browser before automating","Handle age/region-restricted content explicitly","Keep yt-dlp updated for extractor fixes"],"tags":["url","validation","yt-dlp","no-formats"],"backgroundTag":"invalid-url-format","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"}