diegosouzapw/OmniRoute · error

Extracted video frame byte limit exceeded

Error message

Extracted video frame byte limit exceeded

What it means

Error "Extracted video frame byte limit exceeded" thrown in diegosouzapw/OmniRoute.

Source

Thrown at src/lib/guardrails/videoBridgeRuntime.ts:937

      { signal: options.signal, timeoutMs: options.timeoutMs ?? 120_000 }
    );
    frames.push({ path: outputPath, timestampSeconds });
  }
  return frames;
}

export async function readBoundedExtractedFrames(
  frames: readonly VideoFrameFile[],
  options: { maxFrameBytes?: number; maxTotalBytes?: number } = {}
): Promise<Buffer[]> {
  const maxFrameBytes = options.maxFrameBytes ?? VIDEO_FRAME_MAX_BYTES;
  const maxTotalBytes = options.maxTotalBytes ?? VIDEO_FRAMES_TOTAL_MAX_BYTES;
  let totalBytes = 0;
  const sizes: number[] = [];
  for (const frame of frames) {
    const metadata = await stat(frame.path);
    if (!metadata.isFile() || metadata.size < 1 || metadata.size > maxFrameBytes) {
      throw new Error("Extracted video frame byte limit exceeded");
    }
    totalBytes += metadata.size;
    if (totalBytes > maxTotalBytes) {
      throw new Error("Extracted video total frame byte limit exceeded");
    }
    sizes.push(metadata.size);
  }

  const output: Buffer[] = [];
  for (let index = 0; index < frames.length; index++) {
    const bytes = await readFile(frames[index].path);
    if (bytes.byteLength !== sizes[index]) {
      throw new Error("Extracted video frame changed before it could be read");
    }
    output.push(bytes);
  }
  return output;
}

View on GitHub (pinned to a179ffed5b)

When it happens

Trigger: Thrown at src/lib/guardrails/videoBridgeRuntime.ts:937 when the library encounters an invalid state.

Common situations: See trigger scenarios.


AI-assisted analysis of diegosouzapw/OmniRoute@a179ffed5b (2026-08-25). Data as JSON: /api/errors/9240bc03463e9422. Report an issue: GitHub.