Skip to main content

getDefaultAudioCodec()

属于 @remotion/webcodecs 软件包的一部分.

🌐 Part of the @remotion/webcodecs package.

warning

不稳定的 API:此软件包处于实验阶段。在我们移除此提示之前,API 可能随时更改。

获取 @remotion/webcodecs 使用的容器的默认音频编解码器,如果未指定其他音频编解码器。

🌐 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'

目前,唯一支持的容器是 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