SubtitleEdit/subtitleedit · error · InvalidOperationException
File is not a valid MCC subtitle: {filePath}
Error message
File is not a valid MCC subtitle: {filePath} What it means
Thrown by LoadMcc when MacCaption10.IsMine(null, filePath) returns false — the file's content does not match the MacCaption (MCC, SCTE-104 caption) format signature. The .mcc extension alone is not trusted; the format sniffer must recognise the header.
Source
Thrown at src/seconv/Core/ContainerSubtitleLoader.cs:388
subtitle.Paragraphs.AddRange(paragraphs);
subtitle.Renumber();
var lang = LanguageAutoDetect.AutoDetectGoogleLanguageOrNull(subtitle) ?? string.Empty;
tracks.Add(new LoadedTrack(subtitle, new SubRip(), lang, trackId));
}
if (tracks.Count == 0)
{
throw new InvalidOperationException($"No subtitle tracks in MP4 file: {filePath}");
}
return tracks;
}
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)View on GitHub (pinned to 17a9f07487)
Solutions
- Open the file in a text editor and verify it starts with the MCC header (e.g. 'SCC_Caption' / FILE_FORMAT markers).
- If it is a different caption format (SCC, SRT), rename it correctly so the loader routes to the right parser.
- Re-export the MCC from the original captioning tool if it is corrupt.
Defensive patterns
Strategy: validation
Validate before calling
// Use the format sniffer directly before the loader.
var mcc = new MacCaption10();
if (!mcc.IsMine(null, filePath))
return Error($"Not an MCC file: {filePath}"); Try / catch
try { tracks = ContainerSubtitleLoader.TryLoadTracks(filePath, options); }
catch (InvalidOperationException ex) when (ex.Message.Contains("valid MCC subtitle"))
{ Console.Error.WriteLine(ex.Message); return; } Prevention
- Call MacCaption10.IsMine(null, filePath) to validate before the full load.
- Verify the file header matches the MCC format; rename mis-named files to their true extension.
- Re-export MCC from the captioning tool if it is corrupt.
When it happens
Trigger: Passing a .mcc path whose contents are not a real MacCaption 1.0 file (ContainerSubtitleLoader.cs:386). The IsMine check inspects the file header/magic; a mismatch triggers the throw before any parsing.
Common situations: A non-MCC file given a .mcc extension; a truncated/garbled MCC; an MCC in an unsupported variant the sniffer rejects; a file that is actually another caption format (e.g. SCC) mis-named.
Related errors
- Unable to access bitmap pixel data.
- Too many bytes for CCData!
- Dvd language {code} not found!
- NameList: Unable to read name list file: {fileNameOrUrl}
- No VobSub subtitles in MKV track #{track.TrackNumber}.
AI-assisted analysis of SubtitleEdit/subtitleedit@17a9f07487 (2026-08-13).
Data as JSON: /api/errors/ec74568206fcd19f.
Report an issue: GitHub.