remotion-dev/skillsPrüfung bestanden
SKILL DETAIL
remotion-multimedia
remotion-dev/skills/remotion-multimedia
This skill provides guidance on using the Mediabunny multimedia library for working with audio and video in the browser. Mediabunny is a multimedia library for dealing with audio and video in the browser. The skill covers getting the duration of an audio file in seconds, getting the width and height of a video file, and getting the duration of a video file in seconds.
Installationen · 5.963Quelle ansehen
Installation
npx skills add https://github.com/remotion-dev/skills --skill remotion-multimedia
Skill-Dateien
SKILL.md
Zuletzt synchronisiert · 22.10.2026
agents/openai.yaml›
interface:
display_name: '/remotion-multimedia'
short_description: 'Inspect browser-based audio and video media'
icon_small: './assets/remotion-icon.svg'
icon_large: './assets/remotion-icon.svg'
brand_color: '#0B84F3'
default_prompt: '$remotion-multimedia: Make my video the same duration as the footage'
assets/remotion-icon.svg›
<svg width="100" height="100" viewBox="20 30 363 363" xmlns="http://www.w3.org/2000/svg">
<title>Remotion</title>
<path d="M148.332 92.9015C143.307 93.1742 139.259 93.9713 135.179 95.5236C133.144 96.2893 129.809 97.957 127.973 99.1108C120.295 103.925 114.443 111.162 111.391 119.584C110.782 121.252 109.136 126.57 108.076 130.23C101.018 154.7 97.0112 181.456 96.1511 209.776C96.0148 214.286 96.0148 225.026 96.1511 229.463C96.728 248.237 98.5216 265.187 101.773 282.472C103.095 289.468 105.213 298.866 106.44 303.135C108.947 311.809 114.065 319.193 121.344 324.605C126.221 328.234 131.759 330.668 137.895 331.863C140.853 332.44 144.755 332.702 147.629 332.514C151.604 332.251 159.491 331.192 165.9 330.049C194.786 324.899 221.469 315.679 245.666 302.485C260.99 294.125 274.09 285.074 286.729 274.092C299.326 263.163 310.066 251.405 319.516 238.21C321.708 235.158 322.81 233.375 323.911 231.131C326.743 225.341 328.075 219.583 328.064 213.143C328.064 207.143 326.932 201.815 324.488 196.361C323.313 193.728 322.191 191.84 319.674 188.253C310.402 175.048 300.112 163.542 287.568 152.361C268.122 135.034 245.026 120.822 219.235 110.302C213.644 108.026 208.138 106.022 201.509 103.851C187.475 99.2681 170.106 95.2929 155.411 93.3105C153.104 92.9959 149.968 92.8176 148.332 92.9015Z" fill="#0B84F3"/>
</svg>
get-audio-duration.md›
---
name: get-audio-duration
description: Getting the duration of an audio file in seconds with Mediabunny
metadata:
tags: duration, audio, length, time, seconds, mp3, wav
---
# Getting audio duration with Mediabunny
Mediabunny can extract the duration of an audio file. It works in browser, Node.js, and Bun environments.
## Getting audio duration
```tsx title="get-audio-duration.ts"
import { Input, ALL_FORMATS, UrlSource } from "mediabunny";
export const getAudioDuration = async (src: string) => {
const input = new Input({
formats: ALL_FORMATS,
source: new UrlSource(src),
});
const durationInSeconds = await input.computeDuration();
return durationInSeconds;
};
```
## Usage
```tsx
const duration = await getAudioDuration("https://remotion.media/audio.mp3");
console.log(duration); // e.g. 180.5 (seconds)
```
## Using with staticFile in Remotion
Make sure to wrap the file path in `staticFile()`:
```tsx
import { staticFile } from "remotion";
const duration = await getAudioDuration(staticFile("audio.mp3"));
```
## In Node.js and Bun
Use `FilePathSource` instead of `UrlSource` to read a file from disk:
```tsx
import { Input, ALL_FORMATS, FilePathSource } from "mediabunny";
const input = new Input({
formats: ALL_FORMATS,
source: new FilePathSource("audio.mp3"),
});
const durationInSeconds = await input.computeDuration();
input.dispose(); // Closes the file handle
```
For a `File` from a file input or drag and drop, use `new BlobSource(file)` instead.
get-video-dimensions.md›
---
name: get-video-dimensions
description: Getting the width and height of a video file with Mediabunny
metadata:
tags: dimensions, width, height, resolution, size, video
---
# Getting video dimensions with Mediabunny
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),
});
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 files
For a `File` from a file input or drag and drop, use `BlobSource` instead of `UrlSource`:
```tsx
import { Input, ALL_FORMATS, BlobSource } from "mediabunny";
const input = new Input({
formats: ALL_FORMATS,
source: new BlobSource(file), // File object from input or drag-drop
});
const videoTrack = await input.getPrimaryVideoTrack();
if (!videoTrack) {
throw new Error("No video track found");
}
const width = videoTrack.displayWidth;
const height = videoTrack.displayHeight;
```
In Node.js and Bun, use `new FilePathSource(path)` to read a file from disk, and call `input.dispose()` when done.
## Using with staticFile in Remotion
```tsx
import { staticFile } from "remotion";
const dimensions = await getVideoDimensions(staticFile("video.mp4"));
```
get-video-duration.md›
---
name: get-video-duration
description: Getting the duration of a video file in seconds with Mediabunny
metadata:
tags: duration, video, length, time, seconds
---
# Getting video duration with Mediabunny
Mediabunny can extract the duration of a video file. It works in browser, Node.js, and Bun environments.
## Getting video duration
```tsx
import { Input, ALL_FORMATS, UrlSource } from "mediabunny";
export const getVideoDuration = async (src: string) => {
const input = new Input({
formats: ALL_FORMATS,
source: new UrlSource(src),
});
const durationInSeconds = await input.computeDuration();
return durationInSeconds;
};
```
## Usage
```tsx
const duration = await getVideoDuration("https://remotion.media/video.mp4");
console.log(duration); // e.g. 10.5 (seconds)
```
## Video files from the public/ directory
Make sure to wrap the file path in `staticFile()`:
```tsx
import { staticFile } from "remotion";
const duration = await getVideoDuration(staticFile("video.mp4"));
```
## In Node.js and Bun
Use `FilePathSource` instead of `UrlSource` to read a file from disk:
```tsx
import { Input, ALL_FORMATS, FilePathSource } from "mediabunny";
const input = new Input({
formats: ALL_FORMATS,
source: new FilePathSource("video.mp4"),
});
const durationInSeconds = await input.computeDuration();
input.dispose(); // Closes the file handle
```
For a `File` from a file input or drag and drop, use `new BlobSource(file)` instead.
SKILL.md›
---
name: remotion-multimedia
description: Interacting with Mediabunny
version: 4.0.537
---
Mediabunny is a multimedia library for dealing with audio and video in the browser.
Here is a compact overview of its capabilities: https://mediabunny.dev/llms.txt
## Getting audio duration
See [get-audio-duration.md](get-audio-duration.md) for getting the duration of an audio file in seconds with Mediabunny.
## Getting video dimensions
See [get-video-dimensions.md](get-video-dimensions.md) for getting the width and height of a video file with Mediabunny.
## Getting video duration
See [get-video-duration.md](get-video-duration.md) for getting the duration of a video file in seconds with Mediabunny.