Skip to main content

getEncodableVideoCodecs()

warning

Very experimental feature - expect bugs and breaking changes at any time.
Track progress on GitHub and discuss in the #web-renderer channel on Discord.

Part of the @remotion/web-renderer package.

Returns the video codecs that the current browser can encode for a given container format.

Use this function to dynamically show users which video codecs are available in their browser.

Example usage
tsx
import {getEncodableVideoCodecs} from '@remotion/web-renderer';
 
const codecs = await getEncodableVideoCodecs('mp4');
console.log(codecs); // e.g. ['h264', 'h265', 'av1']

Arguments

container

string WebRendererContainer - required

The container format: "mp4" or "webm".

options?

object GetEncodableVideoCodecsOptions

Optional configuration object.

videoBitrate?

number | string WebRendererQuality

A number (bits per second) or quality preset ("very-low", "low", "medium", "high", "very-high").

Return value

Returns a Promise<WebRendererVideoCodec[]> - an array of video codec identifiers that the browser can encode.

Possible values: "h264", "h265", "vp8", "vp9", "av1"

See also