{"record":{"id":"664be2acde901b74","repo":"remotion-dev/remotion","slug":"stridelengthinseconds-must-be-non-negative-and-les","errorCode":null,"errorMessage":"strideLengthInSeconds must be non-negative and less than half of chunkLengthInSeconds.","messagePattern":"strideLengthInSeconds must be non-negative and less than half of chunkLengthInSeconds\\.","errorType":"validation","errorClass":null,"httpStatus":null,"severity":"error","filePath":"packages/studio/src/components/WebMcp.tsx","lineNumber":559,"sourceCode":"\t\t\t\t\t\tconst topK = input.topK ?? 50;\n\t\t\t\t\t\tconst repetitionPenalty = input.repetitionPenalty ?? 1;\n\t\t\t\t\t\tconst noRepeatNgramSize = input.noRepeatNgramSize ?? 0;\n\t\t\t\t\t\tif (\n\t\t\t\t\t\t\ttypeof chunkLengthInSeconds !== 'number' ||\n\t\t\t\t\t\t\t!Number.isFinite(chunkLengthInSeconds) ||\n\t\t\t\t\t\t\tchunkLengthInSeconds < 1 ||\n\t\t\t\t\t\t\tchunkLengthInSeconds > 30\n\t\t\t\t\t\t) {\n\t\t\t\t\t\t\tthrow new Error('chunkLengthInSeconds must be between 1 and 30.');\n\t\t\t\t\t\t}\n\n\t\t\t\t\t\tif (\n\t\t\t\t\t\t\ttypeof strideLengthInSeconds !== 'number' ||\n\t\t\t\t\t\t\t!Number.isFinite(strideLengthInSeconds) ||\n\t\t\t\t\t\t\tstrideLengthInSeconds < 0 ||\n\t\t\t\t\t\t\tstrideLengthInSeconds * 2 >= chunkLengthInSeconds\n\t\t\t\t\t\t) {\n\t\t\t\t\t\t\tthrow new Error(\n\t\t\t\t\t\t\t\t'strideLengthInSeconds must be non-negative and less than half of chunkLengthInSeconds.',\n\t\t\t\t\t\t\t);\n\t\t\t\t\t\t}\n\n\t\t\t\t\t\tif (\n\t\t\t\t\t\t\ttypeof temperature !== 'number' ||\n\t\t\t\t\t\t\t!Number.isFinite(temperature) ||\n\t\t\t\t\t\t\ttemperature <= 0 ||\n\t\t\t\t\t\t\ttypeof repetitionPenalty !== 'number' ||\n\t\t\t\t\t\t\t!Number.isFinite(repetitionPenalty) ||\n\t\t\t\t\t\t\trepetitionPenalty <= 0 ||\n\t\t\t\t\t\t\ttypeof topK !== 'number' ||\n\t\t\t\t\t\t\t!Number.isInteger(topK) ||\n\t\t\t\t\t\t\ttopK < 0 ||\n\t\t\t\t\t\t\ttypeof noRepeatNgramSize !== 'number' ||\n\t\t\t\t\t\t\t!Number.isInteger(noRepeatNgramSize) ||\n\t\t\t\t\t\t\tnoRepeatNgramSize < 0\n\t\t\t\t\t\t) {","sourceCodeStart":541,"sourceCodeEnd":577,"githubUrl":"https://github.com/remotion-dev/remotion/blob/b2f4e34732f3c6c222ea029413e22dc402218cd7/packages/studio/src/components/WebMcp.tsx#L541-L577","documentation":"`strideLengthInSeconds` must be a finite, non-negative number and strictly less than half of chunkLengthInSeconds. The stride controls overlap between consecutive chunks; a stride at or above half the chunk length would break the chunking invariants.","triggerScenarios":"Passing strideLengthInSeconds >= chunkLengthInSeconds / 2 (e.g. stride 15 with chunk 30), a negative value, NaN/Infinity, or a non-number.","commonSituations":"Setting stride equal to chunk length (assuming no overlap allowed); confusing stride semantics with sliding-window step sizes used elsewhere.","solutions":["Use a small stride such as 5 (the default) with the default 30-second chunk","Ensure stride * 2 < chunkLengthInSeconds","Omit the field to use the default stride of 5"],"exampleFix":"// before\n{ \"chunkLengthInSeconds\": 30, \"strideLengthInSeconds\": 20 }\n// after\n{ \"chunkLengthInSeconds\": 30, \"strideLengthInSeconds\": 5 }","handlingStrategy":"validation","validationCode":"const valid = typeof s === 'number' && Number.isFinite(s) && s >= 0 && s * 2 < chunkLength;\nif (!valid) throw new Error('stride must satisfy 0 <= stride < chunkLength/2');","typeGuard":"const isValidStride = (s: unknown, chunkLength: number): s is number =>\n  typeof s === 'number' && Number.isFinite(s) && s >= 0 && s * 2 < chunkLength;","tryCatchPattern":"try {\n  await callWhisperTool({ chunkLengthInSeconds: c, strideLengthInSeconds: s });\n} catch (err) {\n  if (err instanceof Error && err.message.includes('strideLengthInSeconds')) {\n    s = Math.min(s, c / 4); // clamp to a safe quarter-chunk stride\n  }\n}","preventionTips":["Apply the invariant stride * 2 < chunkLength when configuring","Use the default stride of 5 unless you know you need overlap control","Reject negative or non-finite values at input time"],"tags":["validation","whisper","range-check"],"backgroundTag":"value-out-of-range","analyzedSha":"b2f4e34732f3c6c222ea029413e22dc402218cd7","analyzedAt":"2026-09-09T13:27:51.281Z","contentChangedAt":"2026-09-09T13:27:51.281Z","schemaVersion":2},"datasetVersion":"2026-09-14T00:17:10.932Z"}