tonhowtf/omniget · critical
ffmpeg nao iniciou
Error message
ffmpeg nao iniciou: {} What it means
In convert_one's single-pass branch (direct libwebp_anim/GIF output), spawning ffmpeg failed: cmd.output() returned an io error wrapped as 'ffmpeg nao iniciou: {}'. The converter could not start the ffmpeg process at all.
Solutions
- Confirm ffmpeg exists and runs at the configured path (`<ffmpeg> -version`); install or bundle it.
- Use an absolute path to the ffmpeg binary instead of relying on PATH lookup.
- Fix file permissions (chmod +x) and check that security software is not blocking process creation.
Example fix
// before
let ffmpeg = "ffmpeg";
// after
let ffmpeg = which::which("ffmpeg").context("ffmpeg not found on PATH; install it or set ffmpeg_path")?; Defensive patterns
Strategy: validation
Validate before calling
fn ensure_ffmpeg(path: &Path) -> anyhow::Result<()> {
anyhow::ensure!(path.is_file(), "ffmpeg nao encontrado: {}", path.display());
#[cfg(unix)]
anyhow::ensure!(std::fs::metadata(path)?.permissions().mode() & 0o111 != 0, "ffmpeg sem permissão de execução");
Ok(())
} Type guard
fn spawnable(p: &Path) -> bool { p.is_file() } Try / catch
if let Err(e) = convert_one(...).await {
if e.to_string().contains("nao iniciou") {
eprintln!("instale/bundle o ffmpeg: {e}");
} else { return Err(e); }
} Prevention
- Ship ffmpeg as a sidecar and resolve the absolute path at startup.
- Health-check `ffmpeg -version` before offering conversion features.
- Keep execute bits intact when copying binaries into app bundles.
When it happens
Trigger: GIF/WebP conversion invoked when the ffmpeg binary path is wrong, the binary is missing or non-executable, or PATH resolution fails in the packaged app environment.
Common situations: ffmpeg not installed on the machine; app bundle missing the sidecar binary; wrong custom ffmpeg path in settings; execute permission stripped after copying the binary; Windows PATH not propagated to the spawned process.
Related errors
AI-assisted analysis of tonhowtf/omniget@8600b91f42 (2026-09-12).
Data as JSON: /api/errors/76806809e6d5350c.
Report an issue: GitHub.
Appendix: source
Thrown at src-tauri/omniget-core/src/core/tools/video_gif.rs:147
opts.suffix,
output_ext(&opts.format)
));
let chain = vf_chain(opts.fps, opts.width);
let cut = cut_args(opts.start, opts.duration);
if output_ext(&opts.format) == "webp" {
let out = crate::core::process::command(ffmpeg)
.args(["-y", "-hide_banner", "-loglevel", "error"])
.args(&cut)
.arg("-i")
.arg(inp)
.args(["-vf", &chain, "-c:v", "libwebp_anim", "-lossless", "0"])
.args(["-q:v", &opts.quality.clamp(1, 100).to_string()])
.args(["-loop", "0", "-an"])
.arg(&output)
.output()
.await
.map_err(|e| anyhow!("ffmpeg nao iniciou: {}", e))?;
if !out.status.success() {
return Err(anyhow!("{}", String::from_utf8_lossy(&out.stderr).trim()));
}
} else {
let tmp =
std::env::temp_dir().join(format!("omniget-palette-{}.png", uuid::Uuid::new_v4()));
let pass1 = crate::core::process::command(ffmpeg)
.args(["-y", "-hide_banner", "-loglevel", "error"])
.args(&cut)
.arg("-i")
.arg(inp)
.args([
"-vf",
&format!(
"{},palettegen=max_colors={}:stats_mode=diff",
chain,
opts.max_colors.clamp(4, 256)
),View on GitHub (pinned to 8600b91f42)