@remotion/cloudrun 4.0.77 → 4.0.81
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-test.log +16 -0
- package/dist/api/render-media-on-cloudrun.d.ts +8 -2
- package/dist/api/render-media-on-cloudrun.js +8 -2
- package/dist/cli/commands/render/index.js +3 -1
- package/dist/functions/helpers/payloads.d.ts +6 -0
- package/dist/functions/helpers/payloads.js +2 -0
- package/dist/functions/render-media-single-thread.js +2 -0
- package/package.json +6 -6
package/.turbo/turbo-build.log
CHANGED
|
@@ -1,14 +1,14 @@
|
|
|
1
1
|
|
|
2
|
-
> @remotion/cloudrun@4.0.
|
|
2
|
+
> @remotion/cloudrun@4.0.79 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.79 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.79 tarInstaller /Users/jonathanburger/remotion/packages/cloudrun
|
|
12
12
|
> ts-node src/admin/bundle-installer.ts
|
|
13
13
|
|
|
14
14
|
Making reproducible build with gtar
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
|
|
2
|
+
> @remotion/cloudrun@4.0.71 test /Users/jonathanburger/remotion/packages/cloudrun
|
|
3
|
+
> vitest --run
|
|
4
|
+
|
|
5
|
+
|
|
6
|
+
RUN v0.31.1 /Users/jonathanburger/remotion/packages/cloudrun
|
|
7
|
+
|
|
8
|
+
✓ src/api/test/service-names.test.ts (1 test) 3ms
|
|
9
|
+
✓ src/api/test/make-console.test.ts (2 tests) 2ms
|
|
10
|
+
✓ src/api/test/running-in-what-server.test.ts (4 tests) 2ms
|
|
11
|
+
|
|
12
|
+
Test Files 3 passed (3)
|
|
13
|
+
Tests 7 passed (7)
|
|
14
|
+
Start at 12:17:00
|
|
15
|
+
Duration 739ms (transform 179ms, setup 0ms, collect 527ms, tests 7ms, environment 0ms, prepare 54ms)
|
|
16
|
+
|
|
@@ -19,6 +19,8 @@ type InternalRenderMediaOnCloudrun = {
|
|
|
19
19
|
jpegQuality: number | undefined;
|
|
20
20
|
audioBitrate: string | null;
|
|
21
21
|
videoBitrate: string | null;
|
|
22
|
+
encodingMaxRate: string | null;
|
|
23
|
+
encodingBufferSize: string | null;
|
|
22
24
|
proResProfile: ProResProfile | undefined;
|
|
23
25
|
x264Preset: X264Preset | undefined;
|
|
24
26
|
crf: Crf | null;
|
|
@@ -56,6 +58,8 @@ export type RenderMediaOnCloudrunInput = {
|
|
|
56
58
|
jpegQuality?: number;
|
|
57
59
|
audioBitrate?: string | null;
|
|
58
60
|
videoBitrate?: string | null;
|
|
61
|
+
encodingMaxRate?: string | null;
|
|
62
|
+
encodingBufferSize?: string | null;
|
|
59
63
|
proResProfile?: ProResProfile;
|
|
60
64
|
x264Preset?: X264Preset;
|
|
61
65
|
crf?: number | undefined;
|
|
@@ -77,7 +81,7 @@ export type RenderMediaOnCloudrunInput = {
|
|
|
77
81
|
preferLossless?: boolean;
|
|
78
82
|
colorSpace?: ColorSpace;
|
|
79
83
|
} & 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>;
|
|
84
|
+
export declare const internalRenderMediaOnCloudrun: ({ cloudRunUrl, serviceName, region, serveUrl, composition, inputProps, codec, forceBucketName, privacy, outName, updateRenderProgress, jpegQuality, audioCodec, audioBitrate, videoBitrate, encodingMaxRate, encodingBufferSize, 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>;
|
|
81
85
|
/**
|
|
82
86
|
* @description Triggers a render on a GCP Cloud Run service given a composition and a Cloud Run URL.
|
|
83
87
|
* @see [Documentation](https://remotion.dev/docs/cloudrun/renderMediaOnGcp)
|
|
@@ -96,6 +100,8 @@ export declare const internalRenderMediaOnCloudrun: ({ cloudRunUrl, serviceName,
|
|
|
96
100
|
* @param params.audioCodec The encoding of the audio of the output video.
|
|
97
101
|
* @param params.audioBitrate The target bitrate for the audio of the generated video.
|
|
98
102
|
* @param params.videoBitrate The target bitrate of the generated video.
|
|
103
|
+
* @param params.encodingBufferSize The decoder buffer size, which determines the variability of the generated video bitrate.
|
|
104
|
+
* @param params.encodingMaxRate The maximum bitrate tolerance to be used, this is only used in conjunction with encodingBufferSize.
|
|
99
105
|
* @param params.proResProfile Sets a ProRes profile. Only applies to videos rendered with prores codec.
|
|
100
106
|
* @param params.x264Preset Sets a Preset profile. Only applies to videos rendered with h.264 codec.
|
|
101
107
|
* @param params.crf Constant Rate Factor, controlling the quality.
|
|
@@ -117,5 +123,5 @@ export declare const internalRenderMediaOnCloudrun: ({ cloudRunUrl, serviceName,
|
|
|
117
123
|
* @param params.preferLossless Uses a lossless audio codec, if one is available for the codec. If you set audioCodec, it takes priority over preferLossless.
|
|
118
124
|
* @returns {Promise<RenderMediaOnCloudrunOutput>} See documentation for detailed structure
|
|
119
125
|
*/
|
|
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>;
|
|
126
|
+
export declare const renderMediaOnCloudrun: ({ cloudRunUrl, serviceName, region, serveUrl, composition, inputProps, codec, forceBucketName, privacy, outName, updateRenderProgress, jpegQuality, audioCodec, audioBitrate, videoBitrate, encodingMaxRate, encodingBufferSize, 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
127
|
export {};
|
|
@@ -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 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, }) => {
|
|
13
|
+
const internalRenderMediaOnCloudrunRaw = async ({ cloudRunUrl, serviceName, region, serveUrl, composition, inputProps, codec, forceBucketName, privacy, outName, updateRenderProgress, jpegQuality, audioCodec, audioBitrate, videoBitrate, encodingMaxRate, encodingBufferSize, 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)
|
|
@@ -34,6 +34,8 @@ const internalRenderMediaOnCloudrunRaw = async ({ cloudRunUrl, serviceName, regi
|
|
|
34
34
|
audioCodec: audioCodec !== null && audioCodec !== void 0 ? audioCodec : null,
|
|
35
35
|
audioBitrate: audioBitrate !== null && audioBitrate !== void 0 ? audioBitrate : null,
|
|
36
36
|
videoBitrate: videoBitrate !== null && videoBitrate !== void 0 ? videoBitrate : null,
|
|
37
|
+
encodingBufferSize: encodingBufferSize !== null && encodingBufferSize !== void 0 ? encodingBufferSize : null,
|
|
38
|
+
encodingMaxRate: encodingMaxRate !== null && encodingMaxRate !== void 0 ? encodingMaxRate : null,
|
|
37
39
|
crf: crf !== null && crf !== void 0 ? crf : null,
|
|
38
40
|
pixelFormat: pixelFormat !== null && pixelFormat !== void 0 ? pixelFormat : renderer_1.RenderInternals.DEFAULT_PIXEL_FORMAT,
|
|
39
41
|
imageFormat: imageFormat !== null && imageFormat !== void 0 ? imageFormat : renderer_1.RenderInternals.DEFAULT_VIDEO_IMAGE_FORMAT,
|
|
@@ -140,6 +142,8 @@ exports.internalRenderMediaOnCloudrun = pure_1.PureJSAPIs.wrapWithErrorHandling(
|
|
|
140
142
|
* @param params.audioCodec The encoding of the audio of the output video.
|
|
141
143
|
* @param params.audioBitrate The target bitrate for the audio of the generated video.
|
|
142
144
|
* @param params.videoBitrate The target bitrate of the generated video.
|
|
145
|
+
* @param params.encodingBufferSize The decoder buffer size, which determines the variability of the generated video bitrate.
|
|
146
|
+
* @param params.encodingMaxRate The maximum bitrate tolerance to be used, this is only used in conjunction with encodingBufferSize.
|
|
143
147
|
* @param params.proResProfile Sets a ProRes profile. Only applies to videos rendered with prores codec.
|
|
144
148
|
* @param params.x264Preset Sets a Preset profile. Only applies to videos rendered with h.264 codec.
|
|
145
149
|
* @param params.crf Constant Rate Factor, controlling the quality.
|
|
@@ -161,7 +165,7 @@ exports.internalRenderMediaOnCloudrun = pure_1.PureJSAPIs.wrapWithErrorHandling(
|
|
|
161
165
|
* @param params.preferLossless Uses a lossless audio codec, if one is available for the codec. If you set audioCodec, it takes priority over preferLossless.
|
|
162
166
|
* @returns {Promise<RenderMediaOnCloudrunOutput>} See documentation for detailed structure
|
|
163
167
|
*/
|
|
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, }) => {
|
|
168
|
+
const renderMediaOnCloudrun = ({ cloudRunUrl, serviceName, region, serveUrl, composition, inputProps, codec, forceBucketName, privacy, outName, updateRenderProgress, jpegQuality, audioCodec, audioBitrate, videoBitrate, encodingMaxRate, encodingBufferSize, proResProfile, x264Preset, crf, pixelFormat, imageFormat, scale, everyNthFrame, numberOfGifLoops, frameRange, envVariables, chromiumOptions, muted, forceWidth, forceHeight, logLevel, delayRenderTimeoutInMilliseconds, concurrency, enforceAudioTrack, preferLossless, offthreadVideoCacheSizeInBytes, colorSpace, }) => {
|
|
165
169
|
return (0, exports.internalRenderMediaOnCloudrun)({
|
|
166
170
|
cloudRunUrl: cloudRunUrl !== null && cloudRunUrl !== void 0 ? cloudRunUrl : undefined,
|
|
167
171
|
serviceName: serviceName !== null && serviceName !== void 0 ? serviceName : undefined,
|
|
@@ -178,6 +182,8 @@ const renderMediaOnCloudrun = ({ cloudRunUrl, serviceName, region, serveUrl, com
|
|
|
178
182
|
audioCodec: audioCodec !== null && audioCodec !== void 0 ? audioCodec : undefined,
|
|
179
183
|
audioBitrate: audioBitrate !== null && audioBitrate !== void 0 ? audioBitrate : null,
|
|
180
184
|
videoBitrate: videoBitrate !== null && videoBitrate !== void 0 ? videoBitrate : null,
|
|
185
|
+
encodingMaxRate: encodingMaxRate !== null && encodingMaxRate !== void 0 ? encodingMaxRate : null,
|
|
186
|
+
encodingBufferSize: encodingBufferSize !== null && encodingBufferSize !== void 0 ? encodingBufferSize : null,
|
|
181
187
|
proResProfile: proResProfile !== null && proResProfile !== void 0 ? proResProfile : undefined,
|
|
182
188
|
x264Preset: x264Preset !== null && x264Preset !== void 0 ? x264Preset : undefined,
|
|
183
189
|
crf: crf !== null && crf !== void 0 ? crf : null,
|
|
@@ -26,7 +26,7 @@ const renderCommand = async (args, remotionRoot, logLevel) => {
|
|
|
26
26
|
});
|
|
27
27
|
const imageFormat = args_1.parsedCloudrunCli['image-format'];
|
|
28
28
|
const audioCodec = args_1.parsedCloudrunCli['audio-codec'];
|
|
29
|
-
const { chromiumOptions, crf, envVariables, frameRange, inputProps, puppeteerTimeout, pixelFormat, proResProfile, x264Preset, jpegQuality, scale, everyNthFrame, numberOfGifLoops, muted, audioBitrate, videoBitrate, height, width, browserExecutable, enforceAudioTrack, offthreadVideoCacheSizeInBytes, colorSpace, } = await cli_1.CliInternals.getCliOptions({
|
|
29
|
+
const { chromiumOptions, crf, envVariables, frameRange, inputProps, puppeteerTimeout, pixelFormat, proResProfile, x264Preset, jpegQuality, scale, everyNthFrame, numberOfGifLoops, muted, audioBitrate, videoBitrate, encodingMaxRate, encodingBufferSize, height, width, browserExecutable, enforceAudioTrack, offthreadVideoCacheSizeInBytes, colorSpace, } = await cli_1.CliInternals.getCliOptions({
|
|
30
30
|
type: 'series',
|
|
31
31
|
isLambda: true,
|
|
32
32
|
remotionRoot,
|
|
@@ -134,6 +134,8 @@ ${downloadName ? ` Downloaded File = ${downloadName}` : ''}
|
|
|
134
134
|
audioCodec,
|
|
135
135
|
audioBitrate,
|
|
136
136
|
videoBitrate,
|
|
137
|
+
encodingMaxRate,
|
|
138
|
+
encodingBufferSize,
|
|
137
139
|
proResProfile,
|
|
138
140
|
x264Preset,
|
|
139
141
|
crf,
|
|
@@ -11,6 +11,8 @@ export declare const CloudRunPayload: z.ZodDiscriminatedUnion<"type", [z.ZodObje
|
|
|
11
11
|
audioCodec: z.ZodNullable<z.ZodEnum<["pcm-16", "aac", "mp3", "opus"]>>;
|
|
12
12
|
audioBitrate: z.ZodNullable<z.ZodString>;
|
|
13
13
|
videoBitrate: z.ZodNullable<z.ZodString>;
|
|
14
|
+
encodingMaxRate: z.ZodNullable<z.ZodString>;
|
|
15
|
+
encodingBufferSize: z.ZodNullable<z.ZodString>;
|
|
14
16
|
crf: z.ZodNullable<z.ZodNumber>;
|
|
15
17
|
pixelFormat: z.ZodEnum<["yuv420p", "yuva420p", "yuv422p", "yuv444p", "yuv420p10le", "yuv422p10le", "yuv444p10le", "yuva444p10le"]>;
|
|
16
18
|
imageFormat: z.ZodEnum<["png", "jpeg", "none"]>;
|
|
@@ -61,6 +63,8 @@ export declare const CloudRunPayload: z.ZodDiscriminatedUnion<"type", [z.ZodObje
|
|
|
61
63
|
audioCodec: "mp3" | "aac" | "pcm-16" | "opus" | null;
|
|
62
64
|
audioBitrate: string | null;
|
|
63
65
|
videoBitrate: string | null;
|
|
66
|
+
encodingMaxRate: string | null;
|
|
67
|
+
encodingBufferSize: string | null;
|
|
64
68
|
crf: number | null;
|
|
65
69
|
pixelFormat: "yuv420p" | "yuva420p" | "yuv422p" | "yuv444p" | "yuv420p10le" | "yuv422p10le" | "yuv444p10le" | "yuva444p10le";
|
|
66
70
|
imageFormat: "png" | "jpeg" | "none";
|
|
@@ -101,6 +105,8 @@ export declare const CloudRunPayload: z.ZodDiscriminatedUnion<"type", [z.ZodObje
|
|
|
101
105
|
audioCodec: "mp3" | "aac" | "pcm-16" | "opus" | null;
|
|
102
106
|
audioBitrate: string | null;
|
|
103
107
|
videoBitrate: string | null;
|
|
108
|
+
encodingMaxRate: string | null;
|
|
109
|
+
encodingBufferSize: string | null;
|
|
104
110
|
crf: number | null;
|
|
105
111
|
pixelFormat: "yuv420p" | "yuva420p" | "yuv422p" | "yuv444p" | "yuv420p10le" | "yuv422p10le" | "yuv444p10le" | "yuva444p10le";
|
|
106
112
|
imageFormat: "png" | "jpeg" | "none";
|
|
@@ -32,6 +32,8 @@ exports.CloudRunPayload = zod_1.z.discriminatedUnion('type', [
|
|
|
32
32
|
audioCodec: audioCodec.nullable(),
|
|
33
33
|
audioBitrate: zod_1.z.string().nullable(),
|
|
34
34
|
videoBitrate: zod_1.z.string().nullable(),
|
|
35
|
+
encodingMaxRate: zod_1.z.string().nullable(),
|
|
36
|
+
encodingBufferSize: zod_1.z.string().nullable(),
|
|
35
37
|
crf: zod_1.z.number().nullable(),
|
|
36
38
|
pixelFormat,
|
|
37
39
|
imageFormat: videoImageFormat,
|
|
@@ -50,6 +50,8 @@ const renderMediaSingleThread = async (body, res) => {
|
|
|
50
50
|
audioCodec: body.audioCodec,
|
|
51
51
|
audioBitrate: body.audioBitrate,
|
|
52
52
|
videoBitrate: body.videoBitrate,
|
|
53
|
+
encodingMaxRate: body.encodingMaxRate,
|
|
54
|
+
encodingBufferSize: body.encodingBufferSize,
|
|
53
55
|
crf: body.crf,
|
|
54
56
|
pixelFormat: body.pixelFormat,
|
|
55
57
|
imageFormat: body.imageFormat,
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@remotion/cloudrun",
|
|
3
|
-
"version": "4.0.
|
|
3
|
+
"version": "4.0.81",
|
|
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.22.3",
|
|
15
|
-
"@remotion/bundler": "4.0.
|
|
16
|
-
"@remotion/
|
|
17
|
-
"
|
|
18
|
-
"remotion": "4.0.
|
|
15
|
+
"@remotion/bundler": "4.0.81",
|
|
16
|
+
"@remotion/renderer": "4.0.81",
|
|
17
|
+
"remotion": "4.0.81",
|
|
18
|
+
"@remotion/cli": "4.0.81"
|
|
19
19
|
},
|
|
20
20
|
"devDependencies": {
|
|
21
21
|
"@jonny/eslint-config": "3.0.276",
|
|
@@ -26,7 +26,7 @@
|
|
|
26
26
|
"prettier-plugin-organize-imports": "^3.2.2",
|
|
27
27
|
"ts-node": "^10.8.0",
|
|
28
28
|
"vitest": "0.31.1",
|
|
29
|
-
"@remotion/compositor-linux-x64-gnu": "4.0.
|
|
29
|
+
"@remotion/compositor-linux-x64-gnu": "4.0.81"
|
|
30
30
|
},
|
|
31
31
|
"exports": {
|
|
32
32
|
"./package.json": "./package.json",
|