Skip to main content

Supported media

The <Audio> and <Video> tags from @remotion/media are based on Mediabunny and WebCodecs.

CORS

Any assets must be either CORS-enabled or served from the bundle using staticFile().

Supported formats and codecs

The supported formats and codecs are defined here: Mediabunny - Supported formats and codecs.

Apple ProRes decoding can be enabled from v4.0.487 using @mediabunny/prores. See Embedding ProRes.

Matroska limitation

Matroska-based files (.mkv, .webm) are supported, but for the audio to be extracted, the entire audio up to the point of extraction must be extracted as well because Matroska containers only store millisecond-precise timestamps in the container, but more precision is needed correctly concatenate audio parts.

For example: If you want to render the third minute of a 10 minute audio, the first 2 minutes of the audio must be decoded as well because only then the precise timestamps of the audio will be unveiled.

Prefer non-Matroska-based files (.mp4, .mov, .m4a) when you are doing distributed rendering (e.g. on Lambda) if possible.

Automatic fallback

If a media file cannot be decoded because of an unsupported codec, missing CORS support, or an alpha channel without browser WebGL support, then @remotion/media may automatically use fallback tags from the remotion package: <OffthreadVideo> for video and <Html5Audio> for audio.

This is automatic fallback behavior, not the default API choice for new code.

See: Fallback behavior in @remotion/media