Mediabunny支持的格式和编解码器
Remotion 的以下功能正在使用 Mediabunny:
🌐 The following features from Remotion are using Mediabunny:
因此,格式支持取决于 Mediabunny 支持的格式和编解码器。 Mediabunny 的兼容性数据在此页面上有镜像。
🌐 Therefore, format support is bound to the formats and codecs supported by Mediabunny. Mediabunny's compatibility data is mirrored on this page.
支持的容器格式
🌐 Supported container formats
- 基于 ISOBMFF 的格式(
.mp4、.m4v、.m4a、...) - QuickTime 文件格式(
.mov) - Matroska(
.mkv) - WebM(
.webm) - Ogg(
.ogg) - MP3(
.mp3) - WAVE(
.wav) - ADTS(
.aac) - FLAC(
.flac) - MPEG传输流(
.ts)
视频编解码器
🌐 Video codecs
'avc'- 高级视频编码(AVC)/ H.264'hevc'- 高效率视频编码 (HEVC) / H.265
Chrome 无头模式下不支持 HEVC。 这意味着在服务器端渲染 Remotion 视频时,无法使用 <Video> 从 @remotion/media 解码 HEVC 视频。
'vp8'- VP8'vp9'- VP9'av1'- AOMedia 视频 1 (AV1)
音频编解码器
🌐 Audio codecs
'aac'- 高级音频编码 (AAC)'opus'- 作品'mp3'- MP3'vorbis'- Vorbis'flac'- 自由无损音频编解码器 (FLAC)'pcm-u8'- 8位无符号PCM'pcm-s8'- 8位有符号PCM'pcm-s16'- 16位小端有符号PCM'pcm-s16be'- 16位大端有符号PCM'pcm-s24'- 24位小端有符号PCM'pcm-s24be'- 24位大端有符号PCM'pcm-s32'- 32位小端有符号PCM'pcm-s32be'- 32位大端有符号PCM'pcm-f32'- 32位小端浮点PCM'pcm-f32be'- 32位大端浮点PCM'pcm-f64'- 64位小端浮点PCM'pcm-f64be'- 64位大端浮点PCM'ulaw'- μ律 PCM'alaw'- A律 PCM
AC-3 和 E-AC-3v4.0.427
🌐 AC-3 and E-AC-3v4.0.427
AC-3(Dolby Digital)和 E-AC-3(Dolby Digital Plus)在 WebCodecs 中不被原生支持,并且在 @remotion/media 中默认未启用。
🌐 AC-3 (Dolby Digital) and E-AC-3 (Dolby Digital Plus) are not natively supported by WebCodecs and are not enabled by default in @remotion/media.
如果你需要 AC-3/E-AC-3 支持,你可以通过安装并注册解码器 自行启用它:
🌐 If you need AC-3/E-AC-3 support, you can enable it yourself by installing and registering the decoder:
npx remotion add @mediabunny/ac3src/Root.tsximport {registerAc3Decoder, registerAc3Encoder} from '@mediabunny/ac3'; registerAc3Decoder(); registerAc3Encoder();
兼容性表
🌐 Compatibility table
并非所有编解码器都可以与所有容器一起使用。下表列出了支持的编解码器-容器组合:
🌐 Not all codecs can be used with all containers. The following table specifies the supported codec-container combinations:
| .mp4 | .mov | .mkv | .webm | .ogg | .mp3 | .wav | .aac | .flac | .ts | |
|---|---|---|---|---|---|---|---|---|---|---|
'avc' | ✓ | ✓ | ✓ | ✓ | ||||||
'hevc' | ✓ | ✓ | ✓ | ✓ | ||||||
'vp8' | ✓ | ✓ | ✓ | ✓ | ||||||
'vp9' | ✓ | ✓ | ✓ | ✓ | ||||||
'av1' | ✓ | ✓ | ✓ | ✓ | ||||||
'aac' | ✓ | ✓ | ✓ | ✓ | ✓ | |||||
'opus' | ✓ | ✓ | ✓ | ✓ | ✓ | |||||
'mp3' | ✓ | ✓ | ✓ | ✓ | ✓ | |||||
'vorbis' | ✓ | ✓ | ✓ | ✓ | ✓ | |||||
'flac' | ✓ | ✓ | ✓ | ✓ | ||||||
'pcm-u8' | ✓ | ✓ | ✓ | |||||||
'pcm-s8' | ✓ | |||||||||
'pcm-s16' | ✓ | ✓ | ✓ | ✓ | ||||||
'pcm-s16be' | ✓ | ✓ | ✓ | |||||||
'pcm-s24' | ✓ | ✓ | ✓ | ✓ | ||||||
'pcm-s24be' | ✓ | ✓ | ✓ | |||||||
'pcm-s32' | ✓ | ✓ | ✓ | ✓ | ||||||
'pcm-s32be' | ✓ | ✓ | ✓ | |||||||
'pcm-f32' | ✓ | ✓ | ✓ | ✓ | ||||||
'pcm-f32be' | ✓ | ✓ | ||||||||
'pcm-f64' | ✓ | ✓ | ✓ | |||||||
'pcm-f64be' | ✓ | ✓ | ||||||||
'ulaw' | ✓ | ✓ | ||||||||
'alaw' | ✓ | ✓ | ||||||||
'ac3' | ✓ | ✓ | ✓ | ✓ | ||||||
'eac3' | ✓ | ✓ | ✓ | ✓ |
上表中的 AC-3 和 E-AC-3 条目需要对 @mediabunny/ac3 解码器进行手动注册。
跨域资源共享
🌐 CORS
所有媒体文件必须启用 CORS,或者使用 staticFile() 从打包包中提供。
🌐 All media files must be either CORS-enabled or served from the bundle using staticFile().
另请参阅
🌐 See also