Skip to content

🎥 Make videos programmatically with React

hmm

Jonny Burgerd755f4990d4e
diff --git a/packages/lambda-client/package.json b/packages/lambda-client/package.json
index e1e2ca9dda..0de79c281a 100644
--- a/packages/lambda-client/package.json
+++ b/packages/lambda-client/package.json
@@ -22,7 +22,9 @@
"@aws-sdk/s3-request-presigner": "3.738.0",
"@aws-sdk/client-s3": "3.738.0",
"@aws-sdk/client-service-quotas": "3.738.0",
- "@aws-sdk/client-sts": "3.738.0"
+ "@aws-sdk/client-sts": "3.738.0",
+ "@aws-sdk/credential-providers": "3.738.0",
+ "mime-types": "2.1.34"
},
"devDependencies": {
"@remotion/serverless-client": "workspace:*",
@@ -30,7 +32,8 @@
"express": "4.21.0",
"@remotion/eslint-config-internal": "workspace:*",
"eslint": "9.19.0",
- "next": "15.1.6"
+ "next": "15.1.6",
+ "@types/mime-types": "2.1.1"
},
"publishConfig": {
"access": "public"
diff --git a/packages/lambda-client/src/app-router-webhook.ts b/packages/lambda-client/src/app-router-webhook.ts
index 9ffbee9ae2..470154fbe8 100644
--- a/packages/lambda-client/src/app-router-webhook.ts
+++ b/packages/lambda-client/src/app-router-webhook.ts
@@ -3,7 +3,7 @@ import type {
WebhookPayload,
WebhookSuccessPayload,
WebhookTimeoutPayload,
-} from '@remotion/serverless';
+} from '@remotion/serverless-client';
import {validateWebhookSignature} from './validate-webhook-signature';
export type NextWebhookArgs = {
diff --git a/packages/lambda-client/src/aws-provider.ts b/packages/lambda-client/src/aws-provider.ts
index e1a3317adb..f1ee073ea8 100644
--- a/packages/lambda-client/src/aws-provider.ts
+++ b/packages/lambda-client/src/aws-provider.ts
@@ -20,7 +20,7 @@ export type AwsProvider = {
};
};
-import type {ProviderSpecifics} from '@remotion/serverless';
+import type {ProviderSpecifics} from '@remotion/serverless-client';
import {expiryDays} from '@remotion/serverless-client';
import {EventEmitter} from 'node:events';
import {bucketExistsInRegionImplementation} from './bucket-exists';
diff --git a/packages/lambda-client/src/bucket-exists.ts b/packages/lambda-client/src/bucket-exists.ts
index 70fc4d6bba..b7e493a505 100644
--- a/packages/lambda-client/src/bucket-exists.ts
+++ b/packages/lambda-client/src/bucket-exists.ts
@@ -1,5 +1,5 @@
import {GetBucketLocationCommand} from '@aws-sdk/client-s3';
-import type {ProviderSpecifics} from '@remotion/serverless';
+import type {ProviderSpecifics} from '@remotion/serverless-client';
import type {AwsProvider} from './aws-provider';
import {getS3Client} from './get-s3-client';
diff --git a/packages/lambda-client/src/call-lambda-async.ts b/packages/lambda-client/src/call-lambda-async.ts
index d8a5e23631..cea3ed27a0 100644
--- a/packages/lambda-client/src/call-lambda-async.ts
+++ b/packages/lambda-client/src/call-lambda-async.ts
@@ -1,6 +1,9 @@
import {InvokeCommand} from '@aws-sdk/client-lambda';
-import type {CallFunctionOptions, CloudProvider} from '@remotion/serverless';
-import type {ServerlessRoutines} from '@remotion/serverless-client';
+import type {
+ CallFunctionOptions,
+ CloudProvider,
+ ServerlessRoutines,
+} from '@remotion/serverless-client';
import {getLambdaClient} from './aws-clients';
import type {AwsRegion} from './regions';
diff --git a/packages/lambda-client/src/call-lambda-streaming.ts b/packages/lambda-client/src/call-lambda-streaming.ts
index 781c7891a6..4a28c414a9 100644
--- a/packages/lambda-client/src/call-lambda-streaming.ts
+++ b/packages/lambda-client/src/call-lambda-streaming.ts
@@ -7,18 +7,16 @@ import {
import type {
CallFunctionOptions,
CloudProvider,
- OnMessage,
- StreamingMessage,
-} from '@remotion/serverless';
-import type {
MessageTypeId,
+ OnMessage,
ServerlessRoutines,
+ StreamingMessage,
} from '@remotion/serverless-client';
import {
formatMap,
+ makeStreamer,
messageTypeIdToMessageType,
} from '@remotion/serverless-client';
-import {makeStreamer} from '@remotion/streaming';
import {getLambdaClient} from './aws-clients';
import type {AwsRegion} from './regions';
diff --git a/packages/lambda-client/src/call-lambda-sync.ts b/packages/lambda-client/src/call-lambda-sync.ts
index ab2445b65c..169b8d7849 100644
--- a/packages/lambda-client/src/call-lambda-sync.ts
+++ b/packages/lambda-client/src/call-lambda-sync.ts
@@ -3,8 +3,6 @@ import type {
CallFunctionOptions,
CloudProvider,
OrError,
-} from '@remotion/serverless';
-import type {
ServerlessReturnValues,
ServerlessRoutines,
} from '@remotion/serverless-client';
diff --git a/packages/lambda-client/src/clean-items.ts b/packages/lambda-client/src/clean-items.ts
index fb53e0bdfe..1fd5ace2b5 100644
--- a/packages/lambda-client/src/clean-items.ts
+++ b/packages/lambda-client/src/clean-items.ts
@@ -1,4 +1,7 @@
-import type {CloudProvider, ProviderSpecifics} from '@remotion/serverless';
+import type {
+ CloudProvider,
+ ProviderSpecifics,
+} from '@remotion/serverless-client';
import {pLimit} from './p-limit';
const limit = pLimit(10);
diff --git a/packages/lambda-client/src/constants.ts b/packages/lambda-client/src/constants.ts
index 7c8ea07f99..6996163f9f 100644
--- a/packages/lambda-client/src/constants.ts
+++ b/packages/lambda-client/src/constants.ts
@@ -1,9 +1,9 @@
-import type {GenericRenderProgress} from '@remotion/serverless';
+import type {GenericRenderProgress} from '@remotion/serverless-client';
import {
type Privacy,
+ ENABLE_V5_BREAKING_CHANGES,
MINIMUM_FRAMES_PER_FUNCTIONS,
} from '@remotion/serverless-client';
-import {NoReactInternals} from 'remotion/no-react';
import type {AwsProvider} from './aws-provider';
import type {AwsRegion} from './regions';
@@ -22,10 +22,9 @@ export const DEFAULT_REGION: AwsRegion = 'us-east-1';
export const DEFAULT_MAX_RETRIES = 1;
export const MAX_EPHEMERAL_STORAGE_IN_MB = 10240;
-export const DEFAULT_EPHEMERAL_STORAGE_IN_MB =
- NoReactInternals.ENABLE_V5_BREAKING_CHANGES
- ? MAX_EPHEMERAL_STORAGE_IN_MB
- : 2048;
+export const DEFAULT_EPHEMERAL_STORAGE_IN_MB = ENABLE_V5_BREAKING_CHANGES
+ ? MAX_EPHEMERAL_STORAGE_IN_MB
+ : 2048;
export const MIN_EPHEMERAL_STORAGE_IN_MB = 512;
export const DEFAULT_OUTPUT_PRIVACY: Privacy = 'public';
diff --git a/packages/lambda-client/src/create-bucket.ts b/packages/lambda-client/src/create-bucket.ts
index e3c9d254fc..73677da676 100644
--- a/packages/lambda-client/src/create-bucket.ts
+++ b/packages/lambda-client/src/create-bucket.ts
@@ -4,7 +4,7 @@ import {
DeletePublicAccessBlockCommand,
PutBucketAclCommand,
} from '@aws-sdk/client-s3';
-import type {ProviderSpecifics} from '@remotion/serverless';
+import type {ProviderSpecifics} from '@remotion/serverless-client';
import type {AwsProvider} from './aws-provider';
import {getS3Client} from './get-s3-client';
diff --git a/packages/lambda-client/src/delete-file.ts b/packages/lambda-client/src/delete-file.ts
index 938a63c5e8..7555617d03 100644
--- a/packages/lambda-client/src/delete-file.ts
+++ b/packages/lambda-client/src/delete-file.ts
@@ -1,6 +1,8 @@
import {DeleteObjectCommand} from '@aws-sdk/client-s3';
-import type {ProviderSpecifics} from '@remotion/serverless';
-import type {CustomCredentials} from '@remotion/serverless-client';
+import type {
+ CustomCredentials,
+ ProviderSpecifics,
+} from '@remotion/serverless-client';
import type {AwsProvider} from './aws-provider';
import {getS3Client} from './get-s3-client';
import type {AwsRegion} from './regions';
diff --git a/packages/lambda-client/src/delete-function.ts b/packages/lambda-client/src/delete-function.ts
index 052e5a1431..8b366c8d1a 100644
--- a/packages/lambda-client/src/delete-function.ts
+++ b/packages/lambda-client/src/delete-function.ts
@@ -2,7 +2,7 @@ import {DeleteFunctionCommand} from '@aws-sdk/client-lambda';
import type {
DeleteFunction,
DeleteFunctionInput as GenericDeleteFunctionInput,
-} from '@remotion/serverless';
+} from '@remotion/serverless-client';
import {getLambdaClient} from './aws-clients';
import type {AwsProvider} from './aws-provider';
diff --git a/packages/lambda-client/src/delete-render.ts b/packages/lambda-client/src/delete-render.ts
index c7d408f811..de980a5498 100644
--- a/packages/lambda-client/src/delete-render.ts
+++ b/packages/lambda-client/src/delete-render.ts
@@ -1,4 +1,4 @@
-import type {ProviderSpecifics} from '@remotion/serverless';
+import type {ProviderSpecifics} from '@remotion/serverless-client';
import {
getExpectedOutName,
getOverallProgressFromStorage,
diff --git a/packages/lambda-client/src/get-account-id.ts b/packages/lambda-client/src/get-account-id.ts
index a6391283a1..13c078f7f2 100644
--- a/packages/lambda-client/src/get-account-id.ts
+++ b/packages/lambda-client/src/get-account-id.ts
@@ -1,5 +1,5 @@
import {GetCallerIdentityCommand} from '@aws-sdk/client-sts';
-import type {GetAccountId} from '@remotion/serverless';
+import type {GetAccountId} from '@remotion/serverless-client';
import {getStsClient} from './aws-clients';
import type {AwsProvider} from './aws-provider';
import type {AwsRegion} from './regions';
diff --git a/packages/lambda-client/src/get-aws-urls.ts b/packages/lambda-client/src/get-aws-urls.ts
index 78f96c3993..e0e37429d7 100644
--- a/packages/lambda-client/src/get-aws-urls.ts
+++ b/packages/lambda-client/src/get-aws-urls.ts
@@ -1,5 +1,7 @@
-import type {GetLoggingUrlForRendererFunction} from '@remotion/serverless';
-import type {ServerlessRoutines} from '@remotion/serverless-client';
+import type {
+ GetLoggingUrlForRendererFunction,
+ ServerlessRoutines,
+} from '@remotion/serverless-client';
import type {AwsProvider} from './aws-provider';
import {encodeAwsUrlParams} from './encode-aws-url-params';
import type {AwsRegion} from './regions';
diff --git a/packages/lambda-client/src/get-compositions-on-lambda.ts b/packages/lambda-client/src/get-compositions-on-lambda.ts
index 7285b07376..4bc888607e 100644
--- a/packages/lambda-client/src/get-compositions-on-lambda.ts
+++ b/packages/lambda-client/src/get-compositions-on-lambda.ts
@@ -1,13 +1,16 @@
-import type {ChromiumOptions, ToOptions} from '@remotion/renderer';
-import type {BrowserSafeApis} from '@remotion/renderer/client';
+import type {
+ BrowserSafeApis,
+ ChromiumOptions,
+ ToOptions,
+ VideoConfig,
+} from '@remotion/serverless-client';
import {
ServerlessRoutines,
+ VERSION,
compressInputProps,
getNeedsToUpload,
serializeOrThrow,
} from '@remotion/serverless-client';
-import type {VideoConfig} from 'remotion/no-react';
-import {VERSION} from 'remotion/version';
import {awsImplementation} from './aws-provider';
import type {AwsRegion} from './regions';
diff --git a/packages/lambda-client/src/get-function-version.ts b/packages/lambda-client/src/get-function-version.ts
index 2e9f3c1e81..eab7bad292 100644
--- a/packages/lambda-client/src/get-function-version.ts
+++ b/packages/lambda-client/src/get-function-version.ts
@@ -1,4 +1,4 @@
-import type {LogLevel} from '@remotion/renderer';
+import type {LogLevel} from '@remotion/serverless-client';
import {
COMMAND_NOT_FOUND,
ServerlessRoutines,
diff --git a/packages/lambda-client/src/get-functions.ts b/packages/lambda-client/src/get-functions.ts
index 1432e5cfe4..bdae852cfc 100644
--- a/packages/lambda-client/src/get-functions.ts
+++ b/packages/lambda-client/src/get-functions.ts
@@ -1,8 +1,7 @@
import type {FunctionConfiguration} from '@aws-sdk/client-lambda';
import {ListFunctionsCommand} from '@aws-sdk/client-lambda';
-import type {LogLevel} from '@remotion/renderer';
-import type {FunctionInfo} from '@remotion/serverless';
-import {VERSION} from 'remotion/version';
+import type {FunctionInfo, LogLevel} from '@remotion/serverless-client';
+import {VERSION} from '@remotion/serverless-client';
import {getLambdaClient} from './aws-clients';
import {DEFAULT_EPHEMERAL_STORAGE_IN_MB, RENDER_FN_PREFIX} from './constants';
import {getFunctionVersion} from './get-function-version';
diff --git a/packages/lambda-client/src/get-render-progress.ts b/packages/lambda-client/src/get-render-progress.ts
index 19d384cefb..91cbdb53f7 100644
--- a/packages/lambda-client/src/get-render-progress.ts
+++ b/packages/lambda-client/src/get-render-progress.ts
@@ -1,5 +1,4 @@
-import type {LogLevel} from '@remotion/renderer';
-import type {CustomCredentials} from '@remotion/serverless-client';
+import type {CustomCredentials, LogLevel} from '@remotion/serverless-client';
import {getProgress, ServerlessRoutines} from '@remotion/serverless-client';
import {awsImplementation, type AwsProvider} from './aws-provider';
import type {RenderProgress} from './constants';
diff --git a/packages/lambda-client/src/get-service-client.ts b/packages/lambda-client/src/get-service-client.ts
index 469f54eee9..86003d7b26 100644
--- a/packages/lambda-client/src/get-service-client.ts
+++ b/packages/lambda-client/src/get-service-client.ts
@@ -5,8 +5,7 @@ import {S3Client} from '@aws-sdk/client-s3';
import {ServiceQuotasClient} from '@aws-sdk/client-service-quotas';
import {STSClient} from '@aws-sdk/client-sts';
import type {CustomCredentials} from '@remotion/serverless-client';
-import {MAX_FUNCTIONS_PER_RENDER} from '@remotion/serverless-client';
-import {random} from 'remotion/no-react';
+import {MAX_FUNCTIONS_PER_RENDER, random} from '@remotion/serverless-client';
import type {AwsProvider} from './aws-provider';
import {checkCredentials} from './check-credentials';
import {getCredentials} from './get-credentials';
diff --git a/packages/lambda-client/src/get-sites.ts b/packages/lambda-client/src/get-sites.ts
index e7d3e9d4c0..af47ef8cc7 100644
--- a/packages/lambda-client/src/get-sites.ts
+++ b/packages/lambda-client/src/get-sites.ts
@@ -1,4 +1,4 @@
-import type {ProviderSpecifics} from '@remotion/serverless';
+import type {ProviderSpecifics} from '@remotion/serverless-client';
import type {AwsProvider} from './aws-provider';
import {awsImplementation} from './aws-provider';
import {getSitesKey} from './constants';
diff --git a/packages/lambda-client/src/head-file.ts b/packages/lambda-client/src/head-file.ts
index d122dd1419..af811803e3 100644
--- a/packages/lambda-client/src/head-file.ts
+++ b/packages/lambda-client/src/head-file.ts
@@ -1,5 +1,5 @@
import {HeadObjectCommand} from '@aws-sdk/client-s3';
-import type {ProviderSpecifics} from '@remotion/serverless';
+import type {ProviderSpecifics} from '@remotion/serverless-client';
import type {AwsProvider} from './aws-provider';
import {getS3Client} from './get-s3-client';
diff --git a/packages/lambda-client/src/index.ts b/packages/lambda-client/src/index.ts
index d56942b420..2e641aed59 100644
--- a/packages/lambda-client/src/index.ts
+++ b/packages/lambda-client/src/index.ts
@@ -1,5 +1,5 @@
-export type {EnhancedErrorInfo} from '@remotion/serverless';
export type {
+ EnhancedErrorInfo,
GetOrCreateBucketInput,
GetOrCreateBucketOutput,
} from '@remotion/serverless-client';
@@ -56,12 +56,13 @@ import {validateMemorySize} from './validate-memory-size';
import {validateServeUrl} from './validate-serveurl';
export type {
+ CustomCredentials,
+ DeleteAfter,
WebhookErrorPayload,
WebhookPayload,
WebhookSuccessPayload,
WebhookTimeoutPayload,
-} from '@remotion/serverless';
-export type {CustomCredentials, DeleteAfter} from '@remotion/serverless-client';
+} from '@remotion/serverless-client';
export {appRouterWebhook, NextWebhookArgs} from './app-router-webhook';
export {AwsProvider} from './aws-provider';
export type {RenderProgress} from './constants';
diff --git a/packages/lambda-client/src/lambda-version-string.ts b/packages/lambda-client/src/lambda-version-string.ts
index dd1ece8120..c6166be812 100644
--- a/packages/lambda-client/src/lambda-version-string.ts
+++ b/packages/lambda-client/src/lambda-version-string.ts
@@ -1,4 +1,4 @@
-import {VERSION} from 'remotion/version';
+import {VERSION} from '@remotion/serverless-client';
export const LAMBDA_VERSION_STRING = VERSION.replace(/\./g, '-')
.replace(/\+/g, '-')
diff --git a/packages/lambda-client/src/lifecycle.ts b/packages/lambda-client/src/lifecycle.ts
index 2ef5c182ac..302343b572 100644
--- a/packages/lambda-client/src/lifecycle.ts
+++ b/packages/lambda-client/src/lifecycle.ts
@@ -1,6 +1,9 @@
import type {LifecycleRule} from '@aws-sdk/client-s3';
-import type {CloudProvider, ProviderSpecifics} from '@remotion/serverless';
-import type {DeleteAfter} from '@remotion/serverless-client';
+import type {
+ CloudProvider,
+ DeleteAfter,
+ ProviderSpecifics,
+} from '@remotion/serverless-client';
import {expiryDays, truthy} from '@remotion/serverless-client';
const getEnabledLifeCycleRule = ({
diff --git a/packages/lambda-client/src/list-objects.ts b/packages/lambda-client/src/list-objects.ts
index bef4a97867..0db81d7142 100644
--- a/packages/lambda-client/src/list-objects.ts
+++ b/packages/lambda-client/src/list-objects.ts
@@ -1,5 +1,5 @@
import {ListObjectsV2Command} from '@aws-sdk/client-s3';
-import type {ProviderSpecifics} from '@remotion/serverless';
+import type {ProviderSpecifics} from '@remotion/serverless-client';
import type {AwsProvider} from './aws-provider';
import {getS3Client} from './get-s3-client';
diff --git a/packages/lambda-client/src/make-lambda-payload.ts b/packages/lambda-client/src/make-lambda-payload.ts
index 4206918928..b995608387 100644
--- a/packages/lambda-client/src/make-lambda-payload.ts
+++ b/packages/lambda-client/src/make-lambda-payload.ts
@@ -1,41 +1,39 @@
import type {
AudioCodec,
+ BrowserSafeApis,
ChromiumOptions,
ColorSpace,
- FrameRange,
- LogLevel,
- PixelFormat,
- ProResProfile,
- ToOptions,
- VideoImageFormat,
- X264Preset,
-} from '@remotion/renderer';
-import type {BrowserSafeApis} from '@remotion/renderer/client';
-import type {
DeleteAfter,
DownloadBehavior,
+ FrameRange,
+ LogLevel,
OutNameInput,
+ PixelFormat,
Privacy,
+ ProResProfile,
ServerlessCodec,
ServerlessPayloads,
ServerlessStartPayload,
ServerlessStatusPayload,
+ ToOptions,
+ VideoImageFormat,
WebhookOption,
+ X264Preset,
} from '@remotion/serverless-client';
import {
+ ENABLE_V5_BREAKING_CHANGES,
ServerlessRoutines,
+ VERSION,
compressInputProps,
getNeedsToUpload,
serializeOrThrow,
validateDownloadBehavior,
validateFramesPerFunction,
} from '@remotion/serverless-client';
-import {VERSION} from 'remotion/version';
import type {AwsProvider} from './aws-provider';
import {awsImplementation} from './aws-provider';
import {validateWebhook} from '@remotion/serverless-client';
-import {NoReactInternals} from 'remotion/no-react';
import type {GetRenderProgressInput} from './get-render-progress';
import type {AwsRegion} from './regions';
import type {RenderStillOnLambdaNonNullInput} from './render-still-on-lambda';
@@ -195,7 +193,7 @@ export const makeLambdaRenderMediaPayload = async ({
downloadBehavior,
muted,
version: VERSION,
- overwrite: overwrite ?? NoReactInternals.ENABLE_V5_BREAKING_CHANGES,
+ overwrite: overwrite ?? ENABLE_V5_BREAKING_CHANGES,
audioBitrate: audioBitrate ?? null,
videoBitrate: videoBitrate ?? null,
encodingBufferSize: encodingBufferSize ?? null,
diff --git a/packages/lambda-client/src/pages-router-webhook.ts b/packages/lambda-client/src/pages-router-webhook.ts
index 5c49ee1fe3..94887c8206 100644
--- a/packages/lambda-client/src/pages-router-webhook.ts
+++ b/packages/lambda-client/src/pages-router-webhook.ts
@@ -1,4 +1,4 @@
-import type {WebhookPayload} from '@remotion/serverless';
+import type {WebhookPayload} from '@remotion/serverless-client';
import type {Response} from 'express';
import type {NextApiRequest, NextApiResponse} from 'next';
import type {NextWebhookArgs} from './app-router-webhook';
diff --git a/packages/lambda-client/src/render-media-on-lambda.ts b/packages/lambda-client/src/render-media-on-lambda.ts
index 2aed5f9a40..e696a618eb 100644
--- a/packages/lambda-client/src/render-media-on-lambda.ts
+++ b/packages/lambda-client/src/render-media-on-lambda.ts
@@ -1,22 +1,22 @@
import type {
AudioCodec,
+ BrowserSafeApis,
ChromiumOptions,
+ DownloadBehavior,
FrameRange,
+ OutNameInput,
PixelFormat,
+ Privacy,
ProResProfile,
+ ServerlessCodec,
ToOptions,
VideoImageFormat,
-} from '@remotion/renderer';
-import type {BrowserSafeApis} from '@remotion/renderer/client';
-import {wrapWithErrorHandling} from '@remotion/renderer/error-handling';
-import type {
- DownloadBehavior,
- OutNameInput,
- Privacy,
- ServerlessCodec,
WebhookOption,
} from '@remotion/serverless-client';
-import {ServerlessRoutines} from '@remotion/serverless-client';
+import {
+ ServerlessRoutines,
+ wrapWithErrorHandling,
+} from '@remotion/serverless-client';
import {awsImplementation, type AwsProvider} from './aws-provider';
import {
getCloudwatchMethodUrl,
diff --git a/packages/lambda-client/src/render-still-on-lambda.ts b/packages/lambda-client/src/render-still-on-lambda.ts
index 71b32451f2..76f87337db 100644
--- a/packages/lambda-client/src/render-still-on-lambda.ts
+++ b/packages/lambda-client/src/render-still-on-lambda.ts
@@ -1,19 +1,20 @@
import type {
+ BrowserSafeApis,
ChromiumOptions,
+ DownloadBehavior,
StillImageFormat,
ToOptions,
-} from '@remotion/renderer';
-import type {BrowserSafeApis} from '@remotion/renderer/client';
-import type {DownloadBehavior} from '@remotion/serverless-client';
+} from '@remotion/serverless-client';
import {ServerlessRoutines} from '@remotion/serverless-client';
-import {wrapWithErrorHandling} from '@remotion/renderer/error-handling';
import type {
CostsInfo,
+ OutNameInput,
+ Privacy,
ReceivedArtifact,
RenderStillFunctionResponsePayload,
-} from '@remotion/serverless';
-import type {OutNameInput, Privacy} from '@remotion/serverless-client';
+} from '@remotion/serverless-client';
+import {wrapWithErrorHandling} from '@remotion/serverless-client';
import {awsImplementation, type AwsProvider} from './aws-provider';
import {DEFAULT_MAX_RETRIES} from './constants';
import {getCloudwatchMethodUrl, getLambdaInsightsUrl} from './get-aws-urls';
diff --git a/packages/lambda/package.json b/packages/lambda/package.json
index 4894f0d46e..cd6f6f7a0e 100644
--- a/packages/lambda/package.json
+++ b/packages/lambda/package.json
@@ -28,7 +28,6 @@
"@remotion/serverless": "workspace:*",
"@remotion/streaming": "workspace:*",
"@smithy/abort-controller": "4.0.1",
- "mime-types": "2.1.34",
"remotion": "workspace:*",
"zod": "3.22.3"
},
diff --git a/packages/lambda/src/index.ts b/packages/lambda/src/index.ts
index 3648c7d1cb..68f9aee1dd 100644
--- a/packages/lambda/src/index.ts
+++ b/packages/lambda/src/index.ts
@@ -36,8 +36,8 @@ import {
renderVideoOnLambda,
validateWebhookSignature,
} from '@remotion/lambda-client';
+import type {FunctionInfo} from '@remotion/serverless';
import {NoReactInternals} from 'remotion/no-react';
-import type {FunctionInfo} from '../../serverless-client/src/provider-implementation';
import type {DeleteSiteInput, DeleteSiteOutput} from './api/delete-site';
import {deleteSite} from './api/delete-site';
import type {
diff --git a/packages/serverless-client/package.json b/packages/serverless-client/package.json
index d7ba2e51d6..f4aef0ff5d 100644
--- a/packages/serverless-client/package.json
+++ b/packages/serverless-client/package.json
@@ -27,7 +27,6 @@
"remotion": "workspace:*",
"@remotion/streaming": "workspace:*",
"@remotion/renderer": "workspace:*",
- "@remotion/licensing": "workspace:*",
"@remotion/eslint-config-internal": "workspace:*",
"eslint": "9.19.0"
},
diff --git a/packages/serverless-client/src/index.ts b/packages/serverless-client/src/index.ts
index 3927de72c0..3b79f9b0f4 100644
--- a/packages/serverless-client/src/index.ts
+++ b/packages/serverless-client/src/index.ts
@@ -1,21 +1,22 @@
+import {interpolate, NoReactInternals, random} from 'remotion/no-react';
export * from './constants';
export {
- MINIMUM_FRAMES_PER_FUNCTIONS,
- REMOTION_BUCKET_PREFIX,
- ServerlessCodec,
- ServerlessPayload,
- ServerlessPayloads,
- ServerlessRoutines,
- ServerlessStartPayload,
- ServerlessStatusPayload,
artifactName,
customOutName,
expiryDays,
+ MINIMUM_FRAMES_PER_FUNCTIONS,
outName,
outStillName,
overallProgressKey,
+ REMOTION_BUCKET_PREFIX,
rendersPrefix,
+ ServerlessCodec,
serverlessCodecs,
+ ServerlessPayload,
+ ServerlessPayloads,
+ ServerlessRoutines,
+ ServerlessStartPayload,
+ ServerlessStatusPayload,
type CustomCredentials,
type CustomCredentialsWithoutSensitiveData,
type DeleteAfter,
@@ -29,15 +30,32 @@ export {
} from './constants';
export {GenericRenderProgress} from './render-progress';
export {
- SerializedArtifact,
deserializeArtifact,
serializeArtifact,
+ SerializedArtifact,
} from './serialize-artifact';
export {validateDownloadBehavior} from './validate-download-behavior';
export {validateFramesPerFunction} from './validate-frames-per-function';
+export type {
+ AudioCodec,
+ ChromiumOptions,
+ ColorSpace,
+ FrameRange,
+ LogLevel,
+ PixelFormat,
+ ProResProfile,
+ StillImageFormat,
+ ToOptions,
+ VideoImageFormat,
+ X264Preset,
+} from '@remotion/renderer';
+export {BrowserSafeApis} from '@remotion/renderer/client';
+export {wrapWithErrorHandling} from '@remotion/renderer/error-handling';
export * from '@remotion/streaming';
+export type {VideoConfig} from 'remotion/no-react';
+export {VERSION} from 'remotion/version';
export {Await} from './await';
export {calculateChunkTimes} from './calculate-chunk-times';
export {
@@ -70,8 +88,8 @@ export {inputPropsKey, resolvedPropsKey} from './input-props-keys';
export {inspectErrors} from './inspect-error';
export {makeBucketName} from './make-bucket-name';
export {
- OVERHEAD_TIME_PER_LAMBDA,
getMostExpensiveChunks,
+ OVERHEAD_TIME_PER_LAMBDA,
} from './most-expensive-chunks';
export {OverallRenderProgress} from './overall-render-progress';
export {getProgress} from './progress';
@@ -80,14 +98,14 @@ export {RenderMetadata} from './render-metadata';
export {OrError, ServerlessReturnValues} from './return-values';
export {streamToString} from './stream-to-string';
export {
+ formatMap,
+ makeStreamPayload,
MessageTypeId,
+ messageTypeIdToMessageType,
OnMessage,
OnStream,
StreamingMessage,
StreamingPayload,
- formatMap,
- makeStreamPayload,
- messageTypeIdToMessageType,
} from './streaming/streaming';
export {truthy} from './truthy';
export * from './types';
@@ -95,4 +113,14 @@ export {validateBucketName} from './validate-bucket-name';
export {validateOutname} from './validate-outname';
export {validatePrivacy} from './validate-privacy';
export {validateWebhook} from './validate-webhook';
+export * from './webhook-types';
export {EnhancedErrorInfo, FunctionErrorInfo} from './write-error-to-storage';
+export {interpolate, random};
+
+export const {
+ ENABLE_V5_BREAKING_CHANGES,
+ serializeJSONWithDate,
+ validateFps,
+ validateDimension,
+ validateDurationInFrames,
+} = NoReactInternals;
diff --git a/packages/serverless-client/src/webhook-types.ts b/packages/serverless-client/src/webhook-types.ts
new file mode 100644
index 0000000000..773fd29461
--- /dev/null
+++ b/packages/serverless-client/src/webhook-types.ts
@@ -0,0 +1,36 @@
+import type {AfterRenderCost} from './constants';
+import type {EnhancedErrorInfo} from './write-error-to-storage';
+
+type StaticWebhookPayload = {
+ renderId: string;
+ expectedBucketOwner: string;
+ bucketName: string;
+ customData: Record<string, unknown> | null;
+};
+
+export type WebhookErrorPayload = StaticWebhookPayload & {
+ type: 'error';
+ errors: {
+ message: string;
+ name: string;
+ stack: string;
+ }[];
+};
+
+export type WebhookSuccessPayload = StaticWebhookPayload & {
+ type: 'success';
+ lambdaErrors: EnhancedErrorInfo[];
+ outputUrl: string | undefined;
+ outputFile: string | undefined;
+ timeToFinish: number | undefined;
+ costs: AfterRenderCost;
+};
+
+export type WebhookTimeoutPayload = StaticWebhookPayload & {
+ type: 'timeout';
+};
+
+export type WebhookPayload =
+ | WebhookErrorPayload
+ | WebhookSuccessPayload
+ | WebhookTimeoutPayload;
diff --git a/packages/serverless/package.json b/packages/serverless/package.json
index 09b7c826c3..9efe6f8da4 100644
--- a/packages/serverless/package.json
+++ b/packages/serverless/package.json
@@ -25,6 +25,7 @@
"dependencies": {
"@remotion/renderer": "workspace:*",
"@remotion/bundler": "workspace:*",
+ "@remotion/licensing": "workspace:*",
"@remotion/serverless-client": "workspace:*"
},
"devDependencies": {
diff --git a/packages/serverless/src/best-frames-per-function-param.ts b/packages/serverless/src/best-frames-per-function-param.ts
index 93982fecea..f50c6479f9 100644
--- a/packages/serverless/src/best-frames-per-function-param.ts
+++ b/packages/serverless/src/best-frames-per-function-param.ts
@@ -1,4 +1,4 @@
-import {interpolate} from 'remotion/no-react';
+import {interpolate} from '@remotion/serverless-client';
// Always update the code in docs/lambda/concurrency.md too
diff --git a/packages/serverless/src/get-browser-instance.ts b/packages/serverless/src/get-browser-instance.ts
index 761356ddec..da14ddb6bc 100644
--- a/packages/serverless/src/get-browser-instance.ts
+++ b/packages/serverless/src/get-browser-instance.ts
@@ -5,7 +5,7 @@ import type {
CloudProvider,
ProviderSpecifics,
} from '@remotion/serverless-client';
-import {VERSION} from 'remotion/version';
+import {VERSION} from '@remotion/serverless-client';
import type {
GetBrowserInstance,
InsideFunctionSpecifics,
diff --git a/packages/serverless/src/handlers/check-version-mismatch.ts b/packages/serverless/src/handlers/check-version-mismatch.ts
index 7b54e1392e..d5b39732a4 100644
--- a/packages/serverless/src/handlers/check-version-mismatch.ts
+++ b/packages/serverless/src/handlers/check-version-mismatch.ts
@@ -2,8 +2,7 @@ import type {
CloudProvider,
ServerlessPayload,
} from '@remotion/serverless-client';
-import {ServerlessRoutines} from '@remotion/serverless-client';
-import {VERSION} from 'remotion/version';
+import {ServerlessRoutines, VERSION} from '@remotion/serverless-client';
import type {InsideFunctionSpecifics} from '../provider-implementation';
export const checkVersionMismatch = <Provider extends CloudProvider>({
diff --git a/packages/serverless/src/handlers/launch.ts b/packages/serverless/src/handlers/launch.ts
index 524f5fe404..44a5b882e2 100644
--- a/packages/serverless/src/handlers/launch.ts
+++ b/packages/serverless/src/handlers/launch.ts
@@ -2,10 +2,10 @@
import type {EmittedArtifact, LogOptions} from '@remotion/renderer';
import {RenderInternals} from '@remotion/renderer';
+import {VERSION} from '@remotion/serverless-client';
import {existsSync, mkdirSync, rmSync} from 'fs';
import {type EventEmitter} from 'node:events';
import {join} from 'path';
-import {VERSION} from 'remotion/version';
import type {
InsideFunctionSpecifics,
WebhookClient,
diff --git a/packages/serverless/src/handlers/renderer.ts b/packages/serverless/src/handlers/renderer.ts
index 9fc62dae46..f68091e1ee 100644
--- a/packages/serverless/src/handlers/renderer.ts
+++ b/packages/serverless/src/handlers/renderer.ts
@@ -20,10 +20,10 @@ import {
serializeArtifact,
ServerlessRoutines,
truthy,
+ VERSION,
} from '@remotion/serverless-client';
import fs from 'node:fs';
import path from 'node:path';
-import {VERSION} from 'remotion/version';
import {
canConcatAudioSeamlessly,
canConcatVideoSeamlessly,
diff --git a/packages/serverless/src/handlers/still.ts b/packages/serverless/src/handlers/still.ts
index f1e9007ea6..adba2586c5 100644
--- a/packages/serverless/src/handlers/still.ts
+++ b/packages/serverless/src/handlers/still.ts
@@ -18,15 +18,15 @@ import {
getExpectedOutName,
internalGetOrCreateBucket,
overallProgressKey,
+ serializeJSONWithDate,
ServerlessRoutines,
validateDownloadBehavior,
validateOutname,
validatePrivacy,
+ VERSION,
} from '@remotion/serverless-client';
import fs from 'node:fs';
import path from 'node:path';
-import {NoReactInternals} from 'remotion/no-react';
-import {VERSION} from 'remotion/version';
import {cleanupSerializedInputProps} from '../cleanup-serialized-input-props';
import {getTmpDirStateIfENoSp} from '../get-tmp-dir';
import {onDownloadsHelper} from '../on-downloads-helpers';
@@ -294,12 +294,11 @@ const innerStillHandler = async <Provider extends CloudProvider>(
port: null,
server,
logLevel: params.logLevel,
- serializedResolvedPropsWithCustomSchema:
- NoReactInternals.serializeJSONWithDate({
- indent: undefined,
- staticBase: null,
- data: composition.props,
- }).serializedString,
+ serializedResolvedPropsWithCustomSchema: serializeJSONWithDate({
+ indent: undefined,
+ staticBase: null,
+ data: composition.props,
+ }).serializedString,
offthreadVideoCacheSizeInBytes: params.offthreadVideoCacheSizeInBytes,
binariesDirectory: null,
onBrowserDownload,
diff --git a/packages/serverless/src/index.ts b/packages/serverless/src/index.ts
index 030deeaa6d..094cffbb12 100644
--- a/packages/serverless/src/index.ts
+++ b/packages/serverless/src/index.ts
@@ -11,13 +11,7 @@ export {startHandler} from './handlers/start';
export {stillHandler} from './handlers/still';
export {infoHandler} from './info';
export {innerHandler} from './inner-routine';
-export {
- WebhookErrorPayload,
- WebhookPayload,
- WebhookSuccessPayload,
- WebhookTimeoutPayload,
- invokeWebhook,
-} from './invoke-webhook';
+export {invokeWebhook} from './invoke-webhook';
export {setCurrentRequestId, stopLeakDetection} from './leak-detection';
export * from './provider-implementation';
export {ResponseStream} from './streaming/response-stream';
diff --git a/packages/serverless/src/info.ts b/packages/serverless/src/info.ts
index 3a653756d6..1d2fa74f70 100644
--- a/packages/serverless/src/info.ts
+++ b/packages/serverless/src/info.ts
@@ -2,8 +2,7 @@ import type {
CloudProvider,
ServerlessPayload,
} from '@remotion/serverless-client';
-import {ServerlessRoutines} from '@remotion/serverless-client';
-import {VERSION} from 'remotion/version';
+import {ServerlessRoutines, VERSION} from '@remotion/serverless-client';
export const infoHandler = <Provider extends CloudProvider>(
serverlessParams: ServerlessPayload<Provider>,
diff --git a/packages/serverless/src/invoke-webhook.ts b/packages/serverless/src/invoke-webhook.ts
index d2e685f867..7227c73a0b 100644
--- a/packages/serverless/src/invoke-webhook.ts
+++ b/packages/serverless/src/invoke-webhook.ts
@@ -1,8 +1,4 @@
import {RenderInternals} from '@remotion/renderer';
-import type {
- AfterRenderCost,
- EnhancedErrorInfo,
-} from '@remotion/serverless-client';
import * as Crypto from 'node:crypto';
import type {
InvokeWebhook,
@@ -19,40 +15,6 @@ export function calculateSignature(payload: string, secret: string | null) {
return signature;
}
-type StaticWebhookPayload = {
- renderId: string;
- expectedBucketOwner: string;
- bucketName: string;
- customData: Record<string, unknown> | null;
-};
-
-export type WebhookErrorPayload = StaticWebhookPayload & {
- type: 'error';
- errors: {
- message: string;
- name: string;
- stack: string;
- }[];
-};
-
-export type WebhookSuccessPayload = StaticWebhookPayload & {
- type: 'success';
- lambdaErrors: EnhancedErrorInfo[];
- outputUrl: string | undefined;
- outputFile: string | undefined;
- timeToFinish: number | undefined;
- costs: AfterRenderCost;
-};
-
-export type WebhookTimeoutPayload = StaticWebhookPayload & {
- type: 'timeout';
-};
-
-export type WebhookPayload =
- | WebhookErrorPayload
- | WebhookSuccessPayload
- | WebhookTimeoutPayload;
-
// Don't handle 304 status code (Not Modified) as a redirect,
// since the browser will display the right page.
const redirectStatusCodes = [301, 302, 303, 307, 308];
diff --git a/packages/serverless/src/provider-implementation.ts b/packages/serverless/src/provider-implementation.ts
index 561bb21dad..d97c5e1697 100644
--- a/packages/serverless/src/provider-implementation.ts
+++ b/packages/serverless/src/provider-implementation.ts
@@ -11,11 +11,11 @@ import type {
Privacy,
ProviderSpecifics,
ReceivedArtifact,
+ WebhookPayload,
} from '@remotion/serverless-client';
import type https from 'https';
import type http from 'node:http';
import type {LaunchedBrowser} from './get-browser-instance';
-import type {WebhookPayload} from './invoke-webhook';
export type MakeArtifactWithDetails<Provider extends CloudProvider> = (params: {
region: Provider['region'];
diff --git a/packages/serverless/src/validate-composition.ts b/packages/serverless/src/validate-composition.ts
index 2339fbc580..4047ec8888 100644
--- a/packages/serverless/src/validate-composition.ts
+++ b/packages/serverless/src/validate-composition.ts
@@ -10,8 +10,8 @@ import type {
Await,
CloudProvider,
ProviderSpecifics,
+ VideoConfig,
} from '@remotion/serverless-client';
-import type {VideoConfig} from 'remotion/no-react';
import {
validateDimension,
validateDurationInFrames,
diff --git a/packages/serverless/src/validate.ts b/packages/serverless/src/validate.ts
index d15e780439..0fd8632d7e 100644
--- a/packages/serverless/src/validate.ts
+++ b/packages/serverless/src/validate.ts
@@ -1,9 +1,5 @@
-/* eslint-disable prefer-destructuring */
-import {NoReactInternals} from 'remotion/no-react';
-
-export const validateFps: typeof NoReactInternals.validateFps =
- NoReactInternals.validateFps;
-export const validateDimension: typeof NoReactInternals.validateDimension =
- NoReactInternals.validateDimension;
-export const validateDurationInFrames: typeof NoReactInternals.validateDurationInFrames =
- NoReactInternals.validateDurationInFrames;
+export {
+ validateDimension,
+ validateDurationInFrames,
+ validateFps,
+} from '@remotion/serverless-client';
diff --git a/pnpm-lock.yaml b/pnpm-lock.yaml
index 1d6163f15b..9e0c3692f8 100644
--- a/pnpm-lock.yaml
+++ b/pnpm-lock.yaml
@@ -1380,9 +1380,6 @@ importers:
'@smithy/abort-controller':
specifier: 4.0.1
version: 4.0.1
- mime-types:
- specifier: 2.1.34
- version: 2.1.34
remotion:
specifier: workspace:*
version: link:../core
@@ -1444,9 +1441,15 @@ importers:
'@aws-sdk/client-sts':
specifier: 3.738.0
version: 3.738.0
+ '@aws-sdk/credential-providers':
+ specifier: 3.738.0
+ version: 3.738.0
'@aws-sdk/s3-request-presigner':
specifier: 3.738.0
version: 3.738.0
+ mime-types:
+ specifier: 2.1.34
+ version: 2.1.34
devDependencies:
'@remotion/eslint-config-internal':
specifier: workspace:*
@@ -1457,6 +1460,9 @@ importers:
'@types/express':
specifier: ^5.0.0
version: 5.0.0
+ '@types/mime-types':
+ specifier: 2.1.1
+ version: 2.1.1
eslint:
specifier: 9.19.0
version: 9.19.0
@@ -1900,6 +1906,9 @@ importers:
'@remotion/bundler':
specifier: workspace:*
version: link:../bundler
+ '@remotion/licensing':
+ specifier: workspace:*
+ version: link:../licensing
'@remotion/renderer':
specifier: workspace:*
version: link:../renderer
@@ -1919,9 +1928,6 @@ importers:
'@remotion/eslint-config-internal':
specifier: workspace:*
version: link:../eslint-config-internal
- '@remotion/licensing':
- specifier: workspace:*
- version: link:../licensing
'@remotion/renderer':
specifier: workspace:*
version: link:../renderer