tonhowtf/omniget · warning
nenhum comentário cai entre
Error message
nenhum comentário cai entre {:.1}s e {:.1}s What it means
After shifting subtitle timings into the cut window (shift_ass or shift_other), run() counts how many dialogue lines land inside it. If none do, it throws 'nenhum comentário cai entre <start>s e <start+window>s' because burning an empty subtitle track is pointless.
Solutions
- Pick a time range that actually contains comments (query the danmaku timeline first)
- Confirm the subtitle file corresponds to the same video and part as the cut
- Decide whether an empty-danmaku clip is acceptable and skip the burn step if so
Example fix
// before
burn::run(&BurnOptions { start: 0.0, duration: 5.0, ..opts }) // no comments before 30s
// after
let (start, duration) = danmaku_busy_range(&subtitle, 0.0, 5.0)
.unwrap_or((30.0, 10.0)); // fall back to a range with comments
burn::run(&BurnOptions { start, duration, ..opts }) Defensive patterns
Strategy: fallback
Validate before calling
// count dialogues overlapping the window before burning
fn has_comments_in_window(sub_text: &str, start: f64, window: f64) -> bool { /* parse timestamps, check overlap */ } Try / catch
match burn::run(&opts, &progress).await {
Err(e) if e.to_string().contains("nenhum comentário cai") => Ok(ClipWithoutDanmaku), // proceed without burn
Err(e) => propagate(e)?,
Ok(res) => use_result(res),
} Prevention
- Inspect the danmaku timeline to choose a range that contains comments
- Verify the subtitle file belongs to the same video/part
- Treat an empty danmaku clip as a valid outcome instead of an error path
When it happens
Trigger: The requested [start, start+window] interval of the video contains zero danmaku comments — either the video genuinely has no comments in that range, or the subtitle timestamps don't overlap the cut.
Common situations: Clipping an early segment of a long video before viewers commented; live-stream VOD where danmaku only starts later; wrong subtitle file (from another video/part) whose timeline doesn't overlap the cut; shift_other failed to parse timings so everything was dropped.
Understand the failure class
Background: EmptyResultError / "no results found": when an API or scraper succeeds but returns zero rows — this error's family across 9 libraries.
Related errors
- legenda não encontrada
- legenda não encontrada
- nada para tarjar: marque uma região ou digite um termo
- MB não cabem s de vídeo — aumente o alvo ou encurte o clipe
- a API oficial so aceita URLs publicas (https://…) para os…
AI-assisted analysis of tonhowtf/omniget@8600b91f42 (2026-09-12).
Data as JSON: /api/errors/be34a50839bab202.
Report an issue: GitHub.
Appendix: source
Thrown at src-tauri/src/platforms/bilibili/danmaku/burn.rs:115
opts.duration
} else {
(probe.duration_seconds - start).max(0.0)
};
if window <= 0.0 {
return Err(anyhow!(
"a janela de corte ficou vazia — o vídeo tem {:.1}s",
probe.duration_seconds
));
}
let text = read_text(&sub)?;
let (body, dialogues) = if is_ass(&sub) {
shift_ass(&text, start, window)
} else {
shift_other(&text, start, window)?
};
if dialogues == 0 {
return Err(anyhow!(
"nenhum comentário cai entre {:.1}s e {:.1}s",
start,
start + window
));
}
let work_dir = omniget_core::core::tools::temp_dir();
std::fs::create_dir_all(&work_dir)?;
let work = work_dir.join(format!("danmaku-{}.ass", uuid::Uuid::new_v4()));
std::fs::write(&work, &body)?;
let out_dir = if opts.output_dir.trim().is_empty() {
video.parent().map(|p| p.to_path_buf()).unwrap_or_default()
} else {
PathBuf::from(opts.output_dir.trim())
};
std::fs::create_dir_all(&out_dir)?;
let stem = video
.file_stem()View on GitHub (pinned to 8600b91f42)