{"record":{"id":"6b0f5301963fe2dd","repo":"tonhowtf/omniget","slug":"ffmpeg-installed-but-failed-to-execute-exit-code","errorCode":null,"errorMessage":"FFmpeg installed but failed to execute (exit code {})","messagePattern":"FFmpeg installed but failed to execute \\(exit code (.+?)\\)","errorType":"validation","errorClass":"anyhow::Error","httpStatus":null,"severity":"error","filePath":"src-tauri/omniget-core/src/core/dependencies.rs","lineNumber":524,"sourceCode":"        return Err(anyhow!(\"FFmpeg binary not found after extraction\"));\n    }\n\n    let verify = {\n        let target = ffmpeg_target.clone();\n        tokio::task::spawn_blocking(move || {\n            crate::core::process::std_command(&target)\n                .arg(\"-version\")\n                .stdout(Stdio::null())\n                .stderr(Stdio::null())\n                .status()\n        })\n        .await\n        .map_err(|e| anyhow!(\"spawn_blocking failed: {}\", e))?\n    };\n    match verify {\n        Ok(s) if s.success() => {}\n        Ok(s) => {\n            return Err(anyhow!(\n                \"FFmpeg installed but failed to execute (exit code {})\",\n                s\n            ))\n        }\n        Err(e) => return Err(anyhow!(\"FFmpeg installed but failed to execute: {}\", e)),\n    }\n\n    tracing::info!(\"FFmpeg installed to {}\", ffmpeg_target.display());\n    Ok(ffmpeg_target)\n}\n\nenum ArchiveType {\n    Zip,\n    TarXz,\n}\n\nfn ffmpeg_download_urls() -> Vec<(&'static str, ArchiveType)> {\n    if cfg!(target_os = \"windows\") {","sourceCodeStart":506,"sourceCodeEnd":542,"githubUrl":"https://github.com/tonhowtf/omniget/blob/8600b91f4246848bac346874daa9e61c1fc5677a/src-tauri/omniget-core/src/core/dependencies.rs#L506-L542","documentation":"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.","triggerScenarios":"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.","commonSituations":"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.).","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"],"exampleFix":null,"handlingStrategy":"validation","validationCode":"let st = std::process::Command::new(&ffmpeg_path).arg(\"-version\").status()?;\nif !st.success() {\n    eprintln!(\"ffmpeg unusable on this system (exit {:?})\", st.code());\n}","typeGuard":null,"tryCatchPattern":"match download_ffmpeg().await {\n    Ok(p) => ...,\n    Err(e) if e.to_string().contains(\"failed to execute\") => {\n        eprintln!(\"install a distro ffmpeg or pick the matching build\");\n    }\n    Err(e) => ...,\n}","preventionTips":["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"],"tags":["ffmpeg","process","platform","verification"],"backgroundTag":"command-not-found","analyzedSha":"8600b91f4246848bac346874daa9e61c1fc5677a","analyzedAt":"2026-09-12T14:29:19.317Z","contentChangedAt":"2026-09-12T14:29:19.317Z","schemaVersion":2},"datasetVersion":"2026-09-15T23:17:13.987Z"}