Chapter 688: parseMedia()
Core Idea
:::info Deprecated Deprecated in favor of getting metadata using Mediabunny.
Key Concepts
- Examples
- API
- src
- fields?
- reader?
- controller?
- onVideoTrack?
- onAudioTrack?
Code Examples
const result = await parseMedia({
src: 'https://remotion.media/video.mp4',
fields: {
durationInSeconds: true,
dimensions: true,
},
});
console.log(result.durationInSeconds); // 10
console.log(result.dimensions); // {width: 1920, height: 1080}
- What it demonstrates: Usage pattern for parseMedia() from the official docs.
Key Takeaways
- Understand examples when working with parseMedia().
- Understand api when working with parseMedia().
- Understand src when working with parseMedia().
- Understand fields? when working with parseMedia().
- Understand reader? when working with parseMedia().
Connects To
- Download and Parse: related page in the Media Parser (@remotion/media-parser) section.
- Download and Parse Media: related page in the Media Parser (@remotion/media-parser) section.
- Fast and Slow: related page in the Media Parser (@remotion/media-parser) section.