tonhowtf/omniget · error

ffmpeg nao iniciou

Error message

ffmpeg nao iniciou: {}

What it means

to_webm() runs ffmpeg to transcode a Switch album clip; if ffmpeg fails to start at all (spawn/exec error, surfaced via .output()), the OS error is wrapped in this message. A non-zero ffmpeg exit is handled separately with stderr.

Solutions

  1. Install ffmpeg and ensure `ffmpeg -version` works in a terminal
  2. Add ffmpeg's directory to PATH (or to wherever crate::core::process::command resolves binaries)
  3. If installed, check the OS error: 'Permission denied'/'Access denied' means unblock/chmod the binary
Defensive patterns

Strategy: fallback

Validate before calling

// verify ffmpeg availability before transcoding
let ok = tokio::process::Command::new("ffmpeg")
    .arg("-version").output().await.map(|o| o.status.success()).unwrap_or(false);
if !ok { return Err(anyhow!("ffmpeg nao disponivel")); }

Try / catch

match to_webm(&input, &dir).await {
    Ok(out) => out,
    Err(e) if e.to_string().contains("ffmpeg nao iniciou") => {
        // keep original file or prompt user to install ffmpeg
        anyhow::bail!("instale o ffmpeg para converter videos: {e}")
    }
    other => other,
}

Prevention

When it happens

Trigger: The ffmpeg .output() call returns Err: ffmpeg not on PATH, permission denied on the binary, or process could not be created.

Common situations: ffmpeg not installed on the user's machine; ffmpeg present but blocked by antivirus; broken PATH in the app's environment (GUI apps often have a minimal PATH).

Understand the failure class

Background: "not installed", "pip install", "required for": how missing-dependency errors surface across open-source libraries — this error's family across 34 libraries.

Related errors


AI-assisted analysis of tonhowtf/omniget@8600b91f42 (2026-09-12). Data as JSON: /api/errors/a7409d283bf15fb0. Report an issue: GitHub.

Appendix: source

Thrown at src-tauri/omniget-core/src/core/tools/games/switch_album.rs:249

        .arg(input)
        .args([
            "-c:v",
            "libvpx-vp9",
            "-crf",
            "34",
            "-b:v",
            "0",
            "-row-mt",
            "1",
            "-c:a",
            "libopus",
            "-b:a",
            "96k",
        ])
        .arg(&output)
        .output()
        .await
        .map_err(|e| anyhow::anyhow!("ffmpeg nao iniciou: {}", e))?;
    if !out.status.success() {
        anyhow::bail!("{}", String::from_utf8_lossy(&out.stderr).trim());
    }
    Ok(output)
}

pub async fn run(opts: SwitchOptions, progress: ProgressFn) -> anyhow::Result<SwitchResult> {
    let source = PathBuf::from(opts.source.trim());
    if !source.is_dir() {
        anyhow::bail!("pasta de origem não encontrada: {}", source.display());
    }
    let dest_root = PathBuf::from(opts.dest.trim());
    if opts.dest.trim().is_empty() {
        anyhow::bail!("escolha a pasta da biblioteca de destino");
    }
    let move_it = opts.mode == "move";

    report(&progress, ID, "progress", 0, None, None);

View on GitHub (pinned to 8600b91f42)