Skip to main content

getDefaultAudioCodec()

Part of the @remotion/webcodecs package.

warning

Unstable API: This package is experimental. We might change the API at any time, until we remove this notice.

Gets the default audio codec for a container that @remotion/webcodecs uses if no other audio codec was specified.

Get the default audio codec for a container
tsx
import {getDefaultAudioCodec} from '@remotion/webcodecs';
 
getDefaultAudioCodec({container: 'webm'}); // 'opus'
Get the default audio codec for a container
tsx
import {getDefaultAudioCodec} from '@remotion/webcodecs';
 
getDefaultAudioCodec({container: 'webm'}); // 'opus'

Currently, the only supported container is webm, for which the default audio codec is opus.

Default audio codecs

ContainerDefault audio codec
webm"opus"
mp4"aac"
wav"wav"

See also