tonhowtf/omniget · error
detecção de tremor
Error message
detecção de tremor: {} What it means
Raised in restore_one after the ffmpeg shake-detection pass exits with a non-zero status (video_restore.rs:177). ffmpeg DID start; it failed while running the vidstab detect filter (`-vf <detect> -an -f null -`). The message embeds ffmpeg's trimmed stderr, which carries the actual decode/filter error. The temp work dir is removed before returning.
Solutions
- Read the stderr text after 'detecção de tremor:' — it names the exact ffmpeg failure (decode error, unknown filter, bad option).
- Verify the input plays with `ffprobe <input>`; re-download or repair the source file if it is corrupt.
- Confirm the installed ffmpeg includes the vidstab filters (`ffmpeg -filters | grep vidstab`); upgrade or install an ffmpeg built with libvidstab.
- Retry the restore; transient I/O errors on the source file can also cause a non-zero exit.
Defensive patterns
Strategy: validation
Validate before calling
let probe = crate::core::process::command("ffprobe")
.args(["-v", "error", "-selectStreams", "v:0", "-show_entries", "stream=codec_name", "-of", "csv=p=0", inp])
.output()
.await?;
if !probe.status.success() {
return Err(anyhow!("arquivo de vídeo ilegível: {}", String::from_utf8_lossy(&probe.stderr)));
} Try / catch
match restore_one(input).await {
Err(e) if e.to_string().starts_with("detecção de tremor:") => {
eprintln!("ffmpeg rejeitou o arquivo: {}", e); // surface the embedded stderr
}
other => other?,
} Prevention
- Validate input files with ffprobe before running vidstab detection
- Require an ffmpeg build with libvidstab (`ffmpeg -filters | grep vidstab`) in your install docs
- Reject zero-byte or obviously truncated files before the pipeline
When it happens
Trigger: The detect pass `ffmpeg -i <input> -vf <detect> -an -f null -` exits non-zero: corrupt/unreadable input file, unsupported codec/container, or invalid vidstab detect filter arguments.
Common situations: User selects a damaged or partially downloaded video file for restore; input uses a codec the installed ffmpeg build cannot decode (no libX decoder); ffmpeg version too old for the vidstab filter options generated.
Understand the failure class
Background: "API error: {status}" and "HTTP 401/403/404/429/5xx" errors: non-2xx HTTP responses explained — this error's family across 27 libraries.
Related errors
AI-assisted analysis of tonhowtf/omniget@8600b91f42 (2026-09-12).
Data as JSON: /api/errors/f4a391eece9e5584.
Report an issue: GitHub.
Appendix: source
Thrown at src-tauri/omniget-core/src/core/tools/video_restore.rs:177
if opts.stabilize {
let dir = std::env::temp_dir().join(format!("omniget-vidstab-{}", uuid::Uuid::new_v4()));
std::fs::create_dir_all(&dir)?;
let file = dir.join("transforms.trf");
let detect = format!(
"{}:result='{}'",
detect_filter(opts.shakiness),
file.to_string_lossy().replace('\\', "/")
);
let out = crate::core::process::command(ffmpeg)
.args(["-y", "-hide_banner", "-loglevel", "error", "-i"])
.arg(inp)
.args(["-vf", &detect, "-an", "-f", "null", "-"])
.output()
.await
.map_err(|e| anyhow!("ffmpeg nao iniciou: {}", e))?;
if !out.status.success() {
let _ = std::fs::remove_dir_all(&dir);
return Err(anyhow!(
"detecção de tremor: {}",
String::from_utf8_lossy(&out.stderr).trim()
));
}
trf = Some(file);
}
let mut chain_parts: Vec<String> = Vec::new();
if let Some(file) = trf.as_ref() {
chain_parts.push(format!(
"vidstabtransform=input='{}':{}",
file.to_string_lossy().replace('\\', "/"),
transform_filter(opts.smoothing).trim_start_matches("vidstabtransform=")
));
}
if let Some(c) = chain {
chain_parts.push(c);
}View on GitHub (pinned to 8600b91f42)