@remotion/media-parser
available from v4.0.190
This is an experimental package that parses video and other media files in order to extract relevant metadata.
warning
Unstable API: This package is experimental. The API may change in the future.
The API for getting video metadata is stable and may be used in production.
Design goals:
- Support as many relevant containers as possible - currently:
.mp4
,.mov
,.webm
,.mkv
,.avi
,.ts
,.mp3
,.wav
,.aac
and.flac
. - Work in the browser, and server runtimes (Node.js, Bun, Edge, etc.)
- Enable powerful WebCodecs use cases
- Fine-grained querying, only download as much data as necessary
- Functional TypeScript API
- Be useful when passing unsupported media
- Solve problems that are relevant for Remotion users
Installation
- npm
- yarn
- pnpm
- bun
npm i --save-exact @remotion/media-parser@4.0.255
pnpm i @remotion/media-parser@4.0.255
bun i @remotion/media-parser@4.0.255
yarn --exact add @remotion/media-parser@4.0.255
Also update
remotion
and all `@remotion/*`
packages to the same version.Remove all
^
character in front of the version numbers of it as it can lead to a version conflict.Guide
Getting video metadata
Simple examples of extracting video metadata
Fast and slow operations
Efficently use parseMedia()
Pause, resume and abort
Steer the parsing process
Extract ID3 tags and EXIF data
Get embedded tags from video files
Format support
What you can parse with Media Parser
Runtime support
Where you can run Media Parser
WebCodecs
How Media Parser integrates with WebCodecs
APIs
The following APIs are available:
parseMedia()
Parse a media file.
downloadAndParseMedia()
Download and parse a media file.
mediaParserController()
Pause, resume and abort the parse.
nodeReader
Read a file from the local file system.
fetchReader
Read a file using
fetch()
.webFileReader
Read a file from
<input type="file">
.nodeWriter
Write a file to the local file system using Node.