tonhowtf/omniget · error · anyhow::Error
FFmpeg installed but failed to execute
Error message
FFmpeg installed but failed to execute (exit code {}) What it means
After installation, download_ffmpeg() executes `ffmpeg -version` to verify the binary works. If the process runs but exits with a non-zero status, this error reports the exit code — the binary exists but is not usable on this system.
Solutions
- Run the installed binary manually from a terminal to see the real error (e.g. missing .so files)
- Install the missing shared libraries reported by ldd/otool
- Download the archive variant matching the CPU architecture and OS
- On macOS, clear quarantine attributes (xattr -d com.apple.quarantine) or re-sign
- Re-run ensure_ffmpeg to replace a possibly corrupted binary
Defensive patterns
Strategy: validation
Validate before calling
let st = std::process::Command::new(&ffmpeg_path).arg("-version").status()?;
if !st.success() {
eprintln!("ffmpeg unusable on this system (exit {:?})", st.code());
} Try / catch
match download_ffmpeg().await {
Ok(p) => ...,
Err(e) if e.to_string().contains("failed to execute") => {
eprintln!("install a distro ffmpeg or pick the matching build");
}
Err(e) => ...,
} Prevention
- Download builds matching the host arch and libc (musl vs glibc)
- Fall back to a system-installed ffmpeg when verification fails
- Run ldd/otool checks on the extracted binary in CI
- Document required system libraries for the bundled build
When it happens
Trigger: The extracted ffmpeg binary launches but terminates non-zero: missing shared libraries on Linux, corrupted/incomplete binary, wrong architecture (x86 binary on ARM), or macOS codesigning/quarantine issues.
Common situations: Downloading a glibc-incompatible Linux build; wrong-arch archive for the platform; partially written binary that survived the size check; missing system libraries (libxcb etc.).
Related errors
AI-assisted analysis of tonhowtf/omniget@8600b91f42 (2026-09-12).
Data as JSON: /api/errors/6b0f5301963fe2dd.
Report an issue: GitHub.
Appendix: source
Thrown at src-tauri/omniget-core/src/core/dependencies.rs:524
return Err(anyhow!("FFmpeg binary not found after extraction"));
}
let verify = {
let target = ffmpeg_target.clone();
tokio::task::spawn_blocking(move || {
crate::core::process::std_command(&target)
.arg("-version")
.stdout(Stdio::null())
.stderr(Stdio::null())
.status()
})
.await
.map_err(|e| anyhow!("spawn_blocking failed: {}", e))?
};
match verify {
Ok(s) if s.success() => {}
Ok(s) => {
return Err(anyhow!(
"FFmpeg installed but failed to execute (exit code {})",
s
))
}
Err(e) => return Err(anyhow!("FFmpeg installed but failed to execute: {}", e)),
}
tracing::info!("FFmpeg installed to {}", ffmpeg_target.display());
Ok(ffmpeg_target)
}
enum ArchiveType {
Zip,
TarXz,
}
fn ffmpeg_download_urls() -> Vec<(&'static str, ArchiveType)> {
if cfg!(target_os = "windows") {View on GitHub (pinned to 8600b91f42)