mirror of
https://github.com/arcodange-org/mediabunny.git
synced 2026-10-09 08:43:49 +02:00
Define DTS codec, add muxing and demuxing support across ISOBMFF, Matroska, and MPEG-TS, add DTS encode/decode support to @mediabunny/server
This commit is contained in:
@@ -51,6 +51,7 @@ Mediabunny ships with built-in decoders and encoders for all audio PCM codecs, m
|
||||
- `'flac'` - Free Lossless Audio Codec (FLAC) [^flac]
|
||||
- `'ac3'` - Dolby Digital (AC-3) [^ac3]
|
||||
- `'eac3'` - Dolby Digital Plus (E-AC-3) [^ac3]
|
||||
- `'dts'` - DTS Coherent Acoustics [^dts]
|
||||
- `'pcm-u8'` - 8-bit unsigned PCM
|
||||
- `'pcm-s8'` - 8-bit signed PCM
|
||||
- `'pcm-s16'` - 16-bit little-endian signed PCM
|
||||
@@ -89,6 +90,7 @@ Not all codecs can be used with all containers. The following table specifies th
|
||||
| `'flac'` | ✓ | ✓ | ✓ | | | | | | ✓ | |
|
||||
| `'ac3'` | ✓ | ✓ | ✓ | | | | | | | ✓ |
|
||||
| `'eac3'` | ✓ | ✓ | ✓ | | | | | | | ✓ |
|
||||
| `'dts'` | ✓ | ✓ | ✓ | | | | | | | ✓ |
|
||||
| `'pcm-u8'` | | ✓ | ✓ | | | | ✓ | | | |
|
||||
| `'pcm-s8'` | | ✓ | | | | | | | | |
|
||||
| `'pcm-s16'` | ✓ | ✓ | ✓ | | | | ✓ | | | |
|
||||
@@ -112,6 +114,7 @@ For HLS, the supported codecs depend on the segment format chosen.
|
||||
[^mp3]: MP3 encoding is not supported by WebCodecs. You can polyfill it with the [`@mediabunny/mp3-encoder`](./extensions/mp3-encoder) extension package.
|
||||
[^flac]: FLAC encoding is not supported by WebCodecs. You can polyfill it with the [`@mediabunny/flac-encoder`](./extensions/flac-encoder) extension package.
|
||||
[^ac3]: AC-3 and E-AC-3 are not natively supported by WebCodecs. To encode or decode these codecs, you can use the [`@mediabunny/ac3`](./extensions/ac3) extension package.
|
||||
[^dts]: DTS is not supported by WebCodecs. The [`@mediabunny/server`](./extensions/server) extension package provides both decoding and encoding support for server-side environments.
|
||||
[^webm]: WebM only supports a small subset of the codecs supported by Matroska. However, this library can technically read all codecs from a WebM that are supported by Matroska.
|
||||
[^webvtt]: WebVTT can only be written, not read.
|
||||
|
||||
@@ -127,7 +130,7 @@ import { canEncode } from 'mediabunny';
|
||||
canEncode('avc'); // => Promise<boolean>
|
||||
canEncode('opus'); // => Promise<boolean>
|
||||
```
|
||||
Video codecs are checked using 1280x720 @1Mbps, while audio codecs are checked using 2 channels, 48 kHz @128kbps.
|
||||
Video codecs are checked using 1280x720, while audio codecs are checked using 2 channels at 48 kHz.
|
||||
|
||||
You can also check encodability using specific configurations:
|
||||
```ts
|
||||
|
||||
Reference in New Issue
Block a user