tonhowtf/omniget · error
vídeo não encontrado
Error message
vídeo não encontrado: {} What it means
run() validates that the configured video input path points to an existing regular file before invoking FFmpeg. If opts.video (after trimming whitespace) does not exist or is a directory, it throws 'vídeo não encontrado: <path>'. This is a fail-fast precondition for the danmaku burn pipeline.
Solutions
- Check the path exists before calling run: std::path::Path::new(path).is_file()
- Verify the upstream download stage succeeded and record its actual output path rather than guessing it
- Trim and normalize the path; check for typos or stale absolute paths from another machine
Example fix
// before
burn::run(&BurnOptions { video: "downloads/clip.mp4".into(), ..opts })
// after
let video = "downloads/clip.mp4";
if !std::path::Path::new(video).is_file() {
anyhow::bail!("vídeo de entrada ausente: {}", video);
}
burn::run(&BurnOptions { video: video.into(), ..opts }) Defensive patterns
Strategy: validation
Validate before calling
fn ensure_video(path: &str) -> Result<(), String> {
if std::path::Path::new(path.trim()).is_file() { Ok(()) }
else { Err(format!("vídeo não encontrado: {}", path)) }
} Type guard
fn is_existing_file(p: &str) -> bool {
std::path::Path::new(p.trim()).is_file()
} Try / catch
match burn::run(&opts, &progress).await {
Err(e) if e.to_string().starts_with("vídeo não encontrado") => notify_user_missing_video(&opts.video),
Err(e) => propagate(e)?,
Ok(res) => use_result(res),
} Prevention
- Thread the actual output path of the download stage into BurnOptions
- Check is_file() on every pipeline input before invoking the next stage
- Trim paths and reject empty strings early
When it happens
Trigger: Calling bilibili::danmaku::burn::run with BurnOptions.video pointing to a non-existent path, an empty string, a directory, or a path that was moved/deleted after the download finished.
Common situations: Download step failed or was cancelled (see error 1050) so the file never landed; wrong path passed between pipeline stages; path with stray whitespace; user edited the output dir in config.
Understand the failure class
Background: "File not found" and ENOENT errors: why libraries can't find a file that should exist — this error's family across 50 libraries.
Related errors
- legenda não encontrada
- MB não cabem s de vídeo — aumente o alvo ou encurte o clipe
- a janela de corte ficou vazia — o vídeo tem
- alvo pequeno demais para
- arquivo não existe
AI-assisted analysis of tonhowtf/omniget@8600b91f42 (2026-09-12).
Data as JSON: /api/errors/4791fedb90414092.
Report an issue: GitHub.
Appendix: source
Thrown at src-tauri/src/platforms/bilibili/danmaku/burn.rs:77
"veryfast".into()
}
#[derive(Debug, Clone, Serialize)]
pub struct BurnResult {
pub output: String,
pub bytes: u64,
pub duration_secs: f64,
/// Quantos comentários sobraram dentro da janela.
pub dialogues: usize,
/// 0 quando a codificação foi por CRF.
pub video_kbps: u32,
pub audio_kbps: u32,
}
pub async fn run(opts: &BurnOptions, progress: &ProgressFn) -> Result<BurnResult> {
let video = PathBuf::from(opts.video.trim());
if !video.is_file() {
return Err(anyhow!("vídeo não encontrado: {}", opts.video));
}
let sub = PathBuf::from(opts.subtitle.trim());
if !sub.is_file() {
return Err(anyhow!("legenda não encontrada: {}", opts.subtitle));
}
let ffmpeg = omniget_core::core::dependencies::ensure_ffmpeg().await?;
report(
progress,
ID,
"progress",
0,
Some(3),
Some("lendo o vídeo".into()),
);
let probe = omniget_core::core::ffmpeg::probe(&video).await?;
let has_audio = probe.streams.iter().any(|s| s.codec_type == "audio");
let start = opts.start.max(0.0);View on GitHub (pinned to 8600b91f42)