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
- 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.
- Try loading the file in the Subtitle Edit GUI OCR/import window to get detailed row-level diagnostics.
- 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
- For SCC files, pre-check the header line starts with 'Scenarist_SCC' so you know you are on the SCC code path.
- Test SCC files in the Subtitle Edit GUI first — it gives row-level decode diagnostics.
- Catch InvalidOperationException from LoadSubtitleWithFormat and distinguish SCC-decode failures from format-detection failures by message.
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
- Unable to determine subtitle format for: {filePath}
- Unknown subtitle format: {formatName}
- Failed to read multiple-replace file at {path}: {ex.Message}
- Failed to parse multiple-replace XML at {path}: {ex.Message}
- Failed to parse multiple-replace JSON at {path}: {ex.Message
AI-assisted analysis of SubtitleEdit/subtitleedit@17a9f07487 (2026-08-13).
Data as JSON: /api/errors/4299b700fc58b08b.
Report an issue: GitHub.