Chapter 685: Getting metadata from videos using @remotion/media-parser
Core Idea
:::warning Deprecated in favor of getting metadata using Mediabunny.
Key Concepts
- Not recommended anymore
- Getting metadata from a URL
- Getting metadata from a local path
- Getting metadata from a File
- Available fields
- Getting metadata as soon as possible
- See also
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 Getting metadata from videos using @remotion/media-parser from the official docs.
Key Takeaways
- Understand not recommended anymore when working with Getting metadata from videos using @remotion/media-parser.
- Understand getting metadata from a url when working with Getting metadata from videos using @remotion/media-parser.
- Understand getting metadata from a local path when working with Getting metadata from videos using @remotion/media-parser.
- Understand getting metadata from a file when working with Getting metadata from videos using @remotion/media-parser.
- Understand available fields when working with Getting metadata from videos using @remotion/media-parser.
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.