Zackriya-Solutions/meetily · error
FFmpeg conversion failed with exit code: {}. The file may be
Error message
FFmpeg conversion failed with exit code: {}. The file may be corrupted or in an unsupported format. What it means
ffmpeg ran and exited with a non-zero status; the code logs its stderr at error level immediately before returning this message, which deliberately hides the raw ffmpeg output from the user. Root causes live in the media itself: corrupted or truncated files, DRM-protected streams (e.g. protected AAC from stores), codecs newer than the bundled ffmpeg build, or a file that isn't actually audio. The exit code and the logged stderr line identify which.
Source
Thrown at frontend/src-tauri/src/audio/decoder.rs:362
#[allow(clippy::zombie_processes)]
let child = command
.spawn()
.map_err(|e| anyhow!("Failed to spawn ffmpeg process: {}", e))?;
let output = child
.wait_with_output()
.map_err(|e| anyhow!("Failed to wait for ffmpeg process: {}", e))?;
let stderr_text = String::from_utf8_lossy(&output.stderr);
debug!("FFmpeg stderr: {}", stderr_text);
if !output.status.success() {
error!(
"FFmpeg conversion failed (exit code: {}): {}",
output.status, stderr_text
);
return Err(anyhow!(
"FFmpeg conversion failed with exit code: {}. \
The file may be corrupted or in an unsupported format.",
output.status
));
}
// Verify output file exists and has content
let output_meta = std::fs::metadata(&temp_path)
.map_err(|e| anyhow!("FFmpeg output file not found: {}", e))?;
if output_meta.len() == 0 {
return Err(anyhow!(
"FFmpeg produced an empty output file. The input may contain no audio."
));
}
if let Some(cb) = progress_callback {
cb(100, "FFmpeg conversion complete");View on GitHub (pinned to 0281737d87)
Solutions
- Run the equivalent command manually to see the real ffmpeg error: `ffmpeg -i <input> -vn -acodec pcm_s16le out.wav`.
- If the file is DRM-protected (purchased AAC, etc.), it cannot be decoded — obtain a DRM-free copy.
- If truncated/corrupt, re-download or re-export the source file.
- Update the bundled/installed ffmpeg so newer codecs decode.
Example fix
// before
return Err(anyhow!(
"FFmpeg conversion failed with exit code: {}. \
The file may be corrupted or in an unsupported format.",
output.status
));
// after — include the actual ffmpeg stderr tail so users can self-diagnose
let stderr_tail = stderr_text.lines().rev().take(5).collect::<Vec<_>>().join("\n");
return Err(anyhow!(
"FFmpeg conversion failed (exit {}): {}",
output.status, stderr_tail
)); Defensive patterns
Strategy: try-catch
Try / catch
Err(e) if e.to_string().contains("FFmpeg conversion failed") => {
// tell the user the file itself is the problem; suggest running:
// ffmpeg -i <file> -vn -acodec pcm_s16le out.wav
} Prevention
- Verify source files play in another player before importing.
- Keep the bundled ffmpeg current so recent codecs decode.
- Include ffmpeg's stderr tail in the surfaced error message.
When it happens
Trigger: Importing a partially downloaded podcast/episode, DRM-protected purchases, a file with a mismatched container/codec, or media using a codec added after the bundled ffmpeg was built.
Common situations: Interrupted downloads, iTunes/store purchases, exotic codecs (recent Opus/AAC variants), or mislabeled files.
Related errors
- FFmpeg not found. FFmpeg is required to decode .{} files. It
- Failed to create temporary WAV file: {}
- Invalid input path (non-UTF8)
- Failed to spawn ffmpeg process: {}
- Failed to wait for ffmpeg process: {}
AI-assisted analysis of Zackriya-Solutions/meetily@0281737d87 (2026-08-16).
Data as JSON: /api/errors/a5175917862296e8.
Report an issue: GitHub.