remotion-dev/remotion · error
No dimensions found for bRoll:
Error message
No dimensions found for bRoll:
What it means
getBRollDimensions fetches video metadata for a b-roll source with getVideoMetadata and needs dimensions to size the b-roll asset. When the returned metadata lacks a dimensions field, the function cannot proceed and throws, naming the offending source URL. This typically means the video could not be probed (unsupported/corrupt file) or the metadata did not include video tracks.
Solutions
- Verify bRoll.source is a valid, decodable video file with video dimensions (test in a browser `<video>` tag)
- Fix the URL: ensure the file exists, is served with correct MIME type, and is CORS-accessible
- Re-encode the asset to H.264/MP4 with a video track if the codec is unsupported
- Handle the error by falling back to explicit assetWidth/assetHeight supplied by the caller
Example fix
// before
const bRoll = {source: 'audio.mp3'}; // no video track
// after
const bRoll = {source: 'clip.mp4'}; // video with dimensions
// or validate first:
const meta = await getVideoMetadata({src: bRoll.source, includeDuration: false});
if (!meta.dimensions) throw new Error(`Unusable video: ${bRoll.source}`); Defensive patterns
Strategy: validation
Validate before calling
const meta = await getVideoMetadata({src: bRoll.source, includeDuration: false});
if (!meta.dimensions) {
throw new Error(`Source has no video dimensions: ${bRoll.source}`);
} Type guard
const hasDimensions = (m: Awaited<ReturnType<typeof getVideoMetadata>>): m is typeof m & {dimensions: {width: number; height: number}} =>
m.dimensions != null; Try / catch
try {
const dims = await getBRollDimensions(bRoll);
} catch (e) {
if (e.message.startsWith('No dimensions found for bRoll')) {
// fall back to default dimensions or skip the asset
}
} Prevention
- Only use real video files (with a video track) as b-roll sources
- Verify source URLs are reachable and CORS-enabled
- Re-encode unsupported codecs to H.264 MP4 before use
When it happens
Trigger: Calling getBRollDimensions with a bRoll.source pointing at a video whose getVideoMetadata result has no dimensions — e.g. an audio-only file, a corrupt or unsupported codec, or a src that failed to fully load.
Common situations: Pointing bRoll.source at an audio file or image instead of a video; a broken/404 or CORS-blocked URL; a video codec the browser cannot decode so no video track metadata is available.
Understand the failure class
Background: "missing required argument" and "the following required arguments were not provided": what required-argument errors mean and how to fix them — this error's family across 20 libraries.
Related errors
- A custom role ARN must either be "undefined" or a string…
- A "duration" of a spring is NaN, which it must not be
- A "duration" of a spring must be a "number" but is
- A "duration" of a spring must be finite, but is
- A "duration" of a spring must be positive, but is
AI-assisted analysis of remotion-dev/remotion@46a3a6bf13 (2026-09-18).
Data as JSON: /api/errors/0d4b7616c0151a4b.
Report an issue: GitHub.
Appendix: source
Thrown at packages/template-recorder/remotion/layout/get-broll-dimensions.ts:41
) {
const { width, height } = await getImageDimensions(bRoll.source);
return {
...bRoll,
type: "image",
assetWidth: width,
assetHeight: height,
};
}
if (
videoFileExtensions.some((ext) => bRoll.source.toLowerCase().endsWith(ext))
) {
const metadata = await getVideoMetadata({
src: bRoll.source,
includeDuration: false,
});
if (!metadata.dimensions) {
throw new Error("No dimensions found for bRoll: " + bRoll.source);
}
return {
...bRoll,
type: "video",
assetWidth: metadata.dimensions.width,
assetHeight: metadata.dimensions.height,
};
}
throw new Error(
`Unsupported file extension for bRoll: ${bRoll.source}. Only ${[...imageFileExtensions, ...videoFileExtensions].join(", ")} are supported.`,
);
};
View on GitHub (pinned to 46a3a6bf13)