SubtitleEdit/subtitleedit · error · InvalidOperationException
No Blu-Ray sup subtitles found in: {filePath}
Error message
No Blu-Ray sup subtitles found in: {filePath} What it means
Thrown by ImageOcrLoader.LoadBluRaySup when BluRaySupParser.ParseBluRaySup(filePath, log) returns an empty PCS list — the .sup file yielded zero presentation composition segments. Without any PCS entries there are no images to OCR or time-code-extract, so the load aborts before creating an OCR engine.
Source
Thrown at src/seconv/Core/ImageOcrLoader.cs:30
/// <summary>
/// OCR-driven loaders for image-based subtitle sources. Each method returns a Subtitle
/// where each paragraph's text was recognised by Tesseract from the source's bitmap stream.
/// </summary>
internal static class ImageOcrLoader
{
/// <summary>
/// Blu-Ray .sup → text via the configured OCR engine. When
/// <see cref="ConversionOptions.TimeCodesOnly"/> is set, OCR is skipped entirely and
/// each entry keeps its timing with empty text — no OCR engine is even created.
/// </summary>
public static Subtitle LoadBluRaySup(string filePath, ConversionOptions options)
{
var log = new StringBuilder();
var pcsList = BluRaySupParser.ParseBluRaySup(filePath, log);
if (pcsList.Count == 0)
{
throw new InvalidOperationException($"No Blu-Ray sup subtitles found in: {filePath}");
}
if (options.TimeCodesOnly)
{
AnsiConsole.MarkupLine($"[dim]Extracting time codes from {pcsList.Count} Blu-Ray sup image(s) (no OCR)...[/]");
return PcsListToSubtitle(pcsList, null);
}
using var ocr = OcrEngineFactory.Create(options);
var isolationNote = options.PgsIsolateColors ? string.Empty : " (colour isolation off)";
AnsiConsole.MarkupLine($"[dim]Running {ocr.Name} OCR on {pcsList.Count} Blu-Ray sup image(s){isolationNote}...[/]");
return PcsListToSubtitle(pcsList, ocr, options.PgsIsolateColors);
}
/// <summary>
/// MKV PGS track (S_HDMV/PGS) → text via the configured OCR engine, or time codes only
/// when <see cref="ConversionOptions.TimeCodesOnly"/> is set.
/// </summary>View on GitHub (pinned to 17a9f07487)
Solutions
- Validate the PGS with BDSup2Sub or FFmpeg to confirm PCS entries exist.
- Re-demux the PGS stream from the original Blu-ray (MakeMKV/eac3to/ffmpeg -codec copy).
- Confirm the file is genuinely a Blu-ray PGS .sup and not an HD-DVD or other variant.
Defensive patterns
Strategy: validation
Validate before calling
// Pre-check PCS count before the OCR-bearing load.
var log = new StringBuilder();
if (BluRaySupParser.ParseBluRaySup(filePath, log).Count == 0)
return Error($"No Blu-Ray sup subtitles in: {filePath}"); Try / catch
try { sub = ImageOcrLoader.LoadBluRaySup(filePath, options); }
catch (InvalidOperationException ex) when (ex.Message.Contains("No Blu-Ray sup subtitles"))
{ Console.Error.WriteLine(ex.Message); continue; } Prevention
- Validate the PGS with BDSup2Sub/ffmpeg to confirm PCS entries before OCR.
- Re-demux the PGS from the original Blu-ray if it is truncated.
- Catch the InvalidOperationException to skip bad .sup files in batch jobs.
When it happens
Trigger: Calling LoadBluRaySup(filePath, options) on a .sup that the parser reads but finds no valid PCS in (ImageOcrLoader.cs:33). Happens with truncated/corrupt PGS files or a non-PGS file given a .sup extension.
Common situations: A truncated BD .sup (missing the PCS after the header); a .sup that is actually a different binary format; an empty or placeholder file; a PGS demuxed incorrectly so only window/colour segments survived.
Related errors
- No subtitles recognised in Blu-Ray sup file: {filePath}
- No PGS subtitles in MKV track #{track.TrackNumber}.
- Unable to access bitmap pixel data.
- No Blu-Ray sup subtitles found in: {filePath}
- No subtitle essences found in MXF: {filePath}
AI-assisted analysis of SubtitleEdit/subtitleedit@17a9f07487 (2026-08-13).
Data as JSON: /api/errors/2283bfa25d943c1f.
Report an issue: GitHub.