{"record":{"id":"fd1a782baf7a528e","repo":"SubtitleEdit/subtitleedit","slug":"track-is-empty","errorCode":null,"errorMessage":"Track is empty.","messagePattern":"Track is empty\\.","errorType":"exception","errorClass":"InvalidOperationException","httpStatus":null,"severity":"error","filePath":"src/seconv/Core/SubtitleConverter.cs","lineNumber":671,"sourceCode":"            Configuration.Settings.General.CurrentFrameRate = originalFrameRate;\n        }\n    }\n\n    private async Task ConvertTrackAsync(ContainerSubtitleLoader.LoadedTrack track, string outputFile, ConversionOptions options)\n    {\n        var originalFrameRate = Configuration.Settings.General.CurrentFrameRate;\n        try\n        {\n            if (options.Fps.HasValue)\n            {\n                Configuration.Settings.General.CurrentFrameRate = options.Fps.Value;\n            }\n\n            await Task.Run(async () =>\n            {\n                if (track.Subtitle.Paragraphs.Count == 0)\n                {\n                    throw new InvalidOperationException(\"Track is empty.\");\n                }\n\n                await ApplyTransformsAndSaveAsync(track.Subtitle, track.Format, outputFile, options);\n            });\n        }\n        finally\n        {\n            Configuration.Settings.General.CurrentFrameRate = originalFrameRate;\n        }\n    }\n\n    private async Task ApplyTransformsAndSaveAsync(Subtitle subtitle, SubtitleFormat sourceFormat, string outputFile, ConversionOptions options)\n    {\n        // Apply offset (must be first, before any time-based transforms)\n        if (options.Offset.HasValue && options.Offset.Value != TimeSpan.Zero)\n        {\n            subtitle.AddTimeToAllParagraphs(options.Offset.Value);\n        }","sourceCodeStart":653,"sourceCodeEnd":689,"githubUrl":"https://github.com/SubtitleEdit/subtitleedit/blob/17a9f0748781032255db3526b7215d2fb891e3af/src/seconv/Core/SubtitleConverter.cs#L653-L689","documentation":"Thrown by ConvertTrackAsync when a container-extracted track (MKV/MP4/TS text track) loaded successfully but contains zero paragraphs. Distinct from error 143: the track metadata exists, the Subtitle object is non-null, but it has no cues.","triggerScenarios":"ContainerSubtitleLoader.LoadedTrack.Subtitle.Paragraphs.Count == 0 inside the Task.Run body of ConvertTrackAsync. The track was selected (matches --track-number / not filtered) but yielded no cues.","commonSituations":"A container track flagged in metadata but with no actual subtitle packets (e.g. a placeholder/empty language track in an MKV), or a forced-only track that has no forced entries when --forced-only is set.","solutions":["Inspect the container's track list (seconv info or ffprobe) and pick a track that actually carries cues.","Drop --forced-only if the selected track only has non-forced entries.","Re-extract or re-mux the source if the track is unexpectedly empty."],"exampleFix":"// before\nseconv movie.mkv srt --forced-only   // track has no forced cues\n// after\nseconv movie.mkv srt","handlingStrategy":"validation","validationCode":"// After loading a container track\nif (track.Subtitle.Paragraphs.Count == 0) {\n    warnings.Add($\"Track #{track.TrackNumber} is empty; skipping.\");\n    continue;\n}","typeGuard":"static bool TrackHasCues(ContainerSubtitleLoader.LoadedTrack t) => t.Subtitle.Paragraphs.Count > 0;","tryCatchPattern":"null","preventionTips":["List container tracks first (seconv info / ffprobe) and pick populated ones.","When using --forced-only, confirm the track actually has forced cues.","Skip empty tracks in batch jobs instead of letting them throw."],"tags":["seconv","container-track","empty-track","forced-only","libse"],"backgroundTag":null,"analyzedSha":"17a9f0748781032255db3526b7215d2fb891e3af","analyzedAt":"2026-08-13T18:11:43.374Z","schemaVersion":2},"datasetVersion":"2026-08-13T19:17:28.613Z"}