Skip to content

🎥 Make videos programmatically with React

Align Transformers auxiliary package handling

JonnyBurger321f6689625c
diff --git a/packages/cli/src/extra-packages.ts b/packages/cli/src/extra-packages.ts
index 86bc563094..91ddcebb9a 100644
--- a/packages/cli/src/extra-packages.ts
+++ b/packages/cli/src/extra-packages.ts
@@ -10,15 +10,11 @@ export const EXTRA_PACKAGES: Record<string, string> = {
};
export const EXTRA_PACKAGES_DOCS: Record<string, string> = {
- '@huggingface/transformers': 'https://www.remotion.dev/docs/whisper-webgpu',
- 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://www.remotion.dev/docs/mediabunny/formats#dts',
+ ...Object.fromEntries(
+ extraPackages.map(({name, versionDocsUrl}) => [name, versionDocsUrl]),
+ ),
'@mediabunny/mp3-encoder': 'https://www.remotion.dev/docs/mediabunny/version',
'@mediabunny/aac-encoder': 'https://www.remotion.dev/docs/mediabunny/version',
'@mediabunny/flac-encoder':
'https://www.remotion.dev/docs/mediabunny/version',
- '@mediabunny/prores': 'https://www.remotion.dev/docs/mediabunny/formats',
- zod: 'https://www.remotion.dev/docs/zod-types/',
};
diff --git a/packages/cli/src/test/extra-packages.test.ts b/packages/cli/src/test/extra-packages.test.ts
index 2bd4e6dd08..b497717ed7 100644
--- a/packages/cli/src/test/extra-packages.test.ts
+++ b/packages/cli/src/test/extra-packages.test.ts
@@ -1,10 +1,11 @@
import {expect, test} from 'bun:test';
import {extraPackages} from '@remotion/studio-shared';
-import {EXTRA_PACKAGES} from '../extra-packages';
+import {EXTRA_PACKAGES, EXTRA_PACKAGES_DOCS} from '../extra-packages';
test('uses the shared recommended versions for auxiliary packages', () => {
- for (const {name, version} of extraPackages) {
+ for (const {name, version, versionDocsUrl} of extraPackages) {
expect(EXTRA_PACKAGES[name]).toBe(version);
+ expect(EXTRA_PACKAGES_DOCS[name]).toBe(versionDocsUrl);
}
expect(EXTRA_PACKAGES['@huggingface/transformers']).toBe('4.2.0');
diff --git a/packages/cli/src/test/upgrade-protocols.test.ts b/packages/cli/src/test/upgrade-protocols.test.ts
index ffd10881ab..54332e3513 100644
--- a/packages/cli/src/test/upgrade-protocols.test.ts
+++ b/packages/cli/src/test/upgrade-protocols.test.ts
@@ -127,11 +127,13 @@ test('includes Remotion and extra packages that only exist in pnpm catalog entri
catalogEntries: {
remotion: '4.0.460',
'@remotion/player': '4.0.460',
+ '@huggingface/transformers': '4.1.0',
mediabunny: '1.44.0',
react: '19.0.0',
},
targetVersion: '4.0.462',
extraPackageVersions: {
+ '@huggingface/transformers': '4.2.0',
mediabunny: '1.50.7',
zod: '4.5.4',
},
@@ -141,6 +143,7 @@ test('includes Remotion and extra packages that only exist in pnpm catalog entri
expect(result.catalogPackages).toEqual([
{pkg: 'remotion', version: '4.0.462'},
{pkg: '@remotion/player', version: '4.0.462'},
+ {pkg: '@huggingface/transformers', version: '4.2.0'},
{pkg: 'mediabunny', version: '1.50.7'},
]);
});
@@ -148,10 +151,12 @@ test('includes Remotion and extra packages that only exist in pnpm catalog entri
test('uses the Mediabunny version for extension packages', () => {
expect(
resolveExtraPackageVersions({
+ '@huggingface/transformers': '4.2.0',
mediabunny: '1.50.8',
zod: '4.5.4',
}),
).toMatchObject({
+ '@huggingface/transformers': '4.2.0',
mediabunny: '1.50.8',
'@mediabunny/ac3': '1.50.8',
'@mediabunny/dts': '1.50.8',
diff --git a/packages/codex-plugin/skills/remotion-best-practices/remotion-markup/REFERENCE.md b/packages/codex-plugin/skills/remotion-best-practices/remotion-markup/REFERENCE.md
index 3df3ddfe47..2c1b45546d 100644
--- a/packages/codex-plugin/skills/remotion-best-practices/remotion-markup/REFERENCE.md
+++ b/packages/codex-plugin/skills/remotion-best-practices/remotion-markup/REFERENCE.md
@@ -341,7 +341,7 @@ Use `npx remotion add` to add new packages with the right version:
npx remotion add @remotion/media
```
-This goes for `@remotion/*` packages, `mediabunny`, `@mediabunny/*`, and `zod`.
+This goes for `@remotion/*` packages, `mediabunny`, `@mediabunny/*`, `zod`, and `@huggingface/transformers`.
## Previewing markup
diff --git a/packages/codex-plugin/skills/remotion-best-practices/remotion-upgrade/REFERENCE.md b/packages/codex-plugin/skills/remotion-best-practices/remotion-upgrade/REFERENCE.md
index 3e51fa1b8d..8907444d3b 100644
--- a/packages/codex-plugin/skills/remotion-best-practices/remotion-upgrade/REFERENCE.md
+++ b/packages/codex-plugin/skills/remotion-best-practices/remotion-upgrade/REFERENCE.md
@@ -18,7 +18,7 @@ version: 4.0.519
3. If `@remotion/cli` is not available, upgrade manually:
- Get the latest stable Remotion version with `npm view remotion version`.
- Find every installed `remotion` and `@remotion/*` dependency across the project and upgrade them all to that exact version. Preserve their dependency sections and the project's workspace or catalog conventions.
- - Read the current [Mediabunny compatibility page](https://www.remotion.dev/docs/mediabunny/version) and determine the Mediabunny version compatible with the target Remotion version. Upgrade every installed `mediabunny` and `@mediabunny/*` package to the documented compatible version.
+ - Read the `@remotion/studio` dependencies for the target Remotion version using `npm view @remotion/studio@<version> dependencies --json`. Align installed auxiliary packages such as `zod`, `mediabunny`, and `@huggingface/transformers` with the versions listed there. Use the `mediabunny` version for installed `@mediabunny/*` packages.
- Run the project's package manager to update its lockfile.
4. If `@remotion/cli` is not available, update the installed Remotion skills:
@@ -26,6 +26,6 @@ version: 4.0.519
npx skills update remotion-best-practices remotion-captions remotion-create remotion-docs remotion-interactivity remotion-maps remotion-markup remotion-multimedia remotion-render remotion-saas remotion-studio remotion-upgrade --yes
```
-5. Review the manifest and lockfile diff. Ensure all Remotion packages use one version and all installed Mediabunny packages use the compatible version. If the CLI is available, run `npx remotion versions` as an additional check.
+5. Review the manifest and lockfile diff. Ensure all Remotion packages use one version and installed auxiliary packages use their recommended versions. If the CLI is available, run `npx remotion versions` as an additional check.
The [Remotion releases](https://github.com/remotion-dev/remotion/releases) contain the changelog and may be useful for summarizing relevant changes after the upgrade.
diff --git a/packages/codex-plugin/skills/remotion-markup/SKILL.md b/packages/codex-plugin/skills/remotion-markup/SKILL.md
index e75449d5a5..a988ae47a1 100644
--- a/packages/codex-plugin/skills/remotion-markup/SKILL.md
+++ b/packages/codex-plugin/skills/remotion-markup/SKILL.md
@@ -341,7 +341,7 @@ Use `npx remotion add` to add new packages with the right version:
npx remotion add @remotion/media
```
-This goes for `@remotion/*` packages, `mediabunny`, `@mediabunny/*`, and `zod`.
+This goes for `@remotion/*` packages, `mediabunny`, `@mediabunny/*`, `zod`, and `@huggingface/transformers`.
## Previewing markup
diff --git a/packages/codex-plugin/skills/remotion-upgrade/SKILL.md b/packages/codex-plugin/skills/remotion-upgrade/SKILL.md
index 3e51fa1b8d..8907444d3b 100644
--- a/packages/codex-plugin/skills/remotion-upgrade/SKILL.md
+++ b/packages/codex-plugin/skills/remotion-upgrade/SKILL.md
@@ -18,7 +18,7 @@ version: 4.0.519
3. If `@remotion/cli` is not available, upgrade manually:
- Get the latest stable Remotion version with `npm view remotion version`.
- Find every installed `remotion` and `@remotion/*` dependency across the project and upgrade them all to that exact version. Preserve their dependency sections and the project's workspace or catalog conventions.
- - Read the current [Mediabunny compatibility page](https://www.remotion.dev/docs/mediabunny/version) and determine the Mediabunny version compatible with the target Remotion version. Upgrade every installed `mediabunny` and `@mediabunny/*` package to the documented compatible version.
+ - Read the `@remotion/studio` dependencies for the target Remotion version using `npm view @remotion/studio@<version> dependencies --json`. Align installed auxiliary packages such as `zod`, `mediabunny`, and `@huggingface/transformers` with the versions listed there. Use the `mediabunny` version for installed `@mediabunny/*` packages.
- Run the project's package manager to update its lockfile.
4. If `@remotion/cli` is not available, update the installed Remotion skills:
@@ -26,6 +26,6 @@ version: 4.0.519
npx skills update remotion-best-practices remotion-captions remotion-create remotion-docs remotion-interactivity remotion-maps remotion-markup remotion-multimedia remotion-render remotion-saas remotion-studio remotion-upgrade --yes
```
-5. Review the manifest and lockfile diff. Ensure all Remotion packages use one version and all installed Mediabunny packages use the compatible version. If the CLI is available, run `npx remotion versions` as an additional check.
+5. Review the manifest and lockfile diff. Ensure all Remotion packages use one version and installed auxiliary packages use their recommended versions. If the CLI is available, run `npx remotion versions` as an additional check.
The [Remotion releases](https://github.com/remotion-dev/remotion/releases) contain the changelog and may be useful for summarizing relevant changes after the upgrade.
diff --git a/packages/docs/docs/cli/upgrade.mdx b/packages/docs/docs/cli/upgrade.mdx
index b99038dc7c..fd73c23423 100644
--- a/packages/docs/docs/cli/upgrade.mdx
+++ b/packages/docs/docs/cli/upgrade.mdx
@@ -7,7 +7,7 @@ crumb: CLI Reference
Upgrades all Remotion-related packages.
-If `mediabunny` is installed, it will also be upgraded to the version [compatible with the new Remotion version](/docs/mediabunny/version).
+Installed auxiliary packages such as `zod`, [`mediabunny`](/docs/mediabunny/version), and [`@huggingface/transformers`](/docs/whisper-webgpu) are also upgraded to the versions recommended for the new Remotion version.
If Remotion Agent Skills are installed in the project's `.agents/skills` directory, they will also be updated. Directories without recognized Remotion skills are left unchanged. Global skills are not updated.
diff --git a/packages/docs/docs/cli/versions.mdx b/packages/docs/docs/cli/versions.mdx
index 375eac6b44..b9baa21bc3 100644
--- a/packages/docs/docs/cli/versions.mdx
+++ b/packages/docs/docs/cli/versions.mdx
@@ -9,7 +9,7 @@ crumb: CLI Reference
Prints out which versions of Remotion packages are installed.
-Also checks if `zod` and [`mediabunny`](/docs/mediabunny/version) are installed with the correct versions.
+Also checks whether auxiliary packages such as `zod`, [`mediabunny`](/docs/mediabunny/version), and [`@huggingface/transformers`](/docs/whisper-webgpu) use the recommended versions.
```
npx remotion versions
diff --git a/packages/skills/skills/remotion-markup/SKILL.md b/packages/skills/skills/remotion-markup/SKILL.md
index ea86b2f8c5..60cdbe7a47 100644
--- a/packages/skills/skills/remotion-markup/SKILL.md
+++ b/packages/skills/skills/remotion-markup/SKILL.md
@@ -341,7 +341,7 @@ Use `npx remotion add` to add new packages with the right version:
npx remotion add @remotion/media
```
-This goes for `@remotion/*` packages, `mediabunny`, `@mediabunny/*`, and `zod`.
+This goes for `@remotion/*` packages, `mediabunny`, `@mediabunny/*`, `zod`, and `@huggingface/transformers`.
## Previewing markup
diff --git a/packages/skills/skills/remotion-upgrade/SKILL.md b/packages/skills/skills/remotion-upgrade/SKILL.md
index 0b8ffc105b..663bb3ae3e 100644
--- a/packages/skills/skills/remotion-upgrade/SKILL.md
+++ b/packages/skills/skills/remotion-upgrade/SKILL.md
@@ -18,7 +18,7 @@ version: 4.0.522
3. If `@remotion/cli` is not available, upgrade manually:
- Get the latest stable Remotion version with `npm view remotion version`.
- Find every installed `remotion` and `@remotion/*` dependency across the project and upgrade them all to that exact version. Preserve their dependency sections and the project's workspace or catalog conventions.
- - Read the current [Mediabunny compatibility page](https://www.remotion.dev/docs/mediabunny/version) and determine the Mediabunny version compatible with the target Remotion version. Upgrade every installed `mediabunny` and `@mediabunny/*` package to the documented compatible version.
+ - Read the `@remotion/studio` dependencies for the target Remotion version using `npm view @remotion/studio@<version> dependencies --json`. Align installed auxiliary packages such as `zod`, `mediabunny`, and `@huggingface/transformers` with the versions listed there. Use the `mediabunny` version for installed `@mediabunny/*` packages.
- Run the project's package manager to update its lockfile.
4. If `@remotion/cli` is not available, update the installed Remotion skills:
@@ -26,6 +26,6 @@ version: 4.0.522
npx skills update remotion-best-practices remotion-captions remotion-create remotion-docs remotion-interactivity remotion-maps remotion-markup remotion-multimedia remotion-render remotion-saas remotion-studio remotion-upgrade --yes
```
-5. Review the manifest and lockfile diff. Ensure all Remotion packages use one version and all installed Mediabunny packages use the compatible version. If the CLI is available, run `npx remotion versions` as an additional check.
+5. Review the manifest and lockfile diff. Ensure all Remotion packages use one version and installed auxiliary packages use their recommended versions. If the CLI is available, run `npx remotion versions` as an additional check.
The [Remotion releases](https://github.com/remotion-dev/remotion/releases) contain the changelog and may be useful for summarizing relevant changes after the upgrade.
diff --git a/packages/studio-server/src/test/install-dependency.test.ts b/packages/studio-server/src/test/install-dependency.test.ts
index 4ffa80bab7..8d8cf94207 100644
--- a/packages/studio-server/src/test/install-dependency.test.ts
+++ b/packages/studio-server/src/test/install-dependency.test.ts
@@ -58,6 +58,12 @@ test('uses the supported version for unversioned catalogued packages', () => {
expect(getPackageInstallSpec({name: 'mediabunny', version: null})).toMatch(
/^mediabunny@\d/,
);
+ expect(
+ getPackageInstallSpec({
+ name: '@huggingface/transformers',
+ version: null,
+ }),
+ ).toBe('@huggingface/[email protected]');
});
test('lets the package manager resolve other unversioned packages', () => {
diff --git a/packages/studio-shared/src/package-info.ts b/packages/studio-shared/src/package-info.ts
index c224cac767..93cf3c1eb5 100644
--- a/packages/studio-shared/src/package-info.ts
+++ b/packages/studio-shared/src/package-info.ts
@@ -124,6 +124,7 @@ export type ExtraPackage = {
version: string;
description: string;
docsUrl: string;
+ versionDocsUrl: string;
};
export const extraPackages: ExtraPackage[] = [
@@ -132,36 +133,43 @@ export const extraPackages: ExtraPackage[] = [
version: '4.2.0',
description: 'Machine learning models in the browser',
docsUrl: 'https://huggingface.co/docs/transformers.js',
+ versionDocsUrl: 'https://www.remotion.dev/docs/whisper-webgpu',
},
{
name: 'mediabunny',
version: '1.55.5',
description: 'Multimedia library used by Remotion',
docsUrl: 'https://www.remotion.dev/docs/mediabunny/version',
+ versionDocsUrl: 'https://www.remotion.dev/docs/mediabunny/version',
},
{
name: '@mediabunny/ac3',
version: '1.55.5',
description: 'AC-3 and E-AC-3 audio codec support for Mediabunny',
docsUrl: 'https://www.remotion.dev/docs/mediabunny/formats#ac-3-and-e-ac-3',
+ versionDocsUrl:
+ 'https://www.remotion.dev/docs/mediabunny/formats#ac-3-and-e-ac-3',
},
{
name: '@mediabunny/dts',
version: '1.55.5',
description: 'DTS audio codec support for Mediabunny',
docsUrl: 'https://www.remotion.dev/docs/mediabunny/formats#dts',
+ versionDocsUrl: 'https://www.remotion.dev/docs/mediabunny/formats#dts',
},
{
name: '@mediabunny/prores',
version: '1.55.5',
description: 'Apple ProRes decoder support for Mediabunny',
docsUrl: 'https://www.remotion.dev/docs/mediabunny/formats',
+ versionDocsUrl: 'https://www.remotion.dev/docs/mediabunny/formats',
},
{
name: 'zod',
version: '4.5.4',
description: 'TypeScript-first schema validation',
docsUrl: 'https://zod.dev',
+ versionDocsUrl: 'https://www.remotion.dev/docs/zod-types/',
},
];