{"record":{"id":"ec74568206fcd19f","repo":"SubtitleEdit/subtitleedit","slug":"file-is-not-a-valid-mcc-subtitle-filepath","errorCode":null,"errorMessage":"File is not a valid MCC subtitle: {filePath}","messagePattern":"File is not a valid MCC subtitle: (.+?)","errorType":"exception","errorClass":"InvalidOperationException","httpStatus":null,"severity":"error","filePath":"src/seconv/Core/ContainerSubtitleLoader.cs","lineNumber":388,"sourceCode":"            subtitle.Paragraphs.AddRange(paragraphs);\n            subtitle.Renumber();\n            var lang = LanguageAutoDetect.AutoDetectGoogleLanguageOrNull(subtitle) ?? string.Empty;\n            tracks.Add(new LoadedTrack(subtitle, new SubRip(), lang, trackId));\n        }\n\n        if (tracks.Count == 0)\n        {\n            throw new InvalidOperationException($\"No subtitle tracks in MP4 file: {filePath}\");\n        }\n        return tracks;\n    }\n\n    private static List<LoadedTrack> LoadMcc(string filePath)\n    {\n        var mcc = new MacCaption10();\n        if (!mcc.IsMine(null, filePath))\n        {\n            throw new InvalidOperationException($\"File is not a valid MCC subtitle: {filePath}\");\n        }\n        var subtitle = new Subtitle();\n        mcc.LoadSubtitle(subtitle, null, filePath);\n        subtitle.Renumber();\n        return [new LoadedTrack(subtitle, mcc, string.Empty, null)];\n    }\n\n    private static List<LoadedTrack> LoadBluRaySup(string filePath, ConversionOptions options)\n    {\n        var subtitle = ImageOcrLoader.LoadBluRaySup(filePath, options);\n        if (subtitle.Paragraphs.Count == 0)\n        {\n            throw new InvalidOperationException($\"No subtitles recognised in Blu-Ray sup file: {filePath}\");\n        }\n        return [new LoadedTrack(subtitle, new SubRip(), string.Empty, null)];\n    }\n\n    private static List<LoadedTrack> LoadVobSub(string subPath, string idxPath, ConversionOptions options)","sourceCodeStart":370,"sourceCodeEnd":406,"githubUrl":"https://github.com/SubtitleEdit/subtitleedit/blob/17a9f0748781032255db3526b7215d2fb891e3af/src/seconv/Core/ContainerSubtitleLoader.cs#L370-L406","documentation":"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.","triggerScenarios":"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.","commonSituations":"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.","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."],"exampleFix":null,"handlingStrategy":"validation","validationCode":"// Use the format sniffer directly before the loader.\nvar mcc = new MacCaption10();\nif (!mcc.IsMine(null, filePath))\n    return Error($\"Not an MCC file: {filePath}\");","typeGuard":null,"tryCatchPattern":"try { tracks = ContainerSubtitleLoader.TryLoadTracks(filePath, options); }\ncatch (InvalidOperationException ex) when (ex.Message.Contains(\"valid MCC subtitle\"))\n{ Console.Error.WriteLine(ex.Message); return; }","preventionTips":["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."],"tags":["mcc","mac-caption","invalid-format","subtitle"],"backgroundTag":null,"analyzedSha":"17a9f0748781032255db3526b7215d2fb891e3af","analyzedAt":"2026-08-13T18:11:43.374Z","schemaVersion":2},"datasetVersion":"2026-08-13T19:17:28.613Z"}