tonhowtf/omniget · error
ffmpeg nao iniciou
Error message
ffmpeg nao iniciou: {} What it means
Wraps the io::Error from spawning the ffmpeg process in restore_one's shake-detection pass (video_restore.rs:174). The library throws it when tokio's Command::output() cannot even launch ffmpeg — before any decode work happens. It is a process-spawn failure, not an ffmpeg decoding failure (that path produces the separate 'detecção de tremor' error).
Solutions
- Install ffmpeg or ensure the binary is on PATH (verify with `ffmpeg -version` in the same environment the app runs in).
- If ffmpeg lives outside PATH, configure the explicit binary path used to build the `ffmpeg` command variable.
- Check exec permissions (`chmod +x $(which ffmpeg)`) and reinstall if the binary is corrupted.
- Log the wrapped io::Error (`{e}`) — its kind (NotFound/PermissionDenied) tells which of the above applies.
Example fix
// before: relies on PATH
let out = crate::core::process::command(ffmpeg).args(["-y", ...]).output().await;
// after: resolve explicitly and fail fast with a clear message
let ffmpeg = which::which("ffmpeg").context("ffmpeg não encontrado no PATH; instale ffmpeg")?;
let out = crate::core::process::command(ffmpeg).args(["-y", ...]).output().await?; Defensive patterns
Strategy: fallback
Validate before calling
if which::which("ffmpeg").is_err() {
return Err(anyhow!("ffmpeg não está no PATH; instale ffmpeg antes de restaurar vídeos"));
} Try / catch
match restore_one(input).await {
Err(e) if e.to_string().contains("ffmpeg nao iniciou") => eprintln!("instale/verifique o ffmpeg: {e}"),
Err(e) => return Err(e),
Ok(item) => item,
} Prevention
- Bake ffmpeg into deployment images and verify it at app startup, not at first use
- Resolve an absolute ffmpeg path once per job instead of trusting PATH per invocation
- Run `ffmpeg -version` as a startup health check in GUI/container environments where PATH differs
When it happens
Trigger: Calling restore_one/run on a video whose first pass runs `ffmpeg -vf <detect> -an -f null -` and the ffmpeg binary cannot be spawned: binary absent from PATH, path misconfigured, or the OS fails exec (permissions, missing interpreter).
Common situations: ffmpeg not installed in the deployment container or CI image; PATH stripped in the Tauri GUI environment so a terminal-visible ffmpeg is not found; a broken ffmpeg shim on PATH with a bad shebang; no exec permission after a partial install.
Related errors
- o ffmpeg não iniciou
- Failed to run ffmpeg
- nao foi possivel iniciar o aria2c
- ffmpeg nao iniciou
- ffmpeg nao iniciou
AI-assisted analysis of tonhowtf/omniget@8600b91f42 (2026-09-12).
Data as JSON: /api/errors/1bafc48cfa6d647f.
Report an issue: GitHub.
Appendix: source
Thrown at src-tauri/omniget-core/src/core/tools/video_restore.rs:174
let output = out_dir.join(format!("{}{}.mp4", stem, suffix));
let mut trf: Option<PathBuf> = None;
if opts.stabilize {
let dir = std::env::temp_dir().join(format!("omniget-vidstab-{}", uuid::Uuid::new_v4()));
std::fs::create_dir_all(&dir)?;
let file = dir.join("transforms.trf");
let detect = format!(
"{}:result='{}'",
detect_filter(opts.shakiness),
file.to_string_lossy().replace('\\', "/")
);
let out = crate::core::process::command(ffmpeg)
.args(["-y", "-hide_banner", "-loglevel", "error", "-i"])
.arg(inp)
.args(["-vf", &detect, "-an", "-f", "null", "-"])
.output()
.await
.map_err(|e| anyhow!("ffmpeg nao iniciou: {}", e))?;
if !out.status.success() {
let _ = std::fs::remove_dir_all(&dir);
return Err(anyhow!(
"detecção de tremor: {}",
String::from_utf8_lossy(&out.stderr).trim()
));
}
trf = Some(file);
}
let mut chain_parts: Vec<String> = Vec::new();
if let Some(file) = trf.as_ref() {
chain_parts.push(format!(
"vidstabtransform=input='{}':{}",
file.to_string_lossy().replace('\\', "/"),
transform_filter(opts.smoothing).trim_start_matches("vidstabtransform=")
));
}View on GitHub (pinned to 8600b91f42)