@remotion/cloudrun 4.0.30 → 4.0.32
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/.turbo/turbo-build.log +3 -3
- package/.turbo/turbo-lint.log +5 -0
- package/dist/api/delete-site.js +2 -1
- package/dist/api/deploy-service.d.ts +13 -1
- package/dist/api/deploy-service.js +15 -17
- package/dist/api/helpers/lifecycle-rules.d.ts +0 -0
- package/dist/api/helpers/lifecycle-rules.js +1 -0
- package/dist/api/render-media-on-cloudrun.d.ts +41 -2
- package/dist/api/render-media-on-cloudrun.js +44 -3
- package/dist/cli/commands/render/index.js +24 -20
- package/dist/cli/commands/services/deploy.js +7 -5
- package/dist/functions/helpers/payloads.d.ts +4 -4
- package/package.json +6 -6
package/.turbo/turbo-build.log
CHANGED
|
@@ -1,13 +1,13 @@
|
|
|
1
1
|
|
|
2
|
-
> @remotion/cloudrun@4.0.
|
|
2
|
+
> @remotion/cloudrun@4.0.31 build /Users/jonathanburger/remotion/packages/cloudrun
|
|
3
3
|
> tsc -d && cp src/shared/sa-permissions.json dist/shared/sa-permissions.json && pnpm run buildContainer && pnpm run tarInstaller
|
|
4
4
|
|
|
5
5
|
|
|
6
|
-
> @remotion/cloudrun@4.0.
|
|
6
|
+
> @remotion/cloudrun@4.0.31 buildContainer /Users/jonathanburger/remotion/packages/cloudrun
|
|
7
7
|
> ts-node src/admin/bundle-renderLogic.ts
|
|
8
8
|
|
|
9
9
|
distribution bundled.
|
|
10
10
|
|
|
11
|
-
> @remotion/cloudrun@4.0.
|
|
11
|
+
> @remotion/cloudrun@4.0.31 tarInstaller /Users/jonathanburger/remotion/packages/cloudrun
|
|
12
12
|
> ts-node src/admin/bundle-installer.ts
|
|
13
13
|
|
package/dist/api/delete-site.js
CHANGED
|
@@ -14,7 +14,8 @@ const deleteSite = ({ bucketName, siteName, }) => {
|
|
|
14
14
|
return new Promise((resolve, reject) => {
|
|
15
15
|
const cloudStorageClient = (0, get_cloud_storage_client_1.getCloudStorageClient)();
|
|
16
16
|
cloudStorageClient.bucket(bucketName).deleteFiles({
|
|
17
|
-
|
|
17
|
+
// The `/` is important to not accidentially delete sites with the same name but containing a suffix.
|
|
18
|
+
prefix: `sites/${siteName}/`,
|
|
18
19
|
}, (err) => {
|
|
19
20
|
if (err) {
|
|
20
21
|
// Reject the Promise with the error
|
|
@@ -1,3 +1,13 @@
|
|
|
1
|
+
type InternalDeployServiceInput = {
|
|
2
|
+
performImageVersionValidation: boolean;
|
|
3
|
+
memoryLimit: string;
|
|
4
|
+
cpuLimit: string;
|
|
5
|
+
timeoutSeconds: number;
|
|
6
|
+
minInstances: number;
|
|
7
|
+
maxInstances: number;
|
|
8
|
+
projectID: string;
|
|
9
|
+
region: string;
|
|
10
|
+
};
|
|
1
11
|
export type DeployServiceInput = {
|
|
2
12
|
performImageVersionValidation?: boolean;
|
|
3
13
|
memoryLimit?: string;
|
|
@@ -14,6 +24,7 @@ export type DeployServiceOutput = {
|
|
|
14
24
|
uri: string;
|
|
15
25
|
alreadyExists: boolean;
|
|
16
26
|
};
|
|
27
|
+
export declare const internalDeployService: (args_0: InternalDeployServiceInput) => Promise<DeployServiceOutput>;
|
|
17
28
|
/**
|
|
18
29
|
* @description Creates a Cloud Run service in your project that will be able to render a video in GCP.
|
|
19
30
|
* @link https://remotion.dev/docs/cloudrun/deployservice
|
|
@@ -25,4 +36,5 @@ export type DeployServiceOutput = {
|
|
|
25
36
|
* @param params.region GCP region to deploy the Cloud Run service to.
|
|
26
37
|
* @returns {Promise<DeployServiceOutput>} See documentation for detailed structure
|
|
27
38
|
*/
|
|
28
|
-
export declare const deployService: (
|
|
39
|
+
export declare const deployService: ({ performImageVersionValidation, memoryLimit, cpuLimit, timeoutSeconds, minInstances, maxInstances, projectID, region, }: DeployServiceInput) => Promise<DeployServiceOutput>;
|
|
40
|
+
export {};
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.deployService = void 0;
|
|
3
|
+
exports.deployService = exports.internalDeployService = void 0;
|
|
4
4
|
const pure_1 = require("@remotion/renderer/pure");
|
|
5
5
|
const constants_1 = require("../shared/constants");
|
|
6
6
|
const generate_service_name_1 = require("../shared/generate-service-name");
|
|
@@ -16,21 +16,6 @@ const deployServiceRaw = async ({ performImageVersionValidation = true, memoryLi
|
|
|
16
16
|
if (performImageVersionValidation) {
|
|
17
17
|
(0, validate_image_remotion_version_1.validateImageRemotionVersion)();
|
|
18
18
|
}
|
|
19
|
-
if (!memoryLimit) {
|
|
20
|
-
memoryLimit = '2Gi';
|
|
21
|
-
}
|
|
22
|
-
if (!cpuLimit) {
|
|
23
|
-
cpuLimit = '1.0';
|
|
24
|
-
}
|
|
25
|
-
if (!timeoutSeconds) {
|
|
26
|
-
timeoutSeconds = constants_1.DEFAULT_TIMEOUT;
|
|
27
|
-
}
|
|
28
|
-
if (!minInstances) {
|
|
29
|
-
minInstances = constants_1.DEFAULT_MIN_INSTANCES;
|
|
30
|
-
}
|
|
31
|
-
if (!maxInstances) {
|
|
32
|
-
maxInstances = constants_1.DEFAULT_MAX_INSTANCES;
|
|
33
|
-
}
|
|
34
19
|
const parent = `projects/${projectID}/locations/${region}`;
|
|
35
20
|
const cloudRunClient = (0, get_cloud_run_client_1.getCloudRunClient)();
|
|
36
21
|
const existingService = await (0, check_if_service_exists_1.checkIfServiceExists)({
|
|
@@ -77,6 +62,7 @@ const deployServiceRaw = async ({ performImageVersionValidation = true, memoryLi
|
|
|
77
62
|
alreadyExists: false,
|
|
78
63
|
};
|
|
79
64
|
};
|
|
65
|
+
exports.internalDeployService = pure_1.PureJSAPIs.wrapWithErrorHandling(deployServiceRaw);
|
|
80
66
|
/**
|
|
81
67
|
* @description Creates a Cloud Run service in your project that will be able to render a video in GCP.
|
|
82
68
|
* @link https://remotion.dev/docs/cloudrun/deployservice
|
|
@@ -88,4 +74,16 @@ const deployServiceRaw = async ({ performImageVersionValidation = true, memoryLi
|
|
|
88
74
|
* @param params.region GCP region to deploy the Cloud Run service to.
|
|
89
75
|
* @returns {Promise<DeployServiceOutput>} See documentation for detailed structure
|
|
90
76
|
*/
|
|
91
|
-
|
|
77
|
+
const deployService = ({ performImageVersionValidation = true, memoryLimit, cpuLimit, timeoutSeconds, minInstances, maxInstances, projectID, region, }) => {
|
|
78
|
+
return (0, exports.internalDeployService)({
|
|
79
|
+
performImageVersionValidation,
|
|
80
|
+
memoryLimit: memoryLimit !== null && memoryLimit !== void 0 ? memoryLimit : '2Gi',
|
|
81
|
+
cpuLimit: cpuLimit !== null && cpuLimit !== void 0 ? cpuLimit : '1.0',
|
|
82
|
+
timeoutSeconds: timeoutSeconds !== null && timeoutSeconds !== void 0 ? timeoutSeconds : constants_1.DEFAULT_TIMEOUT,
|
|
83
|
+
minInstances: minInstances !== null && minInstances !== void 0 ? minInstances : constants_1.DEFAULT_MIN_INSTANCES,
|
|
84
|
+
maxInstances: maxInstances !== null && maxInstances !== void 0 ? maxInstances : constants_1.DEFAULT_MAX_INSTANCES,
|
|
85
|
+
projectID,
|
|
86
|
+
region,
|
|
87
|
+
});
|
|
88
|
+
};
|
|
89
|
+
exports.deployService = deployService;
|
|
File without changes
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
"use strict";
|
|
@@ -1,8 +1,45 @@
|
|
|
1
|
-
import type { AudioCodec, ChromiumOptions, ColorSpace, FrameRange, LogLevel, PixelFormat, ProResProfile, ToOptions, VideoImageFormat, X264Preset } from '@remotion/renderer';
|
|
1
|
+
import type { AudioCodec, ChromiumOptions, ColorSpace, Crf, FrameRange, LogLevel, PixelFormat, ProResProfile, ToOptions, VideoImageFormat, X264Preset } from '@remotion/renderer';
|
|
2
2
|
import type { BrowserSafeApis } from '@remotion/renderer/client';
|
|
3
3
|
import type { CloudRunCrashResponse, RenderMediaOnCloudrunOutput } from '../functions/helpers/payloads';
|
|
4
4
|
import type { GcpRegion } from '../pricing/gcp-regions';
|
|
5
5
|
import type { CloudrunCodec } from '../shared/validate-gcp-codec';
|
|
6
|
+
type InternalRenderMediaOnCloudrun = {
|
|
7
|
+
cloudRunUrl: string | undefined;
|
|
8
|
+
serviceName: string | undefined;
|
|
9
|
+
region: GcpRegion;
|
|
10
|
+
serveUrl: string;
|
|
11
|
+
composition: string;
|
|
12
|
+
inputProps: Record<string, unknown>;
|
|
13
|
+
privacy: 'public' | 'private' | undefined;
|
|
14
|
+
forceBucketName: string | undefined;
|
|
15
|
+
outName: string | undefined;
|
|
16
|
+
updateRenderProgress: ((progress: number, error?: boolean) => void) | undefined;
|
|
17
|
+
codec: CloudrunCodec;
|
|
18
|
+
audioCodec: AudioCodec | undefined;
|
|
19
|
+
jpegQuality: number | undefined;
|
|
20
|
+
audioBitrate: string | null;
|
|
21
|
+
videoBitrate: string | null;
|
|
22
|
+
proResProfile: ProResProfile | undefined;
|
|
23
|
+
x264Preset: X264Preset | undefined;
|
|
24
|
+
crf: Crf | null;
|
|
25
|
+
pixelFormat: PixelFormat | undefined;
|
|
26
|
+
imageFormat: VideoImageFormat | undefined;
|
|
27
|
+
scale: number | undefined;
|
|
28
|
+
everyNthFrame: number | undefined;
|
|
29
|
+
numberOfGifLoops: number | null;
|
|
30
|
+
frameRange: FrameRange | undefined;
|
|
31
|
+
envVariables: Record<string, string> | undefined;
|
|
32
|
+
chromiumOptions: ChromiumOptions | undefined;
|
|
33
|
+
muted: boolean | undefined;
|
|
34
|
+
forceWidth: number | null;
|
|
35
|
+
forceHeight?: number | null;
|
|
36
|
+
logLevel: LogLevel | undefined;
|
|
37
|
+
delayRenderTimeoutInMilliseconds: number | undefined;
|
|
38
|
+
concurrency: number | string | null;
|
|
39
|
+
enforceAudioTrack: boolean | undefined;
|
|
40
|
+
preferLossless: boolean | undefined;
|
|
41
|
+
colorSpace: ColorSpace | undefined;
|
|
42
|
+
} & Partial<ToOptions<typeof BrowserSafeApis.optionsMap.renderMediaOnCloudRun>>;
|
|
6
43
|
export type RenderMediaOnCloudrunInput = {
|
|
7
44
|
cloudRunUrl?: string;
|
|
8
45
|
serviceName?: string;
|
|
@@ -39,7 +76,8 @@ export type RenderMediaOnCloudrunInput = {
|
|
|
39
76
|
enforceAudioTrack?: boolean;
|
|
40
77
|
preferLossless?: boolean;
|
|
41
78
|
colorSpace?: ColorSpace;
|
|
42
|
-
} & Partial<ToOptions<typeof BrowserSafeApis.optionsMap.
|
|
79
|
+
} & Partial<ToOptions<typeof BrowserSafeApis.optionsMap.renderMediaOnCloudRun>>;
|
|
80
|
+
export declare const internalRenderMediaOnCloudrun: ({ cloudRunUrl, serviceName, region, serveUrl, composition, inputProps, codec, forceBucketName, privacy, outName, updateRenderProgress, jpegQuality, audioCodec, audioBitrate, videoBitrate, proResProfile, x264Preset, crf, pixelFormat, imageFormat, scale, everyNthFrame, numberOfGifLoops, frameRange, envVariables, chromiumOptions, muted, forceWidth, forceHeight, logLevel, delayRenderTimeoutInMilliseconds, concurrency, enforceAudioTrack, preferLossless, offthreadVideoCacheSizeInBytes, colorSpace, }: InternalRenderMediaOnCloudrun) => Promise<RenderMediaOnCloudrunOutput | CloudRunCrashResponse>;
|
|
43
81
|
/**
|
|
44
82
|
* @description Triggers a render on a GCP Cloud Run service given a composition and a Cloud Run URL.
|
|
45
83
|
* @see [Documentation](https://remotion.dev/docs/cloudrun/renderMediaOnGcp)
|
|
@@ -80,3 +118,4 @@ export type RenderMediaOnCloudrunInput = {
|
|
|
80
118
|
* @returns {Promise<RenderMediaOnCloudrunOutput>} See documentation for detailed structure
|
|
81
119
|
*/
|
|
82
120
|
export declare const renderMediaOnCloudrun: ({ cloudRunUrl, serviceName, region, serveUrl, composition, inputProps, codec, forceBucketName, privacy, outName, updateRenderProgress, jpegQuality, audioCodec, audioBitrate, videoBitrate, proResProfile, x264Preset, crf, pixelFormat, imageFormat, scale, everyNthFrame, numberOfGifLoops, frameRange, envVariables, chromiumOptions, muted, forceWidth, forceHeight, logLevel, delayRenderTimeoutInMilliseconds, concurrency, enforceAudioTrack, preferLossless, offthreadVideoCacheSizeInBytes, colorSpace, }: RenderMediaOnCloudrunInput) => Promise<RenderMediaOnCloudrunOutput | CloudRunCrashResponse>;
|
|
121
|
+
export {};
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.renderMediaOnCloudrun = void 0;
|
|
3
|
+
exports.renderMediaOnCloudrun = exports.internalRenderMediaOnCloudrun = void 0;
|
|
4
4
|
const renderer_1 = require("@remotion/renderer");
|
|
5
5
|
const pure_1 = require("@remotion/renderer/pure");
|
|
6
6
|
const remotion_1 = require("remotion");
|
|
@@ -10,7 +10,7 @@ const validate_serveurl_1 = require("../shared/validate-serveurl");
|
|
|
10
10
|
const get_or_create_bucket_1 = require("./get-or-create-bucket");
|
|
11
11
|
const get_auth_client_for_url_1 = require("./helpers/get-auth-client-for-url");
|
|
12
12
|
const get_cloudrun_endpoint_1 = require("./helpers/get-cloudrun-endpoint");
|
|
13
|
-
const
|
|
13
|
+
const internalRenderMediaOnCloudrunRaw = async ({ cloudRunUrl, serviceName, region, serveUrl, composition, inputProps, codec, forceBucketName, privacy, outName, updateRenderProgress, jpegQuality, audioCodec, audioBitrate, videoBitrate, proResProfile, x264Preset, crf, pixelFormat, imageFormat, scale, everyNthFrame, numberOfGifLoops, frameRange, envVariables, chromiumOptions, muted, forceWidth, forceHeight, logLevel, delayRenderTimeoutInMilliseconds, concurrency, enforceAudioTrack, preferLossless, offthreadVideoCacheSizeInBytes, colorSpace, }) => {
|
|
14
14
|
const actualCodec = (0, validate_gcp_codec_1.validateCloudrunCodec)(codec);
|
|
15
15
|
(0, validate_serveurl_1.validateServeUrl)(serveUrl);
|
|
16
16
|
if (privacy)
|
|
@@ -121,6 +121,7 @@ const renderMediaOnCloudrunRaw = async ({ cloudRunUrl, serviceName, region, serv
|
|
|
121
121
|
});
|
|
122
122
|
return renderResponse;
|
|
123
123
|
};
|
|
124
|
+
exports.internalRenderMediaOnCloudrun = pure_1.PureJSAPIs.wrapWithErrorHandling(internalRenderMediaOnCloudrunRaw);
|
|
124
125
|
/**
|
|
125
126
|
* @description Triggers a render on a GCP Cloud Run service given a composition and a Cloud Run URL.
|
|
126
127
|
* @see [Documentation](https://remotion.dev/docs/cloudrun/renderMediaOnGcp)
|
|
@@ -160,4 +161,44 @@ const renderMediaOnCloudrunRaw = async ({ cloudRunUrl, serviceName, region, serv
|
|
|
160
161
|
* @param params.preferLossless Uses a lossless audio codec, if one is available for the codec. If you set audioCodec, it takes priority over preferLossless.
|
|
161
162
|
* @returns {Promise<RenderMediaOnCloudrunOutput>} See documentation for detailed structure
|
|
162
163
|
*/
|
|
163
|
-
|
|
164
|
+
const renderMediaOnCloudrun = ({ cloudRunUrl, serviceName, region, serveUrl, composition, inputProps, codec, forceBucketName, privacy, outName, updateRenderProgress, jpegQuality, audioCodec, audioBitrate, videoBitrate, proResProfile, x264Preset, crf, pixelFormat, imageFormat, scale, everyNthFrame, numberOfGifLoops, frameRange, envVariables, chromiumOptions, muted, forceWidth, forceHeight, logLevel, delayRenderTimeoutInMilliseconds, concurrency, enforceAudioTrack, preferLossless, offthreadVideoCacheSizeInBytes, colorSpace, }) => {
|
|
165
|
+
return (0, exports.internalRenderMediaOnCloudrun)({
|
|
166
|
+
cloudRunUrl: cloudRunUrl !== null && cloudRunUrl !== void 0 ? cloudRunUrl : undefined,
|
|
167
|
+
serviceName: serviceName !== null && serviceName !== void 0 ? serviceName : undefined,
|
|
168
|
+
region,
|
|
169
|
+
serveUrl,
|
|
170
|
+
composition,
|
|
171
|
+
inputProps: inputProps !== null && inputProps !== void 0 ? inputProps : {},
|
|
172
|
+
codec,
|
|
173
|
+
forceBucketName: forceBucketName !== null && forceBucketName !== void 0 ? forceBucketName : undefined,
|
|
174
|
+
privacy: privacy !== null && privacy !== void 0 ? privacy : undefined,
|
|
175
|
+
outName: outName !== null && outName !== void 0 ? outName : undefined,
|
|
176
|
+
updateRenderProgress: updateRenderProgress !== null && updateRenderProgress !== void 0 ? updateRenderProgress : undefined,
|
|
177
|
+
jpegQuality: jpegQuality !== null && jpegQuality !== void 0 ? jpegQuality : undefined,
|
|
178
|
+
audioCodec: audioCodec !== null && audioCodec !== void 0 ? audioCodec : undefined,
|
|
179
|
+
audioBitrate: audioBitrate !== null && audioBitrate !== void 0 ? audioBitrate : null,
|
|
180
|
+
videoBitrate: videoBitrate !== null && videoBitrate !== void 0 ? videoBitrate : null,
|
|
181
|
+
proResProfile: proResProfile !== null && proResProfile !== void 0 ? proResProfile : undefined,
|
|
182
|
+
x264Preset: x264Preset !== null && x264Preset !== void 0 ? x264Preset : undefined,
|
|
183
|
+
crf: crf !== null && crf !== void 0 ? crf : null,
|
|
184
|
+
pixelFormat: pixelFormat !== null && pixelFormat !== void 0 ? pixelFormat : undefined,
|
|
185
|
+
imageFormat: imageFormat !== null && imageFormat !== void 0 ? imageFormat : undefined,
|
|
186
|
+
scale: scale !== null && scale !== void 0 ? scale : undefined,
|
|
187
|
+
everyNthFrame: everyNthFrame !== null && everyNthFrame !== void 0 ? everyNthFrame : undefined,
|
|
188
|
+
numberOfGifLoops: numberOfGifLoops !== null && numberOfGifLoops !== void 0 ? numberOfGifLoops : null,
|
|
189
|
+
frameRange: frameRange !== null && frameRange !== void 0 ? frameRange : undefined,
|
|
190
|
+
envVariables: envVariables !== null && envVariables !== void 0 ? envVariables : undefined,
|
|
191
|
+
chromiumOptions: chromiumOptions !== null && chromiumOptions !== void 0 ? chromiumOptions : undefined,
|
|
192
|
+
muted: muted !== null && muted !== void 0 ? muted : undefined,
|
|
193
|
+
forceWidth: forceWidth !== null && forceWidth !== void 0 ? forceWidth : null,
|
|
194
|
+
forceHeight: forceHeight !== null && forceHeight !== void 0 ? forceHeight : null,
|
|
195
|
+
logLevel: logLevel !== null && logLevel !== void 0 ? logLevel : undefined,
|
|
196
|
+
delayRenderTimeoutInMilliseconds: delayRenderTimeoutInMilliseconds !== null && delayRenderTimeoutInMilliseconds !== void 0 ? delayRenderTimeoutInMilliseconds : undefined,
|
|
197
|
+
concurrency: concurrency !== null && concurrency !== void 0 ? concurrency : null,
|
|
198
|
+
enforceAudioTrack: enforceAudioTrack !== null && enforceAudioTrack !== void 0 ? enforceAudioTrack : undefined,
|
|
199
|
+
preferLossless: preferLossless !== null && preferLossless !== void 0 ? preferLossless : undefined,
|
|
200
|
+
offthreadVideoCacheSizeInBytes: offthreadVideoCacheSizeInBytes !== null && offthreadVideoCacheSizeInBytes !== void 0 ? offthreadVideoCacheSizeInBytes : undefined,
|
|
201
|
+
colorSpace: colorSpace !== null && colorSpace !== void 0 ? colorSpace : undefined,
|
|
202
|
+
});
|
|
203
|
+
};
|
|
204
|
+
exports.renderMediaOnCloudrun = renderMediaOnCloudrun;
|
|
@@ -25,7 +25,7 @@ const renderCommand = async (args, remotionRoot) => {
|
|
|
25
25
|
});
|
|
26
26
|
const imageFormat = args_1.parsedCloudrunCli['image-format'];
|
|
27
27
|
const audioCodec = args_1.parsedCloudrunCli['audio-codec'];
|
|
28
|
-
const { chromiumOptions, crf, envVariables, frameRange, inputProps, logLevel, puppeteerTimeout, pixelFormat, proResProfile, jpegQuality, scale, everyNthFrame, numberOfGifLoops, muted, audioBitrate, videoBitrate, height, width, browserExecutable, port, enforceAudioTrack, offthreadVideoCacheSizeInBytes, } = await cli_1.CliInternals.getCliOptions({
|
|
28
|
+
const { chromiumOptions, crf, envVariables, frameRange, inputProps, logLevel, puppeteerTimeout, pixelFormat, proResProfile, x264Preset, jpegQuality, scale, everyNthFrame, numberOfGifLoops, muted, audioBitrate, videoBitrate, height, width, browserExecutable, port, enforceAudioTrack, offthreadVideoCacheSizeInBytes, colorSpace, } = await cli_1.CliInternals.getCliOptions({
|
|
29
29
|
type: 'series',
|
|
30
30
|
isLambda: true,
|
|
31
31
|
remotionRoot,
|
|
@@ -116,41 +116,45 @@ ${downloadName ? ` Downloaded File = ${downloadName}` : ''}
|
|
|
116
116
|
updateProgress();
|
|
117
117
|
}
|
|
118
118
|
};
|
|
119
|
-
const res = await (0, render_media_on_cloudrun_1.
|
|
119
|
+
const res = await (0, render_media_on_cloudrun_1.internalRenderMediaOnCloudrun)({
|
|
120
120
|
cloudRunUrl,
|
|
121
|
-
|
|
121
|
+
serviceName: undefined,
|
|
122
122
|
region,
|
|
123
|
+
serveUrl,
|
|
124
|
+
composition,
|
|
123
125
|
inputProps,
|
|
124
126
|
codec: codec,
|
|
125
|
-
|
|
126
|
-
crf: crf !== null && crf !== void 0 ? crf : undefined,
|
|
127
|
-
envVariables,
|
|
128
|
-
pixelFormat,
|
|
129
|
-
proResProfile,
|
|
130
|
-
jpegQuality,
|
|
131
|
-
composition,
|
|
127
|
+
forceBucketName,
|
|
132
128
|
privacy,
|
|
133
|
-
frameRange: frameRange !== null && frameRange !== void 0 ? frameRange : undefined,
|
|
134
129
|
outName,
|
|
135
|
-
|
|
130
|
+
updateRenderProgress,
|
|
131
|
+
jpegQuality,
|
|
132
|
+
audioCodec,
|
|
133
|
+
audioBitrate,
|
|
134
|
+
videoBitrate,
|
|
135
|
+
proResProfile,
|
|
136
|
+
x264Preset,
|
|
137
|
+
crf,
|
|
138
|
+
pixelFormat,
|
|
139
|
+
imageFormat,
|
|
136
140
|
scale,
|
|
137
|
-
numberOfGifLoops,
|
|
138
141
|
everyNthFrame,
|
|
142
|
+
numberOfGifLoops,
|
|
143
|
+
frameRange: frameRange !== null && frameRange !== void 0 ? frameRange : undefined,
|
|
144
|
+
envVariables,
|
|
145
|
+
chromiumOptions,
|
|
139
146
|
muted,
|
|
140
|
-
audioBitrate,
|
|
141
|
-
videoBitrate,
|
|
142
|
-
forceHeight: height,
|
|
143
147
|
forceWidth: width,
|
|
144
|
-
|
|
145
|
-
forceBucketName,
|
|
146
|
-
updateRenderProgress,
|
|
148
|
+
forceHeight: height,
|
|
147
149
|
logLevel: config_1.ConfigInternals.Logging.getLogLevel(),
|
|
150
|
+
delayRenderTimeoutInMilliseconds: puppeteerTimeout,
|
|
148
151
|
// Special case: Should not use default local concurrency, or from
|
|
149
152
|
// config file, just when explicitly set
|
|
150
153
|
concurrency: (_b = cli_1.CliInternals.parsedCli.concurrency) !== null && _b !== void 0 ? _b : null,
|
|
151
|
-
delayRenderTimeoutInMilliseconds: puppeteerTimeout,
|
|
152
154
|
enforceAudioTrack,
|
|
153
155
|
preferLossless: false,
|
|
156
|
+
offthreadVideoCacheSizeInBytes,
|
|
157
|
+
colorSpace,
|
|
154
158
|
});
|
|
155
159
|
if (res.type === 'crash') {
|
|
156
160
|
(0, cloudrun_crash_logs_1.displayCrashLogs)(res);
|
|
@@ -15,7 +15,7 @@ const quit_1 = require("../../helpers/quit");
|
|
|
15
15
|
const log_1 = require("../../log");
|
|
16
16
|
exports.CLOUD_RUN_DEPLOY_SUBCOMMAND = 'deploy';
|
|
17
17
|
const cloudRunDeploySubcommand = async () => {
|
|
18
|
-
var _a, _b, _c, _d, _e;
|
|
18
|
+
var _a, _b, _c, _d, _e, _f, _g;
|
|
19
19
|
const region = (0, get_gcp_region_1.getGcpRegion)();
|
|
20
20
|
const projectID = process.env.REMOTION_GCP_PROJECT_ID;
|
|
21
21
|
const memoryLimit = String((_a = args_1.parsedCloudrunCli.memoryLimit) !== null && _a !== void 0 ? _a : '2Gi');
|
|
@@ -52,11 +52,13 @@ ${[
|
|
|
52
52
|
log_1.Log.info(cli_1.CliInternals.chalk.white('\nDeploying Cloud Run Service...'));
|
|
53
53
|
}
|
|
54
54
|
try {
|
|
55
|
-
const deployResult = await (0, deploy_service_1.
|
|
55
|
+
const deployResult = await (0, deploy_service_1.internalDeployService)({
|
|
56
56
|
performImageVersionValidation: false,
|
|
57
|
-
memoryLimit,
|
|
58
|
-
cpuLimit,
|
|
59
|
-
timeoutSeconds,
|
|
57
|
+
memoryLimit: memoryLimit !== null && memoryLimit !== void 0 ? memoryLimit : '2Gi',
|
|
58
|
+
cpuLimit: cpuLimit !== null && cpuLimit !== void 0 ? cpuLimit : '1.0',
|
|
59
|
+
timeoutSeconds: timeoutSeconds !== null && timeoutSeconds !== void 0 ? timeoutSeconds : constants_1.DEFAULT_TIMEOUT,
|
|
60
|
+
minInstances: (_f = Number(minInstances)) !== null && _f !== void 0 ? _f : constants_1.DEFAULT_MIN_INSTANCES,
|
|
61
|
+
maxInstances: (_g = Number(maxInstances)) !== null && _g !== void 0 ? _g : constants_1.DEFAULT_MAX_INSTANCES,
|
|
60
62
|
projectID,
|
|
61
63
|
region,
|
|
62
64
|
});
|
|
@@ -67,17 +67,17 @@ export declare const CloudRunPayload: z.ZodDiscriminatedUnion<"type", [z.ZodObje
|
|
|
67
67
|
frameRange: ((number | [number, number]) & (number | [number, number] | undefined)) | null;
|
|
68
68
|
pixelFormat: "yuv420p" | "yuva420p" | "yuv422p" | "yuv444p" | "yuv420p10le" | "yuv422p10le" | "yuv444p10le" | "yuva444p10le";
|
|
69
69
|
proResProfile: "4444-xq" | "4444" | "hq" | "standard" | "light" | "proxy" | null;
|
|
70
|
+
x264Preset: "medium" | "ultrafast" | "superfast" | "veryfast" | "faster" | "fast" | "slow" | "slower" | "veryslow" | "placebo" | null;
|
|
70
71
|
everyNthFrame: number;
|
|
71
72
|
numberOfGifLoops: number | null;
|
|
72
73
|
muted: boolean;
|
|
73
74
|
audioBitrate: string | null;
|
|
74
75
|
videoBitrate: string | null;
|
|
75
76
|
enforceAudioTrack: boolean;
|
|
77
|
+
colorSpace: "default" | "bt709";
|
|
76
78
|
audioCodec: "mp3" | "aac" | "pcm-16" | "opus" | null;
|
|
77
|
-
x264Preset: "ultrafast" | "superfast" | "veryfast" | "faster" | "fast" | "medium" | "slow" | "slower" | "veryslow" | "placebo" | null;
|
|
78
79
|
concurrency: string | number | null;
|
|
79
80
|
preferLossless: boolean;
|
|
80
|
-
colorSpace: "default" | "bt709";
|
|
81
81
|
serializedInputPropsWithCustomSchema: string;
|
|
82
82
|
outputBucket: string;
|
|
83
83
|
forceHeight?: number | null | undefined;
|
|
@@ -107,17 +107,17 @@ export declare const CloudRunPayload: z.ZodDiscriminatedUnion<"type", [z.ZodObje
|
|
|
107
107
|
frameRange: ((number | [number, number]) & (number | [number, number] | undefined)) | null;
|
|
108
108
|
pixelFormat: "yuv420p" | "yuva420p" | "yuv422p" | "yuv444p" | "yuv420p10le" | "yuv422p10le" | "yuv444p10le" | "yuva444p10le";
|
|
109
109
|
proResProfile: "4444-xq" | "4444" | "hq" | "standard" | "light" | "proxy" | null;
|
|
110
|
+
x264Preset: "medium" | "ultrafast" | "superfast" | "veryfast" | "faster" | "fast" | "slow" | "slower" | "veryslow" | "placebo" | null;
|
|
110
111
|
everyNthFrame: number;
|
|
111
112
|
numberOfGifLoops: number | null;
|
|
112
113
|
muted: boolean;
|
|
113
114
|
audioBitrate: string | null;
|
|
114
115
|
videoBitrate: string | null;
|
|
115
116
|
enforceAudioTrack: boolean;
|
|
117
|
+
colorSpace: "default" | "bt709";
|
|
116
118
|
audioCodec: "mp3" | "aac" | "pcm-16" | "opus" | null;
|
|
117
|
-
x264Preset: "ultrafast" | "superfast" | "veryfast" | "faster" | "fast" | "medium" | "slow" | "slower" | "veryslow" | "placebo" | null;
|
|
118
119
|
concurrency: string | number | null;
|
|
119
120
|
preferLossless: boolean;
|
|
120
|
-
colorSpace: "default" | "bt709";
|
|
121
121
|
serializedInputPropsWithCustomSchema: string;
|
|
122
122
|
outputBucket: string;
|
|
123
123
|
forceHeight?: number | null | undefined;
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@remotion/cloudrun",
|
|
3
|
-
"version": "4.0.
|
|
3
|
+
"version": "4.0.32",
|
|
4
4
|
"description": "GCP Cloud Run alternative to lambda rendering",
|
|
5
5
|
"main": "dist/index.js",
|
|
6
6
|
"dependencies": {
|
|
@@ -12,10 +12,10 @@
|
|
|
12
12
|
"@google-cloud/logging": "^10.5.0",
|
|
13
13
|
"google-auth-library": "^8.7.0",
|
|
14
14
|
"zod": "^3.21.4",
|
|
15
|
-
"@remotion/bundler": "4.0.
|
|
16
|
-
"@remotion/
|
|
17
|
-
"
|
|
18
|
-
"remotion": "4.0.
|
|
15
|
+
"@remotion/bundler": "4.0.32",
|
|
16
|
+
"@remotion/cli": "4.0.32",
|
|
17
|
+
"remotion": "4.0.32",
|
|
18
|
+
"@remotion/renderer": "4.0.32"
|
|
19
19
|
},
|
|
20
20
|
"devDependencies": {
|
|
21
21
|
"@jonny/eslint-config": "3.0.266",
|
|
@@ -26,7 +26,7 @@
|
|
|
26
26
|
"prettier-plugin-organize-imports": "^3.2.2",
|
|
27
27
|
"ts-node": "^10.8.0",
|
|
28
28
|
"vitest": "0.24.3",
|
|
29
|
-
"@remotion/compositor-linux-x64-gnu": "4.0.
|
|
29
|
+
"@remotion/compositor-linux-x64-gnu": "4.0.32"
|
|
30
30
|
},
|
|
31
31
|
"exports": {
|
|
32
32
|
"./package.json": "./package.json",
|