Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Remotion 5.0 #3750

Draft
wants to merge 13 commits into
base: main
Choose a base branch
from
16 changes: 8 additions & 8 deletions .github/workflows/push.yml
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ jobs:
- uses: actions/checkout@main
- uses: actions/setup-node@v3
with:
node-version: 16
node-version: 18
- uses: oven-sh/setup-bun@v1
with:
bun-version: 1.1.7
Expand Down Expand Up @@ -68,7 +68,7 @@ jobs:
- uses: actions/checkout@main
- uses: actions/setup-node@v3
with:
node-version: 16
node-version: 18
- uses: oven-sh/setup-bun@v1
with:
bun-version: 1.1.7
Expand Down Expand Up @@ -135,7 +135,7 @@ jobs:
- uses: actions/checkout@main
- uses: actions/setup-node@v3
with:
node-version: 16
node-version: 18
- uses: oven-sh/setup-bun@v1
with:
bun-version: 1.1.7
Expand Down Expand Up @@ -167,15 +167,15 @@ jobs:
matrix:
include:
- os: ubuntu-latest
node_version: 16
node_version: 18
- os: windows-latest
node_version: 16
node_version: 18
- os: macos-latest
node_version: 16
node_version: 18
- os: macos-14
node_version: 16
node_version: 18
- os: ubuntu-latest
node_version: 20.5
node_version: 22
steps:
- uses: actions/checkout@main
- uses: actions/setup-go@v5
Expand Down
46 changes: 26 additions & 20 deletions LICENSE.md
Original file line number Diff line number Diff line change
@@ -1,49 +1,55 @@
# Remotion License

In Remotion 5.0, the license will slightly change. [View the changes here](https://github.com/remotion-dev/remotion/pull/3750).
Depending on the type of your legal entity, you are granted permission to use the Remotion Software ("Remotion" or "Software") for your project. Individuals and small companies are allowed to use the Software to create media assets (e.g., videos and images) for free (even commercially), while a Company License is required for for-profit organizations and groups of individuals of a certain size. This two-tier system was designed to ensure funding for this Software while still allowing the source code to be available and the program to be free for most. Read below for the exact license description.

---

Depending on the type of your legal entity, you are granted permission to use Remotion for your project. Individuals and small companies are allowed to use Remotion to create videos for free (even commercial), while a company license is required for for-profit organizations of a certain size. This two-tier system was designed to ensure funding for this project while still allowing the source code to be available and the program to be free for most. Read below for the exact terms of use.

- [Free license](#free-license)
- [Company license](#company-license)

## Free license
- [Free License](#free-license)
- [Company License](#company-license)

Copyright © 2024 [Remotion](https://www.remotion.dev)

## Free License

### Eligibility

You are eligible to use Remotion for free if you are:

- an individual
- a for-profit organization with up to 3 employees
- an individual using the Software for personal use
- an organization or team of individuals with up to 3 people
- a non-profit or not-for-profit organization
- evaluating whether Remotion is a good fit, and are not yet using it in a commercial way
- evaluating whether Remotion is a good fit, and you are not yet using it in a commercial way

### Allowed use cases

Permission is hereby granted, free of charge, to any person eligible for the "Free license", to use the software non-commercially or commercially for the purpose of creating videos and images and to modify the software to their own liking, for the purpose of fulfilling their custom use case or to contribute bug fixes or improvements back to Remotion.
Permission is hereby granted, free of charge, to any person eligible for the "Free License", to use Remotion non-commercially or commercially for the purpose of creating media assets (e.g. videos and images) and to modify the Software to their own liking, for the purpose of fulfilling their custom use case or to contribute bug fixes or improvements back to Remotion.

### Disallowed use cases

It is not allowed to copy or modify Remotion code for the purpose of selling, renting, licensing, relicensing, or sublicensing your own derivate of Remotion.
It is not allowed to copy or modify Remotion source-code for the purpose of selling, renting, licensing, relicensing, or sublicensing your own derivate of Remotion.

### Warranty notice

The software is provided "as is", without warranty of any kind, express or implied, including but not limited to the warranties of merchantability, fitness for a particular purpose, and non-infringement. In no event shall the author or copyright holders be liable for any claim, damages or other liability, whether in an action of contract, tort or otherwise, arising from, out of or in connection with the software or the use or other dealings in the software.
The Software is provided "as is", without warranty of any kind, express or implied, including but not limited to the warranties of

- merchantability,
- fitness for a particular purpose, and
- non-infringement.

In no event shall the author or copyright holders be liable for any claims, damages or other liability, whether in an action of contract, tort, or otherwise, arising from, out of, or in connection and use of Remotion.

### Support

Support is provided on a best-we-can-do basis via GitHub Issues and Discord.
Support is provided on a best-we-can-do basis via [GitHub Issues](https://github.com/remotion-dev/remotion/issues?q=is%3Aissue+is%3Aopen+sort%3Aupdated-desc) and [Discord](https://www.remotion.dev/discord).

## Company License

You are required to obtain a Company License to use Remotion if you are not within the group of entities eligible for a Free License. The Company License will enable you to use the Remotion Software for the allowed use cases specified in the Free License, and give you access to prioritized support ([Support Policy](https://www.remotion.dev/docs/support)).

## Company license
Visit [remotion.pro](https://www.remotion.pro/license) for pricing and to buy a Company License.

You are required to obtain a company license to use Remotion if you are not within the group of entities eligible for a free license. This license will enable you to use Remotion for the allowed use cases specified in the free license, and give you access to prioritized support (read the [Support Policy](https://www.remotion.dev/docs/support)).
### Terms and Conditions

Visit [remotion.pro](https://www.remotion.pro/license) for pricing and to buy a license.
Company License Users are required to accept the legally binding [Terms and Conditions](https://www.remotion.pro/terms) to use the Remotion Software.

### FAQs

Are you not sure whether you need a company license because of an edge case? Here are some [frequently asked questions](https://www.remotion.pro/faq).
Are you not sure whether you need a Company License because of an edge case? Here are [frequently asked questions](https://www.remotion.pro/faq).
2 changes: 1 addition & 1 deletion packages/core/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@
},
"devDependencies": {
"@jonny/eslint-config": "3.0.281",
"@testing-library/react": "14.0.0",
"@testing-library/react": "15.0.7",
"@happy-dom/global-registrator": "14.5.1",
"happy-dom": "14.5.1",
"@types/node": "18.14.6",
Expand Down
2 changes: 1 addition & 1 deletion packages/core/src/test/render-hook.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ interface RenderHookOptions<Props> {
*
* @see https://testing-library.com/docs/react-testing-library/api/#wrapper
*/
wrapper?: React.JSXElementConstructor<{children: React.ReactElement}>;
wrapper?: React.JSXElementConstructor<{children: React.ReactNode}>;
}

export function renderHook<Result, Props>(
Expand Down
34 changes: 23 additions & 11 deletions packages/core/src/test/series.test.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -76,7 +76,7 @@ test('Basic series test', () => {
</WrapSequenceContext>,
);
expect(outerHTML).toBe(
'<div style="position:absolute;top:0;left:0;right:0;bottom:0;width:100%;height:100%;display:flex"><div>third 0</div></div>',
'<div style="position:absolute;top:0;left:0;right:0;bottom:0;width:100%;height:100%;display:flex"><div style="position:absolute;top:0;left:0;right:0;bottom:0;width:100%;height:100%;display:flex"><div>third 0</div></div></div>',
);
});

Expand Down Expand Up @@ -106,7 +106,7 @@ test('Should support fragments', () => {
);

expect(outerHtml).not.toBe(
'<div style="position:absolute;top:0;left:0;right:0;bottom:0;width:100%;height:100%;display:flex"><div>second 1</div></div>',
'<div style="position:absolute;top:0;left:0;right:0;bottom:0;width:100%;height:100%;display:flex"><div style="position:absolute;top:0;left:0;right:0;bottom:0;width:100%;height:100%;display:flex"><div>second 1</div></div></div>',
);
});
test('Should not allow foreign elements', () => {
Expand All @@ -133,7 +133,7 @@ test('Should allow layout prop', () => {
</WrapSequenceContext>,
);
expect(outerHTML).toBe(
'<div style="position:absolute;top:0;left:0;right:0;bottom:0;width:100%;height:100%;display:flex"><div>first 0</div></div>',
'<div style="position:absolute;top:0;left:0;right:0;bottom:0;width:100%;height:100%;display:flex"><div style="position:absolute;top:0;left:0;right:0;bottom:0;width:100%;height:100%;display:flex"><div>first 0</div></div></div>',
);

const outerHTML2 = renderForFrame(
Expand All @@ -146,7 +146,9 @@ test('Should allow layout prop', () => {
</Series>
</WrapSequenceContext>,
);
expect(outerHTML2).toBe('<div>first 0</div>');
expect(outerHTML2).toBe(
'<div style="position:absolute;top:0;left:0;right:0;bottom:0;width:100%;height:100%;display:flex"><div>first 0</div></div>',
);
});
test('Should render nothing after the end', () => {
const outerHTML = renderForFrame(
Expand All @@ -159,7 +161,9 @@ test('Should render nothing after the end', () => {
</Series>
</WrapSequenceContext>,
);
expect(outerHTML).toBe('');
expect(outerHTML).toBe(
'<div style="position:absolute;top:0;left:0;right:0;bottom:0;width:100%;height:100%;display:flex"></div>',
);
});
test('Should throw if invalid or no duration provided', () => {
expect(() => {
Expand Down Expand Up @@ -205,7 +209,7 @@ test('Should allow whitespace', () => {
);

expect(outerHtml).toBe(
'<div style="position:absolute;top:0;left:0;right:0;bottom:0;width:100%;height:100%;display:flex"><div>second 1</div></div>',
'<div style="position:absolute;top:0;left:0;right:0;bottom:0;width:100%;height:100%;display:flex"><div style="position:absolute;top:0;left:0;right:0;bottom:0;width:100%;height:100%;display:flex"><div>second 1</div></div></div>',
);
});
test('Handle empty Series.Sequence', () => {
Expand Down Expand Up @@ -238,7 +242,9 @@ test('Should allow negative overlap prop', () => {
</Series>
</WrapSequenceContext>,
);
expect(outerHTML).toBe('<div>first 4</div><div>second 0</div>');
expect(outerHTML).toBe(
'<div style="position:absolute;top:0;left:0;right:0;bottom:0;width:100%;height:100%;display:flex"><div>first 4</div><div>second 0</div></div>',
);
});

test('Should allow positive overlap prop', () => {
Expand All @@ -255,7 +261,9 @@ test('Should allow positive overlap prop', () => {
</Series>
</WrapSequenceContext>,
);
expect(outerHTML).toBe('');
expect(outerHTML).toBe(
'<div style="position:absolute;top:0;left:0;right:0;bottom:0;width:100%;height:100%;display:flex"></div>',
);
});

test('Should disallow NaN as offset prop', () => {
Expand Down Expand Up @@ -320,7 +328,9 @@ test('Should cascade negative offset props', () => {
</Series>
</WrapSequenceContext>,
);
expect(outerHTML).toBe('<div>third 0</div>');
expect(outerHTML).toBe(
'<div style="position:absolute;top:0;left:0;right:0;bottom:0;width:100%;height:100%;display:flex"><div>third 0</div></div>',
);
});

test('Should cascade positive offset props', () => {
Expand All @@ -340,7 +350,9 @@ test('Should cascade positive offset props', () => {
</Series>
</WrapSequenceContext>,
);
expect(outerHTML).toBe('<div>third 0</div>');
expect(outerHTML).toBe(
'<div style="position:absolute;top:0;left:0;right:0;bottom:0;width:100%;height:100%;display:flex"><div>third 0</div></div>',
);
});

test('Allow durationInFrames as Infinity for last Series.Sequence', () => {
Expand All @@ -361,7 +373,7 @@ test('Allow durationInFrames as Infinity for last Series.Sequence', () => {
</WrapSequenceContext>,
);
expect(outerHTML).toBe(
'<div style="position:absolute;top:0;left:0;right:0;bottom:0;width:100%;height:100%;display:flex"><div>third 0</div></div>',
'<div style="position:absolute;top:0;left:0;right:0;bottom:0;width:100%;height:100%;display:flex"><div style="position:absolute;top:0;left:0;right:0;bottom:0;width:100%;height:100%;display:flex"><div>third 0</div></div></div>',
);
});

Expand Down
2 changes: 1 addition & 1 deletion packages/core/src/v5-flag.ts
Original file line number Diff line number Diff line change
@@ -1 +1 @@
export const ENABLE_V5_BREAKING_CHANGES = false as const;
export const ENABLE_V5_BREAKING_CHANGES = true as const;
2 changes: 1 addition & 1 deletion packages/layout-utils/src/layouts/fill-text-box.ts
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ export const fillTextBox = ({
fontSize,
letterSpacing,
fontVariantNumeric,
validateFontIsLoaded,
validateFontIsLoaded = true,
textTransform,
additionalStyles,
}: Word): {
Expand Down
2 changes: 1 addition & 1 deletion packages/layout-utils/src/layouts/fit-text.ts
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ export const fitText = ({
fontVariantNumeric,
fontWeight,
letterSpacing,
validateFontIsLoaded,
validateFontIsLoaded = true,
additionalStyles,
textTransform,
}: {
Expand Down
2 changes: 1 addition & 1 deletion packages/layout-utils/src/layouts/measure-text.ts
Original file line number Diff line number Diff line change
Expand Up @@ -125,7 +125,7 @@ export const measureText = ({
fontWeight,
letterSpacing,
fontVariantNumeric,
validateFontIsLoaded,
validateFontIsLoaded = true,
additionalStyles,
}: Word): Dimensions => {
const key = `${text}-${fontFamily}-${fontWeight}-${fontSize}-${letterSpacing}`;
Expand Down
4 changes: 3 additions & 1 deletion packages/paths/src/get-instruction-index-at-length.ts
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,9 @@ export const getInstructionIndexAtLengthFromConstructed = (
}

if (fractionLength > constructed.totalLength) {
fractionLength = constructed.totalLength;
throw new Error(
`Length greater than total length was passed. Length: ${fractionLength}, total length: ${constructed.totalLength}`,
);
}

let index = constructed.partialLengths.length - 1;
Expand Down
2 changes: 1 addition & 1 deletion packages/player/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,7 @@
},
"devDependencies": {
"@jonny/eslint-config": "3.0.281",
"@testing-library/react": "13.1.1",
"@testing-library/react": "15.0.7",
"@happy-dom/global-registrator": "14.5.1",
"@types/node": "18.14.6",
"@types/react": "18.3.1",
Expand Down
2 changes: 1 addition & 1 deletion packages/renderer/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@
"devDependencies": {
"@jonny/eslint-config": "3.0.281",
"@testing-library/dom": "^8.16.0",
"@testing-library/react": "13.3.0",
"@testing-library/react": "15.0.7",
"@types/node": "18.14.6",
"@types/progress": "2.0.5",
"@types/bun": "1.0.12",
Expand Down
2 changes: 1 addition & 1 deletion packages/shapes/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@
"devDependencies": {
"@types/react-dom": "18.3.0",
"@jonny/eslint-config": "3.0.281",
"@testing-library/react": "^13.4.0",
"@testing-library/react": "15.0.7",
"@types/node": "18.14.6",
"@types/react": "18.3.1",
"eslint": "8.56.0",
Expand Down