diegosouzapw/OmniRoute · error
Inline video exceeds the maximum size
Error message
Inline video exceeds the maximum size
What it means
Error "Inline video exceeds the maximum size" thrown in diegosouzapw/OmniRoute.
Source
Thrown at src/lib/guardrails/videoBridgeHelpers.ts:480
const padding = normalized.endsWith("==") ? 2 : normalized.endsWith("=") ? 1 : 0;
return (normalized.length / 4) * 3 - padding;
}
export function estimateDecodedBase64Bytes(base64: string): number {
return estimateNormalizedBase64Bytes(normalizeBase64(base64));
}
export function decodeVideoDataUri(
ref: string,
maxBytes = VIDEO_BRIDGE_INLINE_MAX_BYTES,
decode: (base64: string) => Buffer = (base64) => Buffer.from(base64, "base64")
): Buffer | null {
const match = /^data:video\/[A-Za-z0-9.+-]+;base64,([A-Za-z0-9+/=\s]+)$/i.exec(ref);
if (!match) return null;
const normalized = normalizeBase64(match[1]);
const estimatedBytes = estimateNormalizedBase64Bytes(normalized);
if (estimatedBytes > maxBytes) {
throw new Error("Inline video exceeds the maximum size");
}
return decode(normalized);
}
/**
* Load protected video bytes from an inline data URI or SSRF-guarded HTTPS source.
*
* @param part - Extracted request video part.
* @param maxBytes - Maximum accepted decoded/downloaded size.
* @param timeoutMs - Download deadline passed to the protected fetch boundary.
* @param signal - Caller abort/deadline signal.
* @param deps - Injectable external download boundary.
* @returns Validated video bytes suitable for hashing and extraction.
* @throws When the source, size, deadline, or abort policy rejects the input.
*/
export async function loadVideoPartBytes(
part: VideoPart,
maxBytes: number,View on GitHub (pinned to a179ffed5b)
When it happens
Trigger: Thrown at src/lib/guardrails/videoBridgeHelpers.ts:480 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/a8d4446bb7a9fd8a.
Report an issue: GitHub.