Guidance for handling audio and video files with Mediabunny, a multimedia library for the browser. The skill links Mediabunny’s compact llms.txt overview and gives three short recipes: audio duration in seconds, video duration in seconds, and video width and height.
Each recipe shows the URL source for the browser and Remotion’s staticFile, the file path source for Node.js and Bun, and the blob source for a File from an input or a drop.
What You Get
- A getAudioDuration function using computeDuration
- A getVideoDuration function using computeDuration
- A getVideoDimensions function reading displayWidth and displayHeight from the primary video track
- Notes for staticFile in Remotion, FilePathSource in Node.js and Bun, and BlobSource for File objects
- A link to Mediabunny’s llms.txt for a wider capability overview
Common Use Cases
- Setting a composition’s duration from a video file in calculateMetadata
- Sizing a composition to the source video’s dimensions
- Timing a scene to a narration audio file
- Reading metadata of a file a user dropped onto a page
What Makes It Unique
It gives ready recipes for the three metadata questions Remotion projects ask most often, in the Mediabunny API, which runs in the browser as well as on the server. It also reminds the agent to dispose of the input in Node.js and Bun to close the file handle.
Under The Hood
The skill is instructions with code samples and no scripts. The agent is pointed to the Mediabunny llms.txt page on the network and writes TypeScript that opens media files from a URL, a project file path or a File object. Reading a file path touches the local disk. The skill does not run commands of its own.