tonhowtf/omniget · error

esse vídeo não tem legenda; ligue o Whisper para transcrever

Error message

esse vídeo não tem legenda; ligue o Whisper para transcrever

What it means

When no local subtitle or media path is given, the tool tries to fetch subtitles from the source video; a None result means the video has no available captions. The error tells the user to enable Whisper transcription as the fallback path for generating cues.

Solutions

  1. Enable/configure Whisper transcription so the tool can generate cues from audio
  2. Provide a local subtitle file via opts.subtitle_path instead
  3. Provide the downloaded media via opts.media_path and run Whisper locally
  4. Check the video URL actually has captions visible on its page

Example fix

// before
let opts = Options { url: url.into(), ..Default::default() }; // no subtitles available
// after
let mut opts = Options { url: url.into(), ..Default::default() };
opts.whisper_enabled = true; // transcribe when captions are absent
run(opts, progress).await?;
Defensive patterns

Strategy: fallback

Validate before calling

// check captions availability before running
let has_subs = fetch_subtitle_tracks(&opts.url).await.map(|t| !t.is_empty()).unwrap_or(false);

Try / catch

match run(opts, progress).await {
    Err(e) if e.to_string().contains("esse vídeo não tem legenda") => {
        // fall back to Whisper transcription or supply a local subtitle
    }
    other => other?,
}

Prevention

When it happens

Trigger: `run` reaches the subtitle-fetch branch, `fetch` returns Ok(None) — the platform reports no subtitle tracks for this video (or none in the requested language).

Common situations: Video uploaded without captions; captions exist but not in the requested language; platform blocks anonymous caption access; URL points to a non-video page; region/age restrictions hiding tracks.

Understand the failure class

Background: 'Could not be found', 'does not exist', 'not found in database': the resource-not-found family when an ID, slug, key, or URI lookup comes back empty — this error's family across 20 libraries.

Related errors


AI-assisted analysis of tonhowtf/omniget@8600b91f42 (2026-09-12). Data as JSON: /api/errors/ca3412ca3300c8e2. Report an issue: GitHub.

Appendix: source

Thrown at src-tauri/omniget-core/src/core/tools/yt_notes.rs:495

        super::report(&progress, ID, "progress", 2, Some(4), None);
        match fetch_subtitles(&opts).await {
            Ok(Some(text)) => {
                cues = super::subtitle::parse(&text)?;
                source = "legenda-youtube".to_string();
            }
            Ok(None) | Err(_) if opts.allow_whisper => {
                super::report(&progress, ID, "progress", 3, Some(4), None);
                let audio = download_audio(&opts).await?;
                let r = transcribe(&audio, &opts, progress.clone()).await?;
                let _ = std::fs::remove_file(&audio);
                if meta.language.is_empty() {
                    meta.language = r.language.clone();
                }
                cues = r.cues;
                source = "whisper".to_string();
            }
            Ok(None) => {
                return Err(anyhow!(
                    "esse vídeo não tem legenda; ligue o Whisper para transcrever"
                ))
            }
            Err(e) => return Err(e),
        }
    } else if !opts.media_path.trim().is_empty() {
        let path = std::path::PathBuf::from(opts.media_path.trim());
        let r = transcribe(&path, &opts, progress.clone()).await?;
        if meta.title.is_empty() {
            meta.title = path
                .file_stem()
                .map(|s| s.to_string_lossy().to_string())
                .unwrap_or_default();
        }
        meta.language = r.language.clone();
        meta.duration_seconds = r.seconds;
        cues = r.cues;
        source = "whisper".to_string();

View on GitHub (pinned to 8600b91f42)