Skip to main content

universalReader

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

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