{"record":{"id":"384381a3055f2ef8","repo":"SubtitleEdit/subtitleedit","slug":"unknown-time-format-timeformat","errorCode":null,"errorMessage":"Unknown time format '{timeFormat}'","messagePattern":"Unknown time format '(.+?)'","errorType":"exception","errorClass":"InvalidOperationException","httpStatus":null,"severity":"error","filePath":"src/libse/SubtitleFormats/ClqttJson.cs","lineNumber":53,"sourceCode":"            var text = sb.ToString().TrimStart();\n            if (text.IndexOf(\"\\\"events\\\"\", StringComparison.Ordinal) < 0)\n            {\n                return;\n            }\n\n            subtitle.Paragraphs.Clear();\n            var parser = new SeJsonParser();\n            var frameRate = Configuration.Settings.General.CurrentFrameRate;\n\n            var rootElements = parser.GetRootElements(text);\n\n            var metaElement = rootElements.Find(element => element.Name.Equals(\"meta\", StringComparison.InvariantCultureIgnoreCase));\n            if (metaElement != null)\n            {\n                var timeFormat = parser.GetFirstObject(metaElement.Json, \"timeFormat\");\n                if (!timeFormat.Equals(\"FRAMES\", StringComparison.InvariantCultureIgnoreCase))\n                {\n                    throw new InvalidOperationException($\"Unknown time format '{timeFormat}'\");\n                }\n\n                var fpsString = parser.GetFirstObject(metaElement.Json, \"fps\");\n                if (fpsString.Equals(\"FPS_2397\", StringComparison.InvariantCultureIgnoreCase))\n                {\n                    frameRate = 24000.0 / 1001.0;\n                }\n                else if (fpsString.Equals(\"FPS_2997\", StringComparison.InvariantCultureIgnoreCase))\n                {\n                    frameRate = 30000.0 / 1001.0;\n                }\n                else if (fpsString.Equals(\"FPS_5994\", StringComparison.InvariantCultureIgnoreCase))\n                {\n                    frameRate = 60000.0 / 1001.0;\n                }\n                else\n                {\n                    try","sourceCodeStart":35,"sourceCodeEnd":71,"githubUrl":"https://github.com/SubtitleEdit/subtitleedit/blob/17a9f0748781032255db3526b7215d2fb891e3af/src/libse/SubtitleFormats/ClqttJson.cs#L35-L71","documentation":"Thrown by ClqttJson.LoadSubtitle when the JSON 'meta' object has a 'timeFormat' field whose value is not 'FRAMES' (case-insensitive). The CLQTT importer only supports frame-based timing, so any other value (seconds, milliseconds, or a typo) is rejected before any events are read.","triggerScenarios":"Feeding a .clqtt file whose meta.timeFormat is 'SECONDS', 'ms', 'TIME', empty, or any string other than 'FRAMES'. Also occurs if a future CLQTT spec version introduces a new time format this importer does not yet handle.","commonSituations":"Using a CLQTT file produced by a tool that emits a different timing mode; version mismatch between the file producer and this SubtitleEdit build; hand-crafted CLQTT JSON.","solutions":["Inspect the .clqtt file's meta object and set timeFormat to \"FRAMES\".","Convert the file's timing to frames using its native tool before importing.","Upgrade SubtitleEdit — newer builds may support additional time formats.","If producing CLQTT output, ensure your exporter writes timeFormat=FRAMES."],"exampleFix":"// before\n\"meta\": { \"timeFormat\": \"seconds\", \"fps\": \"FPS_2397\" }\n// after\n\"meta\": { \"timeFormat\": \"FRAMES\", \"fps\": \"FPS_2397\" }","handlingStrategy":"validation","validationCode":"// Check meta.timeFormat before importing a CLQTT payload\nvar timeFormat = parser.GetFirstObject(metaElement.Json, \"timeFormat\");\nif (!timeFormat.Equals(\"FRAMES\", StringComparison.OrdinalIgnoreCase))\n{\n    // convert or reject instead of letting LoadSubtitle throw\n    Console.WriteLine($\"Unsupported timeFormat '{timeFormat}'; convert to FRAMES first.\");\n}","typeGuard":null,"tryCatchPattern":"try\n{\n    new ClqttJson().LoadSubtitle(sub, lines, fileName);\n}\ncatch (InvalidOperationException ex) when (ex.Message.Contains(\"Unknown time format\"))\n{\n    // inform user the file's timing mode is unsupported\n    logger.Warning(ex.Message);\n}","preventionTips":["Verify CLQTT files come from a producer that emits timeFormat=FRAMES.","Inspect the meta object in a JSON viewer before batch-importing.","Keep SubtitleEdit updated for new time-format support."],"tags":["subtitle-format","clqtt","json","time-format","parsing"],"backgroundTag":null,"analyzedSha":"17a9f0748781032255db3526b7215d2fb891e3af","analyzedAt":"2026-08-13T18:11:43.374Z","schemaVersion":2},"datasetVersion":"2026-08-13T19:17:28.613Z"}