SubtitleEdit/subtitleedit · error · InvalidOperationException

File declares the Scenarist_SCC signature, but no valid capt

Error message

File declares the Scenarist_SCC signature, but no valid captions could be decoded: {filePath}

What it means

Thrown when a file whose first non-blank line starts with 'Scenarist_SCC' (the SCC signature) was decoded by the SCC parser but produced zero valid caption paragraphs. The SCC parser is intentionally lenient — it skips undecodable rows and counts them — but if NOTHING decodes the file is treated as corrupt rather than silently producing empty output (#12582). The undecodable row count is included in the message when > 0.

Source

Thrown at src/seconv/Core/LibSEIntegration.cs:107

        {
            var csvSubtitle = new UnknownFormatImporterCsv().AutoGuessImport(lines);
            if (csvSubtitle != null && csvSubtitle.Paragraphs.Count > 0)
            {
                return (csvSubtitle, new SubRip());
            }
        }

        // 0b. A file that declares the Scenarist SCC signature is SCC, full stop — decode it
        // with the SCC parsers and never let it fall through to the generic guessers below,
        // which would digit-scrape the raw source lines into garbage cues (#12582). The SCC
        // parser is lenient (it skips undecodable rows and counts them), so a partially
        // damaged file still converts, with a warning; a file where nothing decodes fails.
        if (HasScenaristSccSignature(lines))
        {
            var (sccSubtitle, sccFormat, undecodableRows) = LoadBestScenaristScc(lines, filePath);
            if (sccSubtitle.Paragraphs.Count == 0)
            {
                throw new InvalidOperationException(
                    $"File declares the Scenarist_SCC signature, but no valid captions could be decoded" +
                    $"{(undecodableRows > 0 ? $" ({undecodableRows} undecodable row(s))" : string.Empty)}: {filePath}");
            }

            if (undecodableRows > 0)
            {
                warnings?.Add($"{undecodableRows} SCC caption row(s) could not be decoded and were skipped.");
            }

            return (sccSubtitle, sccFormat);
        }

        // 1. Try text-based formats by content sniffing
        foreach (var format in SubtitleFormat.AllSubtitleFormats)
        {
            if (format.IsMine(lines, filePath))
            {
                format.LoadSubtitle(subtitle, lines, filePath);

View on GitHub (pinned to 17a9f07487)

Solutions

  1. Open the SCC file in a text editor and inspect the caption rows — verify the timing format and hex-encoded byte pairs conform to the Scenarist SCC spec.
  2. Try loading the file in the Subtitle Edit GUI OCR/import window to get detailed row-level diagnostics.
  3. If only some rows are corrupt, the parser already skips them — fix the remaining valid rows until at least one decodes; the warning path (undecodableRows > 0 but some success) will then apply instead.
Defensive patterns

Strategy: try-catch

Try / catch

try { var (sub, fmt) = LibSEIntegration.LoadSubtitleWithFormat(sccPath); }
catch (InvalidOperationException ex) when (ex.Message.Contains("Scenarist_SCC signature"))
{ /* SCC file is corrupt — advise user to inspect/repair the SCC rows */ }

Prevention

When it happens

Trigger: An SCC file whose header line is correct ('Scenarist_SCC') but whose caption data rows are all malformed (bad hex pairs, invalid timing, wrong row structure). Both drop-frame and non-drop-frame decode attempts are tried (LoadBestScenaristScc); if both yield zero paragraphs, this throws.

Common situations: A truncated or garbled SCC file (e.g. corrupted during transfer); a file that has the SCC header but whose body is in a different dialect the parser cannot handle; a hand-edited SCC with structural errors in every row.

Related errors


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