fetchReader
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 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 filetsx
import {parseMedia } from '@remotion/media-parser';import {fetchReader } from '@remotion/media-parser/fetch';constresult = awaitparseMedia ({src : '/Users/jonnyburger/Downloads/my-video.mp4',fields : {durationInSeconds : true,dimensions : true,},reader :fetchReader ,});