tonhowtf/omniget · error
yt-dlp unavailable
Error message
yt-dlp unavailable: {} What it means
GenericYtdlpPlatform::get_media_info requires the yt-dlp binary for non-direct-media URLs. It calls ytdlp::ensure_ytdlp() (which may download yt-dlp); if that fails for any reason — no network, blocked download URL, missing system dependencies — the error is wrapped as 'yt-dlp unavailable: {e}'.
Solutions
- Read the wrapped cause (the {e} payload) to distinguish install failure from discovery failure.
- Install yt-dlp manually and put it on PATH so ensure_ytdlp finds it without downloading.
- Fix network/proxy access to the yt-dlp release host, or vendor the binary and point config at it.
- Ensure the binary has the executable bit (chmod +x) if it was downloaded manually.
Example fix
// before
let ytdlp_path = ytdlp::ensure_ytdlp().await?; // may fail with 'yt-dlp unavailable: ...'
// after
let ytdlp_path = match ytdlp::ensure_ytdlp().await {
Ok(p) => p,
Err(e) => {
eprintln!("yt-dlp bootstrap failed: {e}; falling back to PATH lookup");
ytdlp::find_ytdlp_cached().await.ok_or_else(|| e)?
}
}; Defensive patterns
Strategy: try-catch
Validate before calling
// preflight
let ready = ytdlp::find_ytdlp_cached().await.is_some()
|| std::env::var("PATH").map(|p| p.contains("yt-dlp")).unwrap_or(false);
if !ready {
eprintln!("yt-dlp missing; will attempt auto-install (needs network)");
} Try / catch
match platform.get_media_info(url).await {
Err(e) if e.to_string().starts_with("yt-dlp unavailable") => {
eprintln!("bootstrap failed: {e}; check network/exec permissions, then retry");
Err(anyhow!("yt-dlp could not be provisioned: {e:#}"))
}
other => other,
} Prevention
- Pre-install yt-dlp in the deployment image so ensure_ytdlp never needs to download.
- Whitelist the yt-dlp release host in firewalls/proxies used by CI.
- Ensure downloaded binaries keep the executable bit in your packaging pipeline.
- Persist the cached binary in a writable directory across restarts.
When it happens
Trigger: get_media_info(url) where is_direct_media_url(url) is None and ytdlp::ensure_ytdlp() returns Err (binary absent AND auto-install failed, or the discovery itself errored).
Common situations: Air-gapped/offline environments where ensure_ytdlp can't download the binary; firewalls/proxies blocking downloads from GitHub releases; missing execute permission on the downloaded binary; unsupported platform/arch for prebuilt yt-dlp.
Understand the failure class
Background: "not installed", "pip install", "required for": how missing-dependency errors surface across open-source libraries — this error's family across 34 libraries.
Related errors
- o yt-dlp não está disponível
- yt-dlp not found
- Failed to run ffmpeg
- Failed to run ffprobe
- o ONNX Runtime ainda não está instalado. Instale pela tela…
AI-assisted analysis of tonhowtf/omniget@8600b91f42 (2026-09-12).
Data as JSON: /api/errors/c808a1c7b9851479.
Report an issue: GitHub.
Appendix: source
Thrown at src-tauri/omniget-core/src/platforms/generic_ytdlp.rs:250
"generic"
}
fn can_handle(&self, url: &str) -> bool {
if let Ok(parsed) = url::Url::parse(url) {
let scheme = parsed.scheme();
return scheme == "http" || scheme == "https";
}
false
}
async fn get_media_info(&self, url: &str) -> anyhow::Result<MediaInfo> {
if let Some(media_type) = is_direct_media_url(url) {
return Ok(build_direct_media_info(url, media_type));
}
let ytdlp_path = ytdlp::ensure_ytdlp()
.await
.map_err(|e| anyhow!("yt-dlp unavailable: {}", e))?;
let extra = platform_extra_flags(url);
let json = ytdlp::get_video_info(&ytdlp_path, url, &extra).await?;
Self::parse_video_info(&json)
}
async fn download(
&self,
info: &MediaInfo,
opts: &DownloadOptions,
progress: mpsc::Sender<ProgressUpdate>,
) -> anyhow::Result<DownloadResult> {
let _ = progress.send(ProgressUpdate::percent(0.0)).await;
let first = info
.available_qualities
.first()
.ok_or_else(|| anyhow!("No quality available"))?;View on GitHub (pinned to 8600b91f42)