{"record":{"id":"1f3dc3a3c96949bb","repo":"diegosouzapw/OmniRoute","slug":"video-exceeds-the-maximum-duration","errorCode":null,"errorMessage":"Video exceeds the maximum duration","messagePattern":"Video exceeds the maximum duration","errorType":"exception","errorClass":"Error","httpStatus":null,"severity":"error","filePath":"src/lib/guardrails/videoBridgeRuntime.ts","lineNumber":799,"sourceCode":"      });\n    const selectedStream = [...playableVideoStreams].sort((left, right) => {\n      const defaultPreference =\n        Number(dispositionFlag(right, \"default\")) - Number(dispositionFlag(left, \"default\"));\n      return defaultPreference || Number(left.index) - Number(right.index);\n    })[0];\n    if (selectedStream) {\n      streamIndex = Number(selectedStream.index);\n      width = Number(selectedStream.width);\n      height = Number(selectedStream.height);\n    }\n  } catch {\n    // The stable error below deliberately excludes raw ffprobe output.\n  }\n  if (!Number.isFinite(durationSeconds) || durationSeconds <= 0) {\n    throw new Error(\"Video runtime returned invalid duration metadata\");\n  }\n  if (durationSeconds > (options.maxDurationSeconds ?? 600)) {\n    throw new Error(\"Video exceeds the maximum duration\");\n  }\n  const formats = formatName\n    .toLowerCase()\n    .split(\",\")\n    .map((entry) => entry.trim())\n    .filter(Boolean);\n  if (formats.length === 0 || formats.some((entry) => !SAFE_FORMATS.has(entry))) {\n    throw new Error(\"Video container format is not allowed\");\n  }\n  if (playableVideoStreamCount === 0) {\n    throw new Error(\"Video container has no playable video stream\");\n  }\n  if (!allVideoStreamsSafe) {\n    throw new Error(\"Video stream metadata or dimensions exceed the safe processing limit\");\n  }\n  return { durationSeconds, formatName, height, streamIndex, width };\n}\n","sourceCodeStart":781,"sourceCodeEnd":817,"githubUrl":"https://github.com/diegosouzapw/OmniRoute/blob/a179ffed5bb2e0b883b9ae7214ce8717b2a94c4d/src/lib/guardrails/videoBridgeRuntime.ts#L781-L817","documentation":"Error \"Video exceeds the maximum duration\" thrown in diegosouzapw/OmniRoute.","triggerScenarios":"Thrown at src/lib/guardrails/videoBridgeRuntime.ts:799 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"}