Skip to main content

getDefaultAudioCodec()

Deprecated

Deprecated in favor of Mediabunny.

Part of the @remotion/webcodecs package.

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
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​