SubtitleEdit/subtitleedit · error · InvalidOperationException
Unable to determine subtitle format for: {filePath}
Error message
Unable to determine subtitle format for: {filePath} What it means
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.
Source
Thrown at src/seconv/Core/LibSEIntegration.cs:179
if (freshSubtitle.Paragraphs.Count > 0)
{
return (freshSubtitle, format);
}
}
}
// 4. Last resort: generic auto-guesser (handles freeform CSV, xlsx, ods, JSON variants, ...)
// Its output is only trusted when the guessed timing is plausible — the guesser scrapes
// numbers out of arbitrary text, and treating that as a successful conversion turns
// unparseable input into corrupt output that still reports success (#12582).
var guessSubtitle = new UnknownFormatImporter { UseFrames = true }.AutoGuessImport(lines, filePath);
if (guessSubtitle.Paragraphs.Count > 0 && HasPlausibleGuessedTiming(guessSubtitle))
{
guessSubtitle.Paragraphs.RemoveAll(p => p.EndTime.TotalMilliseconds < p.StartTime.TotalMilliseconds);
return (guessSubtitle, new SubRip());
}
throw new InvalidOperationException($"Unable to determine subtitle format for: {filePath}");
}
private static bool HasScenaristSccSignature(List<string> lines)
{
var firstNonBlank = lines.FirstOrDefault(l => !string.IsNullOrWhiteSpace(l));
return firstNonBlank != null && firstNonBlank.TrimStart().StartsWith("Scenarist_SCC", StringComparison.OrdinalIgnoreCase);
}
/// <summary>
/// Decodes an SCC file with both timing variants (non-drop and drop-frame) and keeps the
/// better result: more decoded captions wins, then fewer undecodable rows.
/// </summary>
private static (Subtitle Subtitle, SubtitleFormat Format, int UndecodableRows) LoadBestScenaristScc(List<string> lines, string filePath)
{
(Subtitle Subtitle, SubtitleFormat Format, int UndecodableRows) Load(SubtitleFormat format)
{
var subtitle = new Subtitle();
format.LoadSubtitle(subtitle, lines, filePath);View on GitHub (pinned to 17a9f07487)
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.
Defensive patterns
Strategy: try-catch
Try / catch
try { var (sub, fmt) = LibSEIntegration.LoadSubtitleWithFormat(path); }
catch (InvalidOperationException ex) when (ex.Message.Contains("Unable to determine subtitle format"))
{ /* unsupported/unknown format — advise user to pre-convert to SRT */ } Prevention
- 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.
When it happens
Trigger: 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).
Common situations: 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.
Related errors
- File declares the Scenarist_SCC signature, but no valid capt
- VobSub MKV track #{track.TrackNumber} is compressed (content
- Unknown subtitle format: {formatName}
- Failed to read multiple-replace file at {path}: {ex.Message}
- Failed to parse multiple-replace XML at {path}: {ex.Message}
AI-assisted analysis of SubtitleEdit/subtitleedit@17a9f07487 (2026-08-13).
Data as JSON: /api/errors/4a190454310646ce.
Report an issue: GitHub.