affaan-m/ECC · error
No video track found
Error message
No video track found
What it means
Example from the mediabunny get-video-dimensions rule: getPrimaryVideoTrack() on the opened Input returned no track, so displayWidth/displayHeight cannot be read. The supplied src is audio-only or otherwise has no primary video track.
Source
Thrown at skills/remotion-video-creation/rules/get-video-dimensions.md:27
Mediabunny can extract the width and height of a video file. It works in browser, Node.js, and Bun environments.
## Getting video dimensions
```tsx
import { Input, ALL_FORMATS, UrlSource } from "mediabunny";
export const getVideoDimensions = async (src: string) => {
const input = new Input({
formats: ALL_FORMATS,
source: new UrlSource(src, {
getRetryDelay: () => null,
}),
});
const videoTrack = await input.getPrimaryVideoTrack();
if (!videoTrack) {
throw new Error("No video track found");
}
return {
width: videoTrack.displayWidth,
height: videoTrack.displayHeight,
};
};
```
## Usage
```tsx
const dimensions = await getVideoDimensions("https://remotion.media/video.mp4");
console.log(dimensions.width); // e.g. 1920
console.log(dimensions.height); // e.g. 1080
```
## Using with local filesView on GitHub (pinned to d8409a4b08)
Solutions
- Verify the file is a video before requesting dimensions
- Fall back to probing with ffprobe when mediabunny finds no track
- Throw a descriptive error naming the offending src so callers can filter inputs
Defensive patterns
Strategy: validation
When it happens
Trigger: Thrown at skills/remotion-video-creation/rules/get-video-dimensions.md:27 when the library encounters an invalid state.
Common situations: See trigger scenarios.
AI-assisted analysis of affaan-m/ECC@d8409a4b08 (2026-08-26).
Data as JSON: /api/errors/46fd19fbb263dc99.
Report an issue: GitHub.