{"record":{"id":"002c0d9a3c48e1a2","repo":"SubtitleEdit/subtitleedit","slug":"no-subtitles-found-in-transport-stream-filepath","errorCode":null,"errorMessage":"No subtitles found in transport stream: {filePath}","messagePattern":"No subtitles found in transport stream: (.+?)","errorType":"exception","errorClass":"InvalidOperationException","httpStatus":null,"severity":"error","filePath":"src/seconv/Core/ContainerSubtitleLoader.cs","lineNumber":491,"sourceCode":"        if (!options.TeletextOnly)\n        {\n            try\n            {\n                var dvbSubs = ImageOcrLoader.LoadTransportStreamDvbSub(filePath, options);\n                foreach (var (subtitle, pid) in dvbSubs)\n                {\n                    tracks.Add(new LoadedTrack(subtitle, new SubRip(), $\"dvb_pid{pid}\", pid));\n                }\n            }\n            catch (Exception ex)\n            {\n                AnsiConsole.MarkupLineInterpolated($\"[yellow]Warning: DVB-sub OCR failed: {ex.Message}[/]\");\n            }\n        }\n\n        if (tracks.Count == 0)\n        {\n            throw new InvalidOperationException($\"No subtitles found in transport stream: {filePath}\");\n        }\n        return tracks;\n    }\n\n    /// <summary>\n    /// Cleans a language tag for use in an output filename. Empty/whitespace → empty\n    /// string (caller treats as \"no suffix\"). Otherwise strips characters that are\n    /// problematic in filenames on Windows. Note: \"und\" (ISO 639 \"undetermined\") is\n    /// kept, so MKV tracks tagged as such still get a distinct suffix.\n    /// </summary>\n    /// <summary>\n    /// True when a sanitized track language carries no usable information: empty, or the\n    /// ISO 639-2 \"und\" (undetermined) code that muxers like ffmpeg write when no language\n    /// was declared.\n    /// </summary>\n    internal static bool IsUndeclaredLanguage(string? lang) =>\n        string.IsNullOrEmpty(lang) || lang.Equals(\"und\", StringComparison.OrdinalIgnoreCase);\n","sourceCodeStart":473,"sourceCodeEnd":509,"githubUrl":"https://github.com/SubtitleEdit/subtitleedit/blob/17a9f0748781032255db3526b7215d2fb891e3af/src/seconv/Core/ContainerSubtitleLoader.cs#L473-L509","documentation":"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.","triggerScenarios":"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.","commonSituations":"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.","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."],"exampleFix":"// before: OCR engine absent, DVB-sub failed, no teletext in stream\nseconv cap.ts -o out.srt   # -> No subtitles found in transport stream\n\n// after: configure OCR engine path\nseconv cap.ts -o out.srt --tesseract-path /usr/share/tesseract-ocr","handlingStrategy":"try-catch","validationCode":"// Probe for subtitle PIDs/codec with ffprobe before converting.\n// Also ensure the OCR engine is configured when DVB-sub may be present.\nif (!HasSubtitlePid(filePath)) return Error($\"No subtitle PIDs in {filePath}\");","typeGuard":null,"tryCatchPattern":"try { tracks = ContainerSubtitleLoader.TryLoadTracks(filePath, options); }\ncatch (InvalidOperationException ex) when (ex.Message.Contains(\"transport stream\"))\n{ Console.Error.WriteLine(ex.Message); return; }","preventionTips":["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."],"tags":["transport-stream","dvb-sub","teletext","ocr","subtitle"],"backgroundTag":null,"analyzedSha":"17a9f0748781032255db3526b7215d2fb891e3af","analyzedAt":"2026-08-13T18:11:43.374Z","schemaVersion":2},"datasetVersion":"2026-08-13T19:17:28.613Z"}