tonhowtf/omniget · error

Video restricted in your region.

Error message

Video restricted in your region.

What it means

translate_ytdlp_error at ytdlp.rs:4477 maps stderr containing both 'geo' and 'block' to this message. The host serves a geographic restriction error — the video is licensed only for specific countries and the current exit IP is outside them. The library throws it to distinguish geo-blocks from removals or privacy blocks.

Solutions

  1. Route the request through a network/proxy located in a supported region, if you have legitimate access.
  2. Import cookies from an account in a permitted region (some platforms honor account region).
  3. Confirm the video truly is region-locked by checking its availability in a browser.
  4. Check for a region-free mirror or official alternative source.

Example fix

// before: direct request from an unsupported region
run_ytdlp(&["-f", "best", geo_locked_url])?;

// after: use a region-appropriate proxy
run_ytdlp(&["--proxy", "http://proxy-in-supported-region:8080", "-f", "best", geo_locked_url])?;
Defensive patterns

Strategy: fallback

Validate before calling

// Detect geo-block notices before starting the download
const html = await (await fetch(url)).text();
if (/not available in your (country|region)|geo-?block/i.test(html)) throw new Error('Geo-blocked: route via a supported region first.');

Try / catch

try {
  await download(url);
} catch (e) {
  if (isGeoBlocked(e)) await downloadViaProxy(url, supportedRegionProxy); // fallback route
  else throw e;
}

Prevention

When it happens

Trigger: yt-dlp stderr contains 'geo' together with 'block' — e.g. 'This video is not available in your country' / 'geo-blocked' / 'geo-restricted' responses during extraction.

Common situations: Downloading broadcaster/iPlayer-style region-locked content from another continent; YouTube music videos licensed per-territory; running on a datacenter/VPN IP registered in an unsupported country.

Understand the failure class

Background: Permission denied / not authorized / 403 Forbidden: access-control rejections when the caller lacks the required role, grant, or ownership — this error's family across 18 libraries.

Related errors


AI-assisted analysis of tonhowtf/omniget@8600b91f42 (2026-09-12). Data as JSON: /api/errors/ca0c768ed86d208a. Report an issue: GitHub.

Appendix: source

Thrown at src-tauri/omniget-core/src/core/ytdlp.rs:4477

            "yt-dlp extractor is broken for this site. Update yt-dlp in Settings → Dependencies, then retry."
        );
    }
    if lower.contains("requested format") && lower.contains("not available") {
        return anyhow!(
            "Requested format is not available. The download will retry with a compatible format."
        );
    }
    if lower.contains("video unavailable") || lower.contains("not available") {
        return anyhow!("Video unavailable or removed.");
    }
    if lower.contains("private video") {
        return anyhow!("This video is private.");
    }
    if lower.contains("copyright") {
        return anyhow!("Video blocked due to copyright.");
    }
    if lower.contains("geo") && lower.contains("block") {
        return anyhow!("Video restricted in your region.");
    }
    if lower.contains("timed out") || lower.contains("timeout") {
        return anyhow!("Connection timed out. Check your internet and try again.");
    }
    if lower.contains("ffmpeg") && (lower.contains("not found") || lower.contains("no such file")) {
        return anyhow!("FFmpeg not found. Install FFmpeg to download this format.");
    }
    if lower.contains("unsupported url") || lower.contains("no suitable infojson") {
        return anyhow!("Unsupported URL. Check that the link is correct.");
    }
    if lower.contains("unable to download") && lower.contains("webpage") {
        return anyhow!("Failed to access the page. Check the link and your connection.");
    }
    if lower.contains("is not a valid url") || lower.contains("no video formats") {
        return anyhow!("No video formats found for this link.");
    }

    let last_error_line = stderr

View on GitHub (pinned to 8600b91f42)