SubtitleEdit/subtitleedit · error · InvalidOperationException
No subtitles found in transport stream: {filePath}
Error message
No subtitles found in transport stream: {filePath} What it means
Thrown by LoadTransportStream when neither teletext, ARIB, nor DVB-subtitle extraction produced any tracks. The TS parsed without crashing (DVB-sub OCR failures are caught and warned, not fatal) but the result list is empty, meaning the stream carries no recognisable subtitle content.
Source
Thrown at src/seconv/Core/ContainerSubtitleLoader.cs:491
if (!options.TeletextOnly)
{
try
{
var dvbSubs = ImageOcrLoader.LoadTransportStreamDvbSub(filePath, options);
foreach (var (subtitle, pid) in dvbSubs)
{
tracks.Add(new LoadedTrack(subtitle, new SubRip(), $"dvb_pid{pid}", pid));
}
}
catch (Exception ex)
{
AnsiConsole.MarkupLineInterpolated($"[yellow]Warning: DVB-sub OCR failed: {ex.Message}[/]");
}
}
if (tracks.Count == 0)
{
throw new InvalidOperationException($"No subtitles found in transport stream: {filePath}");
}
return tracks;
}
/// <summary>
/// Cleans a language tag for use in an output filename. Empty/whitespace → empty
/// string (caller treats as "no suffix"). Otherwise strips characters that are
/// problematic in filenames on Windows. Note: "und" (ISO 639 "undetermined") is
/// kept, so MKV tracks tagged as such still get a distinct suffix.
/// </summary>
/// <summary>
/// True when a sanitized track language carries no usable information: empty, or the
/// ISO 639-2 "und" (undetermined) code that muxers like ffmpeg write when no language
/// was declared.
/// </summary>
internal static bool IsUndeclaredLanguage(string? lang) =>
string.IsNullOrEmpty(lang) || lang.Equals("und", StringComparison.OrdinalIgnoreCase);
View on GitHub (pinned to 17a9f07487)
Solutions
- Inspect the TS with ffprobe/ts2es to list subtitle PIDs and their codec.
- If DVB-sub OCR failed, check the warning message — usually a missing/unconfigured OCR engine (Tesseract); install/configure it and retry.
- Remove --teletext-only / page filters if they are excluding all streams.
- Ensure the TS is a complete capture, not a truncated fragment.
Example fix
// before: OCR engine absent, DVB-sub failed, no teletext in stream seconv cap.ts -o out.srt # -> No subtitles found in transport stream // after: configure OCR engine path seconv cap.ts -o out.srt --tesseract-path /usr/share/tesseract-ocr
Defensive patterns
Strategy: try-catch
Validate before calling
// Probe for subtitle PIDs/codec with ffprobe before converting.
// Also ensure the OCR engine is configured when DVB-sub may be present.
if (!HasSubtitlePid(filePath)) return Error($"No subtitle PIDs in {filePath}"); Try / catch
try { tracks = ContainerSubtitleLoader.TryLoadTracks(filePath, options); }
catch (InvalidOperationException ex) when (ex.Message.Contains("transport stream"))
{ Console.Error.WriteLine(ex.Message); return; } Prevention
- Inspect the TS with ffprobe to list subtitle PIDs/codecs before converting.
- Ensure the OCR engine (Tesseract) is installed/configured so DVB-sub OCR does not silently fail.
- Avoid --teletext-only / page filters that exclude all present streams.
When it happens
Trigger: Loading a .ts/.m2ts/.mts where TransportStreamParser finds no teletext/ARIB pages and the DVB-sub path either finds no PID or its OCR fails (caught at line 483), leaving tracks empty at line 489. Also when options.SkipTeletext and options.TeletextOnly combine to exclude everything.
Common situations: A video-only transport stream; a TS with subtitles in a codec the parser does not handle; DVB-sub OCR failure (e.g. missing Tesseract) with no teletext fallback; page/PID filter options that exclude all present streams.
Related errors
- No Blu-Ray sup subtitles found in: {filePath}
- No PGS subtitles in MKV track #{track.TrackNumber}.
- --output-filename can only target a single DVB-sub PID. Foun
- Unable to access bitmap pixel data.
- Too many bytes for CCData!
AI-assisted analysis of SubtitleEdit/subtitleedit@17a9f07487 (2026-08-13).
Data as JSON: /api/errors/002c0d9a3c48e1a2.
Report an issue: GitHub.