tonhowtf/omniget · error
ffmpeg nao iniciou
Error message
ffmpeg nao iniciou: {} What it means
run_ffmpeg spawns the ffmpeg binary with .output().await and maps a spawn failure to 'ffmpeg nao iniciou: <e>'. This is not an ffmpeg encoding error — it means the process could not be started at all (binary missing, not executable, or spawn syscall failed). Non-zero exits are handled separately via friendly_ffmpeg.
Solutions
- Run ensure_ffmpeg() (as run() does) and confirm it succeeds before invoking ffmpeg directly
- Verify with `ffmpeg -version` that the binary is installed and executable
- Reinstall or re-download the ffmpeg dependency if the cached binary was deleted
- Check PATH and the resolved dependency path for the current environment
Example fix
// before let ffmpeg = "/usr/local/bin/ffmpeg"; // may not exist // after let ffmpeg = ensure_ffmpeg().await?; // resolves/installs and validates the binary
Defensive patterns
Strategy: fallback
Validate before calling
async fn ffmpeg_ready() -> bool {
ensure_ffmpeg().await.is_ok()
} Try / catch
match burn::run(&opts, &progress).await {
Err(e) if e.to_string().starts_with("ffmpeg nao iniciou") => {
ensure_ffmpeg().await?; // reinstall/resolve then retry once
burn::run(&opts, &progress).await
}
other => other,
} Prevention
- Always call ensure_ffmpeg() at startup and fail fast if unavailable
- Verify `ffmpeg -version` works in CI/deployment images
- Don't hard-code ffmpeg paths; use the dependency resolver
When it happens
Trigger: ensure_ffmpeg resolved a path that no longer exists; ffmpeg is not installed / not on PATH; the binary lacks the executable bit; OS-level spawn failure (resource limits, invalid UTF-8 args).
Common situations: Fresh container/machine without ffmpeg; dependency cache deleted between runs; downloading ffmpeg failed earlier and ensure_ffmpeg returned a stale path.
Related errors
- Failed to start ffmpeg
- ffmpeg
- yt-dlp not found — install it in Settings
- yt-dlp not found
- yt-dlp not found
AI-assisted analysis of tonhowtf/omniget@8600b91f42 (2026-09-12).
Data as JSON: /api/errors/5cdf8b59cfae607f.
Report an issue: GitHub.
Appendix: source
Thrown at src-tauri/src/platforms/bilibili/danmaku/burn.rs:372
tail: &[String],
) -> Result<()> {
let mut cmd = omniget_core::core::process::command(ffmpeg);
cmd.args(["-y", "-hide_banner", "-loglevel", "error"])
.args(cut)
.arg("-i")
.arg(input)
.args(["-vf", filters])
.args(common);
if let Some((n, log)) = pass {
cmd.args(["-pass", &n.to_string()])
.arg("-passlogfile")
.arg(log);
}
let out = cmd
.args(tail)
.output()
.await
.map_err(|e| anyhow!("ffmpeg nao iniciou: {}", e))?;
if !out.status.success() {
let stderr = String::from_utf8_lossy(&out.stderr);
return Err(anyhow!("{}", friendly_ffmpeg(stderr.trim())));
}
Ok(())
}
/// O erro cru do libass não diz nada para quem não conhece FFmpeg.
fn friendly_ffmpeg(stderr: &str) -> String {
if stderr.contains("fontselect") || stderr.contains("Glyph") {
return format!(
"a fonte do ASS não está instalada — aponte a pasta de fontes. ({})",
stderr
);
}
if stderr.is_empty() {
return "o ffmpeg falhou sem dizer por quê".to_string();
}View on GitHub (pinned to 8600b91f42)