tonhowtf/omniget · critical · anyhow::Error
FFmpeg not found in Flatpak sandbox
Error message
FFmpeg not found in Flatpak sandbox
What it means
ensure_ffmpeg first tries find_tool("ffmpeg") and, inside a Flatpak sandbox, cannot fall back to downloading a private copy — so if no ffmpeg is discoverable in the sandbox it fails with this error. It signals that the Flatpak runtime's ffmpeg (or its ffmpeg-full extension) is missing.
Solutions
- Install the Flatpak ffmpeg extension: flatpak install flathub org.freedesktop.Platform.ffmpeg-full//<version> (match your runtime version).
- Run flatpak update so the runtime and extensions are current, then restart the app.
- Check the installed runtime: flatpak info <app> and confirm the matching ffmpeg-full branch is present.
- As a last resort, ship/bundle ffmpeg with the app or switch to a build that includes it.
Defensive patterns
Strategy: fallback
Validate before calling
// Before calling ensure_ffmpeg, probe availability
if dependencies::find_tool("ffmpeg").await.is_none() && dependencies::is_flatpak() {
eprintln!("Install the runtime ffmpeg extension: flatpak install flathub org.freedesktop.Platform.ffmpeg-full");
} Try / catch
match ensure_ffmpeg().await {
Ok(p) => p,
Err(e) if format!("{e}").contains("Flatpak sandbox") => {
eprintln!("ffmpeg missing; install org.freedesktop.Platform.ffmpeg-full and restart");
return Err(e);
}
Err(e) => return Err(e),
} Prevention
- Declare/depend on org.freedesktop.Platform.ffmpeg-full in the Flatpak manifest so it installs with the app.
- Probe ffmpeg availability at app startup and guide the user to the extension install command.
- Keep find_tool()'s search paths in sync with Flatpak runtime locations.
When it happens
Trigger: ensure_ffmpeg() called in a Flatpak environment where find_tool("ffmpeg") returns None: the freedesktop runtime's org.freedesktop.Platform.ffmpeg-full extension is not installed, or PATH/lookup locations don't include any ffmpeg.
Common situations: Flatpak installed with a base runtime lacking the ffmpeg-full extension; minimal runtime variant; user stripped extensions to save space.
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
- FFmpeg is provided by the Flatpak runtime and cannot be…
- Failed to run ffmpeg
- ffmpeg not available
- ffmpeg
- ffmpeg nao iniciou
AI-assisted analysis of tonhowtf/omniget@8600b91f42 (2026-09-12).
Data as JSON: /api/errors/85df47ecfb542dbd.
Report an issue: GitHub.
Appendix: source
Thrown at src-tauri/omniget-core/src/core/dependencies.rs:392
pub async fn ensure_ffmpeg() -> anyhow::Result<PathBuf> {
// Always ensure the managed binary exists — the standalone yt-dlp.exe
// cannot discover system FFmpeg from PATH.
if !is_flatpak() {
let managed = managed_bin_dir().map(|d| d.join(bin_name("ffmpeg")));
if managed.as_ref().map_or(true, |p| !p.exists()) {
if let Ok(path) = download_ffmpeg().await {
crate::core::ytdlp::reset_ffmpeg_location_cache();
return Ok(path);
}
}
}
if let Some(path) = find_tool("ffmpeg").await {
return Ok(path);
}
if is_flatpak() {
return Err(anyhow!("FFmpeg not found in Flatpak sandbox"));
}
let path = download_ffmpeg().await?;
crate::core::ytdlp::reset_ffmpeg_location_cache();
Ok(path)
}
async fn download_ffmpeg() -> anyhow::Result<PathBuf> {
let bin_dir = managed_bin_dir().ok_or_else(|| anyhow!("Could not determine data directory"))?;
std::fs::create_dir_all(&bin_dir)?;
let ffmpeg_name = bin_name("ffmpeg");
let ffprobe_name = bin_name("ffprobe");
let ffmpeg_target = bin_dir.join(&ffmpeg_name);
let downloads = ffmpeg_download_urls();
let client = crate::core::http_client::apply_global_proxy(reqwest::Client::builder())
.timeout(std::time::Duration::from_secs(300))View on GitHub (pinned to 8600b91f42)