Skip to content

πŸŽ₯ Make videos programmatically with React

Docs: Add DTS as a public Mediabunny extension

Jonny Burgerb0722bf0a51c
diff --git a/bun.lock b/bun.lock
index 2adb0cf234..354f2f4d5c 100644
--- a/bun.lock
+++ b/bun.lock
@@ -521,6 +521,7 @@
"@docusaurus/types": "3.10.1",
"@mdx-js/react": "3.0.1",
"@mediabunny/ac3": "catalog:",
+ "@mediabunny/dts": "catalog:",
"@mediabunny/prores": "catalog:",
"@radix-ui/react-dropdown-menu": "2.1.16",
"@react-three/fiber": "catalog:",
diff --git a/packages/cli/src/extra-packages.ts b/packages/cli/src/extra-packages.ts
index e8f51f3294..d9d28c4c84 100644
--- a/packages/cli/src/extra-packages.ts
+++ b/packages/cli/src/extra-packages.ts
@@ -13,7 +13,7 @@ export const EXTRA_PACKAGES_DOCS: Record<string, string> = {
mediabunny: 'https://www.remotion.dev/docs/mediabunny/version',
'@mediabunny/ac3':
'https://www.remotion.dev/docs/mediabunny/formats#ac-3-and-e-ac-3',
- '@mediabunny/dts': 'https://mediabunny.dev/guide/extensions/dts',
+ '@mediabunny/dts': 'https://www.remotion.dev/docs/mediabunny/formats#dts',
'@mediabunny/mp3-encoder': 'https://www.remotion.dev/docs/mediabunny/version',
'@mediabunny/aac-encoder': 'https://www.remotion.dev/docs/mediabunny/version',
'@mediabunny/flac-encoder':
diff --git a/packages/cli/src/test/upgrade-protocols.test.ts b/packages/cli/src/test/upgrade-protocols.test.ts
index 5ea8e1e44c..ee12f5e356 100644
--- a/packages/cli/src/test/upgrade-protocols.test.ts
+++ b/packages/cli/src/test/upgrade-protocols.test.ts
@@ -154,6 +154,7 @@ test('uses the Mediabunny version for extension packages', () => {
).toMatchObject({
mediabunny: '1.50.8',
'@mediabunny/ac3': '1.50.8',
+ '@mediabunny/dts': '1.50.8',
'@mediabunny/mp3-encoder': '1.50.8',
'@mediabunny/aac-encoder': '1.50.8',
'@mediabunny/flac-encoder': '1.50.8',
diff --git a/packages/docs/docs/mediabunny/formats.mdx b/packages/docs/docs/mediabunny/formats.mdx
index 3345b7e851..30a2c73498 100644
--- a/packages/docs/docs/mediabunny/formats.mdx
+++ b/packages/docs/docs/mediabunny/formats.mdx
@@ -82,6 +82,7 @@ For maximum performance, `@mediabunny/prores` uses shared-memory multithreading
- `'pcm-f64be'` - 64-bit big-endian float PCM
- `'ulaw'` - ΞΌ-law PCM
- `'alaw'` - A-law PCM
+- `'dts'` - DTS<AvailableFrom v="4.0.520" />
### AC-3 and E-AC-3<AvailableFrom v="4.0.427"/>
@@ -100,6 +101,23 @@ registerAc3Decoder();
registerAc3Encoder();
```
+### DTS<AvailableFrom v="4.0.520" />
+
+DTS is not natively supported by WebCodecs and is not enabled by default in [`@remotion/media`](/docs/media).
+
+If you need DTS support, [you can enable it yourself](https://mediabunny.dev/guide/extensions/dts) by installing and registering the extension:
+
+```bash
+npx remotion add @mediabunny/dts
+```
+
+```tsx twoslash title="src/Root.tsx"
+import {registerDtsDecoder, registerDtsEncoder} from '@mediabunny/dts';
+
+registerDtsDecoder();
+registerDtsEncoder();
+```
+
## Compatibility table
Not all codecs can be used with all containers. The following table specifies the supported codec-container combinations:
@@ -133,11 +151,14 @@ Not all codecs can be used with all containers. The following table specifies th
| `'alaw'` | | βœ“ | | | | | βœ“ | | | |
| `'ac3'` | βœ“ | βœ“ | βœ“ | | | | | | | βœ“ |
| `'eac3'` | βœ“ | βœ“ | βœ“ | | | | | | | βœ“ |
+| `'dts'` | βœ“ | βœ“ | βœ“ | | | | | | | βœ“ |
:::note
ProRes entries in the table above require [manual registration](#prores) of the `@mediabunny/prores` decoder.
AC-3 and E-AC-3 entries in the table above require [manual registration](#ac-3-and-e-ac-3) of the `@mediabunny/ac3` decoder.
+
+DTS entries in the table above require [manual registration](#dts) of the `@mediabunny/dts` decoder.
:::
## CORS
diff --git a/packages/docs/package.json b/packages/docs/package.json
index 0f617e5b2f..bfb6984394 100644
--- a/packages/docs/package.json
+++ b/packages/docs/package.json
@@ -37,6 +37,7 @@
"@docusaurus/types": "3.10.1",
"@mdx-js/react": "3.0.1",
"@mediabunny/ac3": "catalog:",
+ "@mediabunny/dts": "catalog:",
"@mediabunny/prores": "catalog:",
"@radix-ui/react-dropdown-menu": "2.1.16",
"@react-three/fiber": "catalog:",
diff --git a/packages/studio-shared/src/package-info.ts b/packages/studio-shared/src/package-info.ts
index 57985e655c..9ff29556df 100644
--- a/packages/studio-shared/src/package-info.ts
+++ b/packages/studio-shared/src/package-info.ts
@@ -143,7 +143,7 @@ export const extraPackages: ExtraPackage[] = [
name: '@mediabunny/dts',
version: '1.55.5',
description: 'DTS audio codec support for Mediabunny',
- docsUrl: 'https://mediabunny.dev/guide/extensions/dts',
+ docsUrl: 'https://www.remotion.dev/docs/mediabunny/formats#dts',
},
{
name: '@mediabunny/prores',