From 66185fed159cf951c5868aa6129cf860237ed2c7 Mon Sep 17 00:00:00 2001 From: Vanilagy <1696106+Vanilagy@users.noreply.github.com> Date: Thu, 5 Mar 2026 11:49:27 +0100 Subject: [PATCH] Clean up & clarify --- docs/guide/extensions/flac-encoder.md | 2 +- docs/guide/supported-formats-and-codecs.md | 25 +++++++++++----------- 2 files changed, 14 insertions(+), 13 deletions(-) diff --git a/docs/guide/extensions/flac-encoder.md b/docs/guide/extensions/flac-encoder.md index c2f2ee9..34ae4d7 100644 --- a/docs/guide/extensions/flac-encoder.md +++ b/docs/guide/extensions/flac-encoder.md @@ -1,6 +1,6 @@ # @mediabunny/flac-encoder -No browser currently supports FLAC encoding in their WebCodecs implementations. This extension package provides a reliable FLAC encoder for use with Mediabunny. It is implemented using Mediabunny's [custom coder API](../supported-formats-and-codecs#custom-coders) and uses a fast, size-optimized WASM build of [libFLAC](https://github.com/xiph/flac) (the reference FLAC encoder) under the hood. +No browser currently supports FLAC encoding in their WebCodecs implementations. This extension package provides a reliable FLAC encoder for use with Mediabunny. It is implemented using Mediabunny's [custom coder API](../supported-formats-and-codecs#custom-coders) and uses a fast, size-optimized WASM build of [libFLAC](https://github.com/xiph/flac) under the hood. GitHub page diff --git a/docs/guide/supported-formats-and-codecs.md b/docs/guide/supported-formats-and-codecs.md index 1e2f5c3..553facd 100644 --- a/docs/guide/supported-formats-and-codecs.md +++ b/docs/guide/supported-formats-and-codecs.md @@ -37,13 +37,13 @@ Mediabunny ships with built-in decoders and encoders for all audio PCM codecs, m ### Audio codecs -- `'aac'` - Advanced Audio Coding (AAC) [^1] +- `'aac'` - Advanced Audio Coding (AAC) [^aac] - `'opus'` - Opus -- `'mp3'` - MP3 [^2] +- `'mp3'` - MP3 [^mp3] - `'vorbis'` - Vorbis -- `'flac'` - Free Lossless Audio Codec (FLAC) -- `'ac3'` - Dolby Digital (AC-3) [^3] -- `'eac3'` - Dolby Digital Plus (E-AC-3) [^3] +- `'flac'` - Free Lossless Audio Codec (FLAC) [^flac] +- `'ac3'` - Dolby Digital (AC-3) [^ac3] +- `'eac3'` - Dolby Digital Plus (E-AC-3) [^ac3] - `'pcm-u8'` - 8-bit unsigned PCM - `'pcm-s8'` - 8-bit signed PCM - `'pcm-s16'` - 16-bit little-endian signed PCM @@ -67,7 +67,7 @@ Mediabunny ships with built-in decoders and encoders for all audio PCM codecs, m Not all codecs can be used with all containers. The following table specifies the supported codec-container combinations: -| | .mp4 | .mov | .mkv | .webm[^4] | .ogg | .mp3 | .wav | .aac | .flac | .ts | +| | .mp4 | .mov | .mkv | .webm[^webm] | .ogg | .mp3 | .wav | .aac | .flac | .ts | |:--------------:|:--------:|:-----:|:-----:|:---------:|:-----:|:-----:|:-----:|:-----:|:-----:|:-----:| | `'avc'` | ✓ | ✓ | ✓ | | | | | | | ✓ | | `'hevc'` | ✓ | ✓ | ✓ | | | | | | | ✓ | @@ -95,13 +95,14 @@ Not all codecs can be used with all containers. The following table specifies th | `'pcm-f64be'` | ✓ | ✓ | | | | | | | | | | `'ulaw'` | | ✓ | | | | | ✓ | | | | | `'alaw'` | | ✓ | | | | | ✓ | | | | -| `'webvtt'`[^5] | (✓) | | (✓) | (✓) | | | | | | | +| `'webvtt'`[^webvtt] | (✓) | | (✓) | (✓) | | | | | | | -[^1]: In some browsers, AAC encoding is not supported by WebCodecs. You can polyfill it with the [`@mediabunny/aac-encoder`](./extensions/aac-encoder) extension package, or provide your own [custom coder](#custom-coders). -[^2]: MP3 encoding is not supported by WebCodecs. You can polyfill it with the [`@mediabunny/mp3-encoder`](./extensions/mp3-encoder) extension package, or provide your own [custom coder](#custom-coders). -[^3]: 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, or provide your own [custom coder](#custom-coders). -[^4]: 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. -[^5]: WebVTT can only be written, not read. +[^aac]: In some browsers, AAC encoding is not supported by WebCodecs. You can polyfill it with the [`@mediabunny/aac-encoder`](./extensions/aac-encoder) extension package. +[^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. +[^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. ## Querying codec encodability