tonhowtf/omniget · error
{}
Error message
{} What it means
When the cutting ffmpeg process starts but exits non-zero, cut_one surfaces the entire trimmed stderr as the error message (formatted with anyhow!("{}")). This carries ffmpeg's own diagnostic output for why the cut/encode failed — e.g. bad filter arguments, unreadable input, or unsupported codec.
Solutions
- Read the surfaced stderr message to find ffmpeg's specific complaint.
- Re-run the same ffmpeg command manually to reproduce and debug flags.
- Verify the output directory is writable and has free disk space.
- Ensure the input file is complete and its codecs are supported by the installed ffmpeg.
Example fix
// before
cut_silences(&opts, input).await?;
// after
match cut_silences(&opts, input).await {
Ok(item) => item,
Err(e) => { eprintln!("ffmpeg stderr: {e}"); return Err(e); }
} Defensive patterns
Strategy: try-catch
Validate before calling
// Rust anyhow::ensure!(input_path.exists(), "entrada inexistente"); anyhow::ensure!(out_dir_writable(), "saida nao gravavel");
Type guard
null
Try / catch
match run(&opts, input).await {
Err(e) => {
// a mensagem e o stderr bruto do ffmpeg: registre para diagnostico
log::error!("ffmpeg: {e}");
return Err(e);
}
Ok(item) => Ok(item),
} Prevention
- Always capture and log the raw ffmpeg stderr surfaced in this error
- Reproduce failing ffmpeg commands manually to debug flags
- Check output directory writability and free disk space before cutting
- Test with the exact ffmpeg build shipped to users
When it happens
Trigger: cut_one's final ffmpeg command fails at runtime: invalid silence-cut filter expression, unreadable/corrupt input file, unsupported output codec/container combination, or disk full during encoding.
Common situations: Malformed timestamps from detection; output path not writable; exotic input codecs the local ffmpeg build can't decode; extremely large files hitting resource limits.
Related errors
AI-assisted analysis of tonhowtf/omniget@8600b91f42 (2026-09-12).
Data as JSON: /api/errors/fe7cd743b01f6f4f.
Report an issue: GitHub.
Appendix: source
Thrown at src-tauri/omniget-core/src/core/tools/silence_cut.rs:296
"-map",
"[outa]",
"-c:v",
"libx264",
"-preset",
"veryfast",
"-crf",
"20",
"-c:a",
"aac",
"-movflags",
"+faststart",
])
.arg(&output)
.output()
.await
.map_err(|e| anyhow!("ffmpeg nao iniciou: {}", e))?;
if !out.status.success() {
return Err(anyhow!("{}", String::from_utf8_lossy(&out.stderr).trim()));
}
item.output = Some(output.to_string_lossy().to_string());
Ok(item)
}
pub async fn run(
opts: SilenceOptions,
progress: super::ProgressFn,
) -> anyhow::Result<SilenceResult> {
let ffmpeg = crate::core::dependencies::ensure_ffmpeg().await?;
let total = opts.inputs.len() as u64;
let mut items = Vec::new();
for (i, input) in opts.inputs.iter().enumerate() {
super::report(
&progress,
"video-silence",
"progress",
i as u64,View on GitHub (pinned to 8600b91f42)