{"record":{"id":"d34b09007c25c1f6","repo":"Zackriya-Solutions/meetily","slug":"ffmpeg-not-found-ffmpeg-is-required-to-decode","errorCode":null,"errorMessage":"FFmpeg not found. FFmpeg is required to decode .{} files. It will be downloaded automatically on next launch, or install it manually.","messagePattern":"FFmpeg not found\\. FFmpeg is required to decode \\.(.+?) files\\. It will be downloaded automatically on next launch, or install it manually\\.","errorType":"exception","errorClass":null,"httpStatus":null,"severity":"error","filePath":"frontend/src-tauri/src/audio/decoder.rs","lineNumber":281,"sourceCode":"\n/// Check if a file extension requires ffmpeg pre-conversion\nfn needs_ffmpeg_conversion(path: &Path) -> bool {\n    path.extension()\n        .and_then(|e| e.to_str())\n        .map(|ext| FFMPEG_ONLY_EXTENSIONS.contains(&ext.to_lowercase().as_str()))\n        .unwrap_or(false)\n}\n\n/// Convert an audio file to WAV using ffmpeg for formats Symphonia can't decode.\n///\n/// Returns a `TempPath` that auto-deletes the temporary WAV file when dropped.\n/// The caller must keep the `TempPath` alive until decoding of the WAV is complete.\nfn convert_to_wav_with_ffmpeg(\n    input_path: &Path,\n    progress_callback: Option<&ProgressCallback>,\n) -> Result<tempfile::TempPath> {\n    let ffmpeg_path = find_ffmpeg_path().ok_or_else(|| {\n        anyhow!(\n            \"FFmpeg not found. FFmpeg is required to decode .{} files. \\\n             It will be downloaded automatically on next launch, or install it manually.\",\n            input_path\n                .extension()\n                .and_then(|e| e.to_str())\n                .unwrap_or(\"this format\")\n        )\n    })?;\n\n    // Create temp file in the same directory as the input to avoid cross-device issues\n    let parent_dir = input_path.parent().unwrap_or_else(|| Path::new(\".\"));\n    let temp_file = tempfile::Builder::new()\n        .prefix(\".meetily_decode_\")\n        .suffix(\".wav\")\n        .tempfile_in(parent_dir)\n        .map_err(|e| anyhow!(\"Failed to create temporary WAV file: {}\", e))?;\n\n    let temp_path = temp_file.into_temp_path();","sourceCodeStart":263,"sourceCodeEnd":299,"githubUrl":"https://github.com/Zackriya-Solutions/meetily/blob/0281737d87d26352fb0adc78c8c0975f691b23d1/frontend/src-tauri/src/audio/decoder.rs#L263-L299","documentation":"convert_to_wav_with_ffmpeg is the fallback decoder for formats Symphonia cannot decode natively; it first resolves an ffmpeg executable via find_ffmpeg_path, which checks (in order) a binary bundled next to the app executable, PATH, $HOME/.local/bin on macOS, the current working directory, and the macOS app-bundle Resources folder. This error means none of those locations had ffmpeg when such a file was imported. The message itself tells you the app's auto-downloader will fetch ffmpeg on the next launch.","triggerScenarios":"Importing a file whose extension routes to the ffmpeg path (non-Symphonia-decodable format) while ffmpeg is absent: fresh install before the auto-download has run, ffmpeg installed in a shell whose PATH the GUI app doesn't inherit, or a portable/DMG copy without the bundled binary.","commonSituations":"First import after install, ffmpeg installed via Homebrew but app launched from Finder with a minimal PATH, Linux AppImage/portable deployments, or the auto-download having failed on a previous launch.","solutions":["Install ffmpeg into PATH: `brew install ffmpeg` (macOS), `apt install ffmpeg` (Linux), `winget install ffmpeg` (Windows), then restart the app.","Or simply relaunch the app — the built-in downloader fetches ffmpeg on next launch, per the message.","For portable installs, place the ffmpeg binary next to the app executable (that is search priority 1).","Verify with `which ffmpeg`/`where ffmpeg` and check the debug log lines ('Found bundled ffmpeg', 'ffmpeg not found in PATH') to see which locations were tried."],"exampleFix":"// before\nlet temp_path = convert_to_wav_with_ffmpeg(path, progress_callback.as_ref())?;\n\n// after — check availability first with an actionable message\nif crate::audio::ffmpeg::find_ffmpeg_path().is_none() {\n    return Err(anyhow!(\n        \"FFmpeg is not installed. Install it with `brew install ffmpeg` / `apt install ffmpeg`, or restart the app to auto-download it, then re-import this file.\"\n    ));\n}\nlet temp_path = convert_to_wav_with_ffmpeg(path, progress_callback.as_ref())?;","handlingStrategy":"validation","validationCode":"// Rust, before the import decode\nif requires_ffmpeg(path) && crate::audio::ffmpeg::find_ffmpeg_path().is_none() {\n    return Err(anyhow!(\"FFmpeg is missing. Install it (`brew/apt/winget install ffmpeg`) or restart the app to auto-download, then re-import.\"));\n}","typeGuard":null,"tryCatchPattern":"match decode_audio_file(&path, None) {\n    Err(e) if e.to_string().contains(\"FFmpeg not found\") => {\n        // show install instructions plus a 'relaunch to auto-download' action in the UI\n    }\n    other => other,\n}","preventionTips":["Trigger the ffmpeg auto-download on first launch, before any import can happen.","Bundle ffmpeg with installers — next to the executable is search priority 1.","Log which search locations failed to shorten support loops."],"tags":["ffmpeg","audio-decode","missing-dependency"],"backgroundTag":"external-binary-not-found","analyzedSha":"0281737d87d26352fb0adc78c8c0975f691b23d1","analyzedAt":"2026-08-16T20:57:52.567Z","schemaVersion":2},"datasetVersion":"2026-08-16T23:17:17.608Z"}