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 sourcetsx
import {parseMedia } from '@remotion/media-parser';import {universalReader } from '@remotion/media-parser/universal';constresult = awaitparseMedia ({// Or a File, or a URLsrc : '/Users/jonnyburger/Downloads/my-video.mp4',fields : {durationInSeconds : true,dimensions : true,},reader :universalReader ,});