{"record":{"id":"953399730742f42c","repo":"SubtitleEdit/subtitleedit","slug":"no-subtitle-tracks-in-mp4-file-filepath","errorCode":null,"errorMessage":"No subtitle tracks in MP4 file: {filePath}","messagePattern":"No subtitle tracks in MP4 file: (.+?)","errorType":"exception","errorClass":"InvalidOperationException","httpStatus":null,"severity":"error","filePath":"src/seconv/Core/ContainerSubtitleLoader.cs","lineNumber":378,"sourceCode":"                }\n                continue;\n            }\n\n            var paragraphs = track.Mdia.Minf.Stbl.GetParagraphs();\n            if (paragraphs.Count == 0)\n            {\n                continue;\n            }\n            var subtitle = new Subtitle();\n            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)","sourceCodeStart":360,"sourceCodeEnd":396,"githubUrl":"https://github.com/SubtitleEdit/subtitleedit/blob/17a9f0748781032255db3526b7215d2fb891e3af/src/seconv/Core/ContainerSubtitleLoader.cs#L360-L396","documentation":"Thrown by LoadMp4 when a valid MP4 contains no subtitle tracks that yielded paragraphs — every candidate track either had zero paragraphs (GetParagraphs() empty, skipped at line 365) or was filtered out, leaving the tracks list empty. The MP4 itself is valid but carries no extractable subtitle content.","triggerScenarios":"Loading a .mp4/.m4v/.m4s/.3gp where no track is a subtitle track, or all subtitle tracks have empty sample tables (ContainerSubtitleLoader.cs:376). Also reached when the MP4 parser found no 'text'/'subp' handler tracks.","commonSituations":"A video-only MP4; an MP4 with subtitle tracks whose sample data is missing/empty; a DASH/CMAF segment without its subtitle track; an MP4 whose subtitles are in an unsupported codec.","solutions":["Inspect tracks with mp4box -info / ffprobe to confirm a subtitle track exists with samples.","If subtitles are external, pass the .srt/.vtt file directly.","For DASH/CMAF, ensure both init and media segments are present and concatenated."],"exampleFix":null,"handlingStrategy":"validation","validationCode":"// Use ffprobe/the MP4 parser to confirm a subtitle track with samples exists.\n// (Internal route: only files >10KB or >100 bytes reach LoadMp4 — keep inputs complete.)","typeGuard":null,"tryCatchPattern":"try { tracks = ContainerSubtitleLoader.TryLoadTracks(filePath, options); }\ncatch (InvalidOperationException ex) when (ex.Message.Contains(\"No subtitle tracks in MP4\"))\n{ Console.Error.WriteLine(ex.Message); return; }","preventionTips":["Inspect MP4 tracks with mp4box/ffprobe to confirm subtitle samples exist.","For DASH/CMAF, concatenate init + media segments before loading.","Provide external subtitles when the MP4 has none embedded."],"tags":["mp4","no-tracks","subtitle","container"],"backgroundTag":null,"analyzedSha":"17a9f0748781032255db3526b7215d2fb891e3af","analyzedAt":"2026-08-13T18:11:43.374Z","schemaVersion":2},"datasetVersion":"2026-08-13T19:17:28.613Z"}