tonhowtf/omniget · error
YouTube requires yt-dlp. Failed to get yt-dlp
Error message
YouTube requires yt-dlp. Failed to get yt-dlp: {} What it means
The YouTube platform implementation depends on the external yt-dlp binary. get_media_info calls ytdlp::ensure_ytdlp(), which is supposed to locate or download yt-dlp; when that fails (binary missing and auto-install failed), the platform cannot proceed and wraps the underlying error in this message.
Solutions
- Install yt-dlp manually (pip install yt-dlp, or download from GitHub releases) and ensure it is on PATH.
- Check network access and any proxy/firewall blocking the yt-dlp download host used by ensure_ytdlp.
- Verify the yt-dlp binary is executable (chmod +x) and matches the platform architecture.
- Upgrade to a recent yt-dlp version — YouTube frequently breaks older extractors.
- Inspect the underlying error in the message body ('Failed to get yt-dlp: {}') for the actual cause.
Example fix
// before
let info = youtube.get_media_info(url).await?; // fails: no yt-dlp
// after
if which::which("yt-dlp").is_err() {
println!("installing yt-dlp first...");
}
let info = youtube.get_media_info(url).await?; Defensive patterns
Strategy: fallback
Validate before calling
// Rust
if which::which("yt-dlp").is_err() {
eprintln!("yt-dlp not found on PATH; ensure_ytdlp will attempt install");
} Prevention
- Install yt-dlp as part of environment setup (pip install yt-dlp or package manager)
- Pin and regularly update yt-dlp — YouTube breaks old extractors frequently
- Verify network/proxy access to the host ensure_ytdlp downloads from
- Confirm the binary is executable and arch-matched after auto-install
When it happens
Trigger: Calling get_media_info (or download, which shares the path) on any YouTube URL while ensure_ytdlp fails: no yt-dlp on PATH, download/install of yt-dlp failed (no network, blocked host, write-protected install dir), or the binary is present but not executable.
Common situations: Fresh machine or container without yt-dlp installed; sandboxed/offline environment where ensure_ytdlp cannot download; corrupted or outdated yt-dlp that YouTube rejects; antivirus or permissions blocking the downloaded binary.
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
- o yt-dlp não está disponível
- yt-dlp falhou
- não achei nenhum vídeo nessa URL (Watch Later precisa da…
AI-assisted analysis of tonhowtf/omniget@8600b91f42 (2026-09-12).
Data as JSON: /api/errors/5b4de78daf7ba2b8.
Report an issue: GitHub.
Appendix: source
Thrown at src-tauri/omniget-core/src/platforms/youtube.rs:273
fn can_handle(&self, url: &str) -> bool {
if let Ok(parsed) = url::Url::parse(url) {
if let Some(host) = parsed.host_str() {
let host = host.to_lowercase();
return host == "youtube.com"
|| host.ends_with(".youtube.com")
|| host == "youtu.be"
|| host == "youtube-nocookie.com"
|| host.ends_with(".youtube-nocookie.com");
}
}
false
}
async fn get_media_info(&self, url: &str) -> anyhow::Result<MediaInfo> {
let ytdlp_path = ytdlp::ensure_ytdlp()
.await
.map_err(|e| anyhow!("YouTube requires yt-dlp. Failed to get yt-dlp: {}", e))?;
Self::fetch_with_ytdlp(url, &ytdlp_path).await
}
async fn download(
&self,
info: &MediaInfo,
opts: &DownloadOptions,
progress: mpsc::Sender<ProgressUpdate>,
) -> anyhow::Result<DownloadResult> {
let _ = progress.send(ProgressUpdate::percent(0.0)).await;
let ytdlp_path = if let Some(ref p) = opts.ytdlp_path {
p.clone()
} else {
ytdlp::ensure_ytdlp().await?
};
View on GitHub (pinned to 8600b91f42)