SubtitleEdit/subtitleedit · error · InvalidOperationException

No subtitles recognised in Blu-Ray sup file

Error message

No subtitles recognised in Blu-Ray sup file: {filePath}

What it means

Thrown by LoadBluRaySup when ImageOcrLoader.LoadBluRaySup returned a Subtitle whose Paragraphs list is empty. The .sup was parsed (BluRaySupParser did not throw) but yielded zero presentation composition segments, so there is nothing to convert.

Solutions

  1. Validate the .sup with a BD/PGS tool (BDSup2Sub, ffmpeg) to confirm it has PCS entries.
  2. Re-demux the PGS from the original Blu-ray source (MakeMKV/eac3to).
  3. If the file is a different image format (.idx/.sub), pass the correct extension.
Defensive patterns

Strategy: try-catch

Validate before calling

// Pre-validate the .sup has PCS entries via the parser's log/output.
var log = new StringBuilder();
if (BluRaySupParser.ParseBluRaySup(filePath, log).Count == 0)
    return Error($"No PCS entries in {filePath}");

Try / catch

try { tracks = ContainerSubtitleLoader.TryLoadTracks(filePath, options); }
catch (InvalidOperationException ex) when (ex.Message.Contains("Blu-Ray sup"))
{ Console.Error.WriteLine(ex.Message); return; }

Prevention

When it happens

Trigger: Passing a .sup file (ContainerSubtitleLoader.cs:74-76 routes .sup here) that BluRaySupParser.ParseBluRaySup reads but finds no valid PCS entries, or where OCR produced no paragraphs; the post-check at line 399 sees Paragraphs.Count == 0.

Common situations: A corrupt/truncated BD .sup; a .sup that is actually another format mis-named; a PGS file with only display/Windows segments and no composition segments; an empty placeholder.

Related errors


AI-assisted analysis of SubtitleEdit/subtitleedit@17a9f07487 (2026-08-13). Data as JSON: /api/errors/ffde4b38c1c7aa37. Report an issue: GitHub.

Appendix: source

Thrown at src/seconv/Core/ContainerSubtitleLoader.cs:401

    private static List<LoadedTrack> LoadMcc(string filePath)
    {
        var mcc = new MacCaption10();
        if (!mcc.IsMine(null, filePath))
        {
            throw new InvalidOperationException($"File is not a valid MCC subtitle: {filePath}");
        }
        var subtitle = new Subtitle();
        mcc.LoadSubtitle(subtitle, null, filePath);
        subtitle.Renumber();
        return [new LoadedTrack(subtitle, mcc, string.Empty, null)];
    }

    private static List<LoadedTrack> LoadBluRaySup(string filePath, ConversionOptions options)
    {
        var subtitle = ImageOcrLoader.LoadBluRaySup(filePath, options);
        if (subtitle.Paragraphs.Count == 0)
        {
            throw new InvalidOperationException($"No subtitles recognised in Blu-Ray sup file: {filePath}");
        }
        return [new LoadedTrack(subtitle, new SubRip(), string.Empty, null)];
    }

    private static List<LoadedTrack> LoadVobSub(string subPath, string idxPath, ConversionOptions options)
    {
        var subtitle = ImageOcrLoader.LoadVobSub(subPath, idxPath, options);
        if (subtitle.Paragraphs.Count == 0)
        {
            throw new InvalidOperationException($"No subtitles recognised in VobSub file: {subPath}");
        }
        return [new LoadedTrack(subtitle, new SubRip(), string.Empty, null)];
    }

    private static List<LoadedTrack> LoadTransportStream(string filePath, ConversionOptions options)
    {
        var tracks = new List<LoadedTrack>();

View on GitHub (pinned to 17a9f07487)