{"record":{"id":"4a190454310646ce","repo":"SubtitleEdit/subtitleedit","slug":"unable-to-determine-subtitle-format-for-filepath","errorCode":null,"errorMessage":"Unable to determine subtitle format for: {filePath}","messagePattern":"Unable to determine subtitle format for: (.+?)","errorType":"exception","errorClass":"InvalidOperationException","httpStatus":null,"severity":"error","filePath":"src/seconv/Core/LibSEIntegration.cs","lineNumber":179,"sourceCode":"                if (freshSubtitle.Paragraphs.Count > 0)\n                {\n                    return (freshSubtitle, format);\n                }\n            }\n        }\n\n        // 4. Last resort: generic auto-guesser (handles freeform CSV, xlsx, ods, JSON variants, ...)\n        // Its output is only trusted when the guessed timing is plausible — the guesser scrapes\n        // numbers out of arbitrary text, and treating that as a successful conversion turns\n        // unparseable input into corrupt output that still reports success (#12582).\n        var guessSubtitle = new UnknownFormatImporter { UseFrames = true }.AutoGuessImport(lines, filePath);\n        if (guessSubtitle.Paragraphs.Count > 0 && HasPlausibleGuessedTiming(guessSubtitle))\n        {\n            guessSubtitle.Paragraphs.RemoveAll(p => p.EndTime.TotalMilliseconds < p.StartTime.TotalMilliseconds);\n            return (guessSubtitle, new SubRip());\n        }\n\n        throw new InvalidOperationException($\"Unable to determine subtitle format for: {filePath}\");\n    }\n\n    private static bool HasScenaristSccSignature(List<string> lines)\n    {\n        var firstNonBlank = lines.FirstOrDefault(l => !string.IsNullOrWhiteSpace(l));\n        return firstNonBlank != null && firstNonBlank.TrimStart().StartsWith(\"Scenarist_SCC\", StringComparison.OrdinalIgnoreCase);\n    }\n\n    /// <summary>\n    /// Decodes an SCC file with both timing variants (non-drop and drop-frame) and keeps the\n    /// better result: more decoded captions wins, then fewer undecodable rows.\n    /// </summary>\n    private static (Subtitle Subtitle, SubtitleFormat Format, int UndecodableRows) LoadBestScenaristScc(List<string> lines, string filePath)\n    {\n        (Subtitle Subtitle, SubtitleFormat Format, int UndecodableRows) Load(SubtitleFormat format)\n        {\n            var subtitle = new Subtitle();\n            format.LoadSubtitle(subtitle, lines, filePath);","sourceCodeStart":161,"sourceCodeEnd":197,"githubUrl":"https://github.com/SubtitleEdit/subtitleedit/blob/17a9f0748781032255db3526b7215d2fb891e3af/src/seconv/Core/LibSEIntegration.cs#L161-L197","documentation":"Thrown as the last-resort failure when no subtitle format — specific parsers, extension-based guessing, or the generic auto-guesser — could produce a valid subtitle from the file. The generic auto-guesser's output is only trusted when HasPlausibleGuessedTiming passes; otherwise it is discarded to avoid turning unparseable input into silently corrupt output (#12582). If nothing works, this InvalidOperationException is thrown.","triggerScenarios":"Loading a file that is not any recognized subtitle format AND whose content does not yield plausible timed cues via the generic guesser. Also triggered when a recognized format's parser silently produces zero paragraphs (e.g. a data file that looks like CSV but has no parseable timing columns).","commonSituations":"Pointing the converter at a non-subtitle text file; a subtitle format too new or too obscure for the bundled LibSE version; a file whose encoding is so mangled that line-splitting/timing detection fails.","solutions":["Verify the file is actually a subtitle — open it in a text editor and check for recognizable cue structures (timestamps, text blocks).","Check the file encoding; re-save as UTF-8 with BOM and retry.","If the format is valid but unusual, try pre-converting to SRT with the Subtitle Edit GUI first, then feed the SRT to seconv.","Update to the latest seconv/LibSE build in case the format was added in a newer version."],"exampleFix":null,"handlingStrategy":"try-catch","validationCode":null,"typeGuard":null,"tryCatchPattern":"try { var (sub, fmt) = LibSEIntegration.LoadSubtitleWithFormat(path); }\ncatch (InvalidOperationException ex) when (ex.Message.Contains(\"Unable to determine subtitle format\"))\n{ /* unsupported/unknown format — advise user to pre-convert to SRT */ }","preventionTips":["Verify the input file is a genuine subtitle file (check for timestamp/text-block patterns) before conversion.","For obscure formats, pre-convert to SRT in the Subtitle Edit GUI.","Keep seconv/LibSE updated — new format support is added regularly."],"tags":["format-detection","unsupported-format","parse-failure","subtitles"],"backgroundTag":null,"analyzedSha":"17a9f0748781032255db3526b7215d2fb891e3af","analyzedAt":"2026-08-13T18:11:43.374Z","schemaVersion":2},"datasetVersion":"2026-08-13T19:17:28.613Z"}