{"record":{"id":"e02a9cfe2ad04871","repo":"diegosouzapw/OmniRoute","slug":"video-duration-must-be-positive","errorCode":null,"errorMessage":"Video duration must be positive","messagePattern":"Video duration must be positive","errorType":"exception","errorClass":"Error","httpStatus":null,"severity":"error","filePath":"src/lib/guardrails/videoBridgeRuntime.ts","lineNumber":219,"sourceCode":"      ffmpegVersion: null,\n      ffprobeVersion: null,\n      reason: \"FFmpeg and ffprobe are not available on PATH\",\n    };\n  }\n\n  runtimeProbeCache = {\n    expiresAt: now + (options.cacheTtlMs ?? 30_000),\n    value,\n  };\n  return structuredClone(value);\n}\n\nexport function calculateFrameTimestamps(\n  durationSeconds: number,\n  requestedFrameCount: number\n): number[] {\n  if (!Number.isFinite(durationSeconds) || durationSeconds <= 0) {\n    throw new Error(\"Video duration must be positive\");\n  }\n  if (\n    !Number.isInteger(requestedFrameCount) ||\n    requestedFrameCount < 1 ||\n    requestedFrameCount > 16\n  ) {\n    throw new Error(\"Video frame count must be between 1 and 16\");\n  }\n  const frameCount = Math.min(requestedFrameCount, Math.max(1, Math.floor(durationSeconds)));\n  return Array.from(\n    { length: frameCount },\n    (_unused, index) => ((index + 0.5) * durationSeconds) / frameCount\n  );\n}\n\nfunction normalizeSceneCandidates(\n  durationSeconds: number,\n  candidates: readonly number[]","sourceCodeStart":201,"sourceCodeEnd":237,"githubUrl":"https://github.com/diegosouzapw/OmniRoute/blob/a179ffed5bb2e0b883b9ae7214ce8717b2a94c4d/src/lib/guardrails/videoBridgeRuntime.ts#L201-L237","documentation":"Error \"Video duration must be positive\" thrown in diegosouzapw/OmniRoute.","triggerScenarios":"Thrown at src/lib/guardrails/videoBridgeRuntime.ts:219 when the library encounters an invalid state.","commonSituations":"See trigger scenarios.","solutions":[],"exampleFix":null,"handlingStrategy":null,"validationCode":null,"typeGuard":null,"tryCatchPattern":null,"preventionTips":[],"tags":[],"backgroundTag":null,"analyzedSha":"a179ffed5bb2e0b883b9ae7214ce8717b2a94c4d","analyzedAt":"2026-08-25T18:35:09.898Z","schemaVersion":2},"datasetVersion":"2026-08-25T21:54:21.419Z"}