{"record":{"id":"a7409d283bf15fb0","repo":"tonhowtf/omniget","slug":"ffmpeg-nao-iniciou-switch-album","errorCode":null,"errorMessage":"ffmpeg nao iniciou: {}","messagePattern":"ffmpeg nao iniciou: (.+?)","errorType":"exception","errorClass":null,"httpStatus":null,"severity":"error","filePath":"src-tauri/omniget-core/src/core/tools/games/switch_album.rs","lineNumber":249,"sourceCode":"        .arg(input)\n        .args([\n            \"-c:v\",\n            \"libvpx-vp9\",\n            \"-crf\",\n            \"34\",\n            \"-b:v\",\n            \"0\",\n            \"-row-mt\",\n            \"1\",\n            \"-c:a\",\n            \"libopus\",\n            \"-b:a\",\n            \"96k\",\n        ])\n        .arg(&output)\n        .output()\n        .await\n        .map_err(|e| anyhow::anyhow!(\"ffmpeg nao iniciou: {}\", e))?;\n    if !out.status.success() {\n        anyhow::bail!(\"{}\", String::from_utf8_lossy(&out.stderr).trim());\n    }\n    Ok(output)\n}\n\npub async fn run(opts: SwitchOptions, progress: ProgressFn) -> anyhow::Result<SwitchResult> {\n    let source = PathBuf::from(opts.source.trim());\n    if !source.is_dir() {\n        anyhow::bail!(\"pasta de origem não encontrada: {}\", source.display());\n    }\n    let dest_root = PathBuf::from(opts.dest.trim());\n    if opts.dest.trim().is_empty() {\n        anyhow::bail!(\"escolha a pasta da biblioteca de destino\");\n    }\n    let move_it = opts.mode == \"move\";\n\n    report(&progress, ID, \"progress\", 0, None, None);","sourceCodeStart":231,"sourceCodeEnd":267,"githubUrl":"https://github.com/tonhowtf/omniget/blob/8600b91f4246848bac346874daa9e61c1fc5677a/src-tauri/omniget-core/src/core/tools/games/switch_album.rs#L231-L267","documentation":"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.","triggerScenarios":"The ffmpeg .output() call returns Err: ffmpeg not on PATH, permission denied on the binary, or process could not be created.","commonSituations":"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).","solutions":["Install ffmpeg and ensure `ffmpeg -version` works in a terminal","Add ffmpeg's directory to PATH (or to wherever crate::core::process::command resolves binaries)","If installed, check the OS error: 'Permission denied'/'Access denied' means unblock/chmod the binary"],"exampleFix":null,"handlingStrategy":"fallback","validationCode":"// verify ffmpeg availability before transcoding\nlet ok = tokio::process::Command::new(\"ffmpeg\")\n    .arg(\"-version\").output().await.map(|o| o.status.success()).unwrap_or(false);\nif !ok { return Err(anyhow!(\"ffmpeg nao disponivel\")); }","typeGuard":null,"tryCatchPattern":"match to_webm(&input, &dir).await {\n    Ok(out) => out,\n    Err(e) if e.to_string().contains(\"ffmpeg nao iniciou\") => {\n        // keep original file or prompt user to install ffmpeg\n        anyhow::bail!(\"instale o ffmpeg para converter videos: {e}\")\n    }\n    other => other,\n}","preventionTips":["Probe `ffmpeg -version` at startup and gate video features on it","Ship ffmpeg alongside the app or use a full PATH in GUI context","Keep the original file if conversion fails so nothing is lost"],"tags":["ffmpeg","missing-dependency","video-transcode"],"backgroundTag":"missing-dependency","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"}