Skip to main content

fetchReader

warning

Unstable API: This package is experimental. We might change the API at any time, until we remove this notice.

A reader for @remotion/media-parser that reads from a URL using fetch().
It works in the browser, Node.js and Bun.
This is the default reader for @remotion/media-parser, so you don't need to explicitly specify it.

Example

Reading a local file
tsx
import {parseMedia} from '@remotion/media-parser';
import {fetchReader} from '@remotion/media-parser/fetch';
 
const result = await parseMedia({
src: '/Users/jonnyburger/Downloads/my-video.mp4',
fields: {
durationInSeconds: true,
dimensions: true,
},
reader: fetchReader,
});
Reading a local file
tsx
import {parseMedia} from '@remotion/media-parser';
import {fetchReader} from '@remotion/media-parser/fetch';
 
const result = await parseMedia({
src: '/Users/jonnyburger/Downloads/my-video.mp4',
fields: {
durationInSeconds: true,
dimensions: true,
},
reader: fetchReader,
});