Skip to main content

universalReader

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.

A reader for @remotion/media-parser that reads either from a URL, from a File or from a local file path.

It is the combination of nodeReader and webReader.

Because of the dependency on the fs module, it cannot be used in the browser.

Example

Reading from any source
tsx
import {parseMedia} from '@remotion/media-parser';
import {universalReader} from '@remotion/media-parser/universal';
 
const result = await parseMedia({
// Or a File, or a URL
src: '/Users/jonnyburger/Downloads/my-video.mp4',
fields: {
durationInSeconds: true,
dimensions: true,
},
reader: universalReader,
});

See also