SubtitleEdit/subtitleedit · error · InvalidOperationException
No image handler for format '{options.Format}'
Error message
No image handler for format '{options.Format}' What it means
Thrown by WritePreservedBitmaps when LibSEIntegration.NormalizeFormatName(options.Format) does not match any image-output handler. The bitmap-passthrough path can only re-emit into the image formats ImageOutputWriter.TryCreateHandler knows (Blu-ray sup, VobSub, BDN-XML, DOST, FCP, D-Cinema, images-with-time-codes, WebVTT thumbnail). A text-only format here is a CLI/usage error.
Source
Thrown at src/seconv/Core/SubtitleConverter.cs:569
{
foreach (var item in items)
{
item.Dispose();
}
}
}
await Task.CompletedTask;
return true;
}
private static void WritePreservedBitmaps(
IReadOnlyList<BitmapSubtitleLoader.BitmapSubtitleItem> items,
string outputFile,
ConversionOptions options)
{
var handler = ImageOutputWriter.TryCreateHandler(LibSEIntegration.NormalizeFormatName(options.Format))
?? throw new InvalidOperationException($"No image handler for format '{options.Format}'");
var outputDir = Path.GetDirectoryName(outputFile);
if (!string.IsNullOrEmpty(outputDir) && !Directory.Exists(outputDir))
{
Directory.CreateDirectory(outputDir);
}
ImageOutputWriter.WritePreservedBitmaps(items, outputFile, handler, options);
}
private List<string> GetInputFiles(ConversionOptions options)
{
var files = new List<string>();
var baseFolder = string.IsNullOrEmpty(options.InputFolder)
? Directory.GetCurrentDirectory()
: options.InputFolder;
foreach (var entry in options.Patterns)
{View on GitHub (pinned to 17a9f07487)
Solutions
- Use a supported image target: bluraysup, vobsub, bdnxml, dost, fcpimage, dcineterop, imageswithtimecodes, or webvttthumbnail.
- If you actually want text, configure an OCR engine (--ocr-engine tesseract, etc.) so the text path runs instead of bitmap passthrough.
- Check the format spelling against seconv's --help format list; NormalizeFormatName only accepts known aliases.
Example fix
// before seconv movie.mkv srt // bitmap track + text target with no OCR // after (image target) seconv movie.mkv bluraysup // or enable OCR seconv movie.mkv srt --ocr-engine tesseract
Defensive patterns
Strategy: type-guard
Validate before calling
var handler = ImageOutputWriter.TryCreateHandler(LibSEIntegration.NormalizeFormatName(options.Format));
if (handler is null && !HasOcrEngine(options))
throw new ArgException($"'{options.Format}' is not a valid image target and no OCR engine is set."); Type guard
static readonly HashSet<string> ImageTargets = new(StringComparer.OrdinalIgnoreCase)
{ "bluraysup","vobsub","bdnxml","bdnxml8bit","dost","fcpimage","dcineterop","dcineteroppng","dcismpte2014","imageswithtimecodes","webvttthumbnail" };
static bool IsImageTarget(string fmt) => ImageTargets.Contains(LibSEIntegration.NormalizeFormatName(fmt).Trim()); Try / catch
null
Prevention
- Cross-check the requested format against seconv's supported image list before scripting.
- When converting bitmaps to text, always set --ocr-engine so the OCR path runs.
- Normalise format aliases through LibSEIntegration.NormalizeFormatName to avoid typos.
When it happens
Trigger: A bitmap source (MKV PGS/VobSub or TS DVB-sub) is being preserved as-is, but options.Format normalizes to something TryCreateHandler returns null for (e.g. 'srt', 'ass', a typo, or an unsupported image format).
Common situations: Asking seconv to convert PGS bitmaps into 'srt' without OCR (no OCR engine configured), or passing an unrecognised format string. The passthrough path has no renderer for text.
Related errors
- --output-filename can only target a single DVB-sub PID. Foun
- Tesseract not found on PATH. Install it from https://tessera
- Failed to start tesseract process.
- Tesseract exited with code {proc.ExitCode}: {err}
- No VOB files supplied.
AI-assisted analysis of SubtitleEdit/subtitleedit@17a9f07487 (2026-08-13).
Data as JSON: /api/errors/112026d99a07923e.
Report an issue: GitHub.