{"record":{"id":"c893649943b40c89","repo":"diegosouzapw/OmniRoute","slug":"video-runtime-returned-invalid-duration-metadata","errorCode":null,"errorMessage":"Video runtime returned invalid duration metadata","messagePattern":"Video runtime returned invalid duration metadata","errorType":"exception","errorClass":"Error","httpStatus":null,"severity":"error","filePath":"src/lib/guardrails/videoBridgeRuntime.ts","lineNumber":796,"sourceCode":"          streamHeight > VIDEO_MAX_DIMENSION ||\n          streamWidth * streamHeight > VIDEO_MAX_PIXELS\n        );\n      });\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  }","sourceCodeStart":778,"sourceCodeEnd":814,"githubUrl":"https://github.com/diegosouzapw/OmniRoute/blob/a179ffed5bb2e0b883b9ae7214ce8717b2a94c4d/src/lib/guardrails/videoBridgeRuntime.ts#L778-L814","documentation":"Error \"Video runtime returned invalid duration metadata\" thrown in diegosouzapw/OmniRoute.","triggerScenarios":"Thrown at src/lib/guardrails/videoBridgeRuntime.ts:796 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"}