@remotion/cloudrun 4.0.465 → 4.0.466
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/dist/api/render-media-on-cloudrun.d.ts +2 -2
- package/dist/api/render-media-on-cloudrun.js +4 -2
- package/dist/cli/commands/render/index.js +5 -1
- package/dist/functions/helpers/get-composition-from-body.d.ts +1 -0
- package/dist/functions/helpers/payloads.d.ts +1 -0
- package/dist/functions/helpers/payloads.js +1 -0
- package/dist/functions/render-media-single-thread.d.ts +1 -0
- package/dist/functions/render-media-single-thread.js +1 -0
- package/dist/functions/render-still-single-thread.d.ts +1 -0
- package/dist/index.d.ts +1 -1
- package/package.json +7 -7
|
@@ -75,7 +75,7 @@ export type RenderMediaOnCloudrunInput = {
|
|
|
75
75
|
renderIdOverride?: z.infer<typeof CloudRunPayload>['renderIdOverride'];
|
|
76
76
|
renderStatusWebhook?: z.infer<typeof CloudRunPayload>['renderStatusWebhook'];
|
|
77
77
|
} & Partial<ToOptions<typeof BrowserSafeApis.optionsMap.renderMediaOnCloudRun>>;
|
|
78
|
-
export declare const internalRenderMediaOnCloudrun: ({ cloudRunUrl, serviceName, region, serveUrl, composition, inputProps, codec, forceBucketName, privacy, outName, updateRenderProgress, renderIdOverride, renderStatusWebhook, jpegQuality, audioCodec, audioBitrate, videoBitrate, encodingMaxRate, encodingBufferSize, proResProfile, x264Preset, crf, pixelFormat, imageFormat, scale, everyNthFrame, numberOfGifLoops, frameRange, envVariables, chromiumOptions, muted, forceWidth, forceHeight, forceFps, forceDurationInFrames, logLevel, delayRenderTimeoutInMilliseconds, concurrency, enforceAudioTrack, preferLossless, offthreadVideoCacheSizeInBytes, offthreadVideoThreads, colorSpace, downloadBehavior, metadata, mediaCacheSizeInBytes, sampleRate, }: InternalRenderMediaOnCloudrun) => Promise<{
|
|
78
|
+
export declare const internalRenderMediaOnCloudrun: ({ cloudRunUrl, serviceName, region, serveUrl, composition, inputProps, codec, forceBucketName, privacy, outName, updateRenderProgress, renderIdOverride, renderStatusWebhook, jpegQuality, audioCodec, audioBitrate, videoBitrate, encodingMaxRate, encodingBufferSize, proResProfile, x264Preset, gopSize, crf, pixelFormat, imageFormat, scale, everyNthFrame, numberOfGifLoops, frameRange, envVariables, chromiumOptions, muted, forceWidth, forceHeight, forceFps, forceDurationInFrames, logLevel, delayRenderTimeoutInMilliseconds, concurrency, enforceAudioTrack, preferLossless, offthreadVideoCacheSizeInBytes, offthreadVideoThreads, colorSpace, downloadBehavior, metadata, mediaCacheSizeInBytes, sampleRate, }: InternalRenderMediaOnCloudrun) => Promise<{
|
|
79
79
|
type: "success";
|
|
80
80
|
publicUrl?: string | null | undefined;
|
|
81
81
|
cloudStorageUri: string;
|
|
@@ -91,7 +91,7 @@ export declare const internalRenderMediaOnCloudrun: ({ cloudRunUrl, serviceName,
|
|
|
91
91
|
requestCrashTime: string;
|
|
92
92
|
requestElapsedTimeInSeconds: number;
|
|
93
93
|
}>;
|
|
94
|
-
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, forceFps, forceDurationInFrames, logLevel, delayRenderTimeoutInMilliseconds, concurrency, enforceAudioTrack, preferLossless, offthreadVideoCacheSizeInBytes, colorSpace, downloadBehavior, metadata, renderIdOverride, renderStatusWebhook, offthreadVideoThreads, mediaCacheSizeInBytes, sampleRate, }: RenderMediaOnCloudrunInput) => Promise<{
|
|
94
|
+
export declare const renderMediaOnCloudrun: ({ cloudRunUrl, serviceName, region, serveUrl, composition, inputProps, codec, forceBucketName, privacy, outName, updateRenderProgress, jpegQuality, audioCodec, audioBitrate, videoBitrate, encodingMaxRate, encodingBufferSize, proResProfile, x264Preset, gopSize, crf, pixelFormat, imageFormat, scale, everyNthFrame, numberOfGifLoops, frameRange, envVariables, chromiumOptions, muted, forceWidth, forceHeight, forceFps, forceDurationInFrames, logLevel, delayRenderTimeoutInMilliseconds, concurrency, enforceAudioTrack, preferLossless, offthreadVideoCacheSizeInBytes, colorSpace, downloadBehavior, metadata, renderIdOverride, renderStatusWebhook, offthreadVideoThreads, mediaCacheSizeInBytes, sampleRate, }: RenderMediaOnCloudrunInput) => Promise<{
|
|
95
95
|
type: "success";
|
|
96
96
|
publicUrl?: string | null | undefined;
|
|
97
97
|
cloudStorageUri: string;
|
|
@@ -11,7 +11,7 @@ const validate_serveurl_1 = require("../shared/validate-serveurl");
|
|
|
11
11
|
const get_or_create_bucket_1 = require("./get-or-create-bucket");
|
|
12
12
|
const get_auth_client_for_url_1 = require("./helpers/get-auth-client-for-url");
|
|
13
13
|
const get_cloudrun_endpoint_1 = require("./helpers/get-cloudrun-endpoint");
|
|
14
|
-
const internalRenderMediaOnCloudrunRaw = async ({ cloudRunUrl, serviceName, region, serveUrl, composition, inputProps, codec, forceBucketName, privacy, outName, updateRenderProgress, renderIdOverride, renderStatusWebhook, jpegQuality, audioCodec, audioBitrate, videoBitrate, encodingMaxRate, encodingBufferSize, proResProfile, x264Preset, crf, pixelFormat, imageFormat, scale, everyNthFrame, numberOfGifLoops, frameRange, envVariables, chromiumOptions, muted, forceWidth, forceHeight, forceFps, forceDurationInFrames, logLevel, delayRenderTimeoutInMilliseconds, concurrency, enforceAudioTrack, preferLossless, offthreadVideoCacheSizeInBytes, offthreadVideoThreads, colorSpace, downloadBehavior, metadata, mediaCacheSizeInBytes, sampleRate, }) => {
|
|
14
|
+
const internalRenderMediaOnCloudrunRaw = async ({ cloudRunUrl, serviceName, region, serveUrl, composition, inputProps, codec, forceBucketName, privacy, outName, updateRenderProgress, renderIdOverride, renderStatusWebhook, jpegQuality, audioCodec, audioBitrate, videoBitrate, encodingMaxRate, encodingBufferSize, proResProfile, x264Preset, gopSize, crf, pixelFormat, imageFormat, scale, everyNthFrame, numberOfGifLoops, frameRange, envVariables, chromiumOptions, muted, forceWidth, forceHeight, forceFps, forceDurationInFrames, logLevel, delayRenderTimeoutInMilliseconds, concurrency, enforceAudioTrack, preferLossless, offthreadVideoCacheSizeInBytes, offthreadVideoThreads, colorSpace, downloadBehavior, metadata, mediaCacheSizeInBytes, sampleRate, }) => {
|
|
15
15
|
const actualCodec = (0, validate_gcp_codec_1.validateCloudrunCodec)(codec);
|
|
16
16
|
(0, validate_serveurl_1.validateServeUrl)(serveUrl);
|
|
17
17
|
if (privacy)
|
|
@@ -43,6 +43,7 @@ const internalRenderMediaOnCloudrunRaw = async ({ cloudRunUrl, serviceName, regi
|
|
|
43
43
|
scale: scale !== null && scale !== void 0 ? scale : 1,
|
|
44
44
|
proResProfile: proResProfile !== null && proResProfile !== void 0 ? proResProfile : null,
|
|
45
45
|
x264Preset: x264Preset !== null && x264Preset !== void 0 ? x264Preset : null,
|
|
46
|
+
gopSize: gopSize !== null && gopSize !== void 0 ? gopSize : null,
|
|
46
47
|
everyNthFrame: everyNthFrame !== null && everyNthFrame !== void 0 ? everyNthFrame : 1,
|
|
47
48
|
numberOfGifLoops: numberOfGifLoops !== null && numberOfGifLoops !== void 0 ? numberOfGifLoops : null,
|
|
48
49
|
frameRange: frameRange !== null && frameRange !== void 0 ? frameRange : null,
|
|
@@ -140,7 +141,7 @@ exports.internalRenderMediaOnCloudrun = (0, error_handling_1.wrapWithErrorHandli
|
|
|
140
141
|
* @description Initiates a media rendering process on the Remotion Cloud Run service, facilitating configurations like service region, project composition, and output settings.
|
|
141
142
|
* @see [Documentation](https://remotion.dev/docs/cloudrun/rendermediaoncloudrun)
|
|
142
143
|
*/
|
|
143
|
-
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, forceFps, forceDurationInFrames, logLevel, delayRenderTimeoutInMilliseconds, concurrency, enforceAudioTrack, preferLossless, offthreadVideoCacheSizeInBytes, colorSpace, downloadBehavior, metadata, renderIdOverride, renderStatusWebhook, offthreadVideoThreads, mediaCacheSizeInBytes, sampleRate, }) => {
|
|
144
|
+
const renderMediaOnCloudrun = ({ cloudRunUrl, serviceName, region, serveUrl, composition, inputProps, codec, forceBucketName, privacy, outName, updateRenderProgress, jpegQuality, audioCodec, audioBitrate, videoBitrate, encodingMaxRate, encodingBufferSize, proResProfile, x264Preset, gopSize, crf, pixelFormat, imageFormat, scale, everyNthFrame, numberOfGifLoops, frameRange, envVariables, chromiumOptions, muted, forceWidth, forceHeight, forceFps, forceDurationInFrames, logLevel, delayRenderTimeoutInMilliseconds, concurrency, enforceAudioTrack, preferLossless, offthreadVideoCacheSizeInBytes, colorSpace, downloadBehavior, metadata, renderIdOverride, renderStatusWebhook, offthreadVideoThreads, mediaCacheSizeInBytes, sampleRate, }) => {
|
|
144
145
|
return (0, exports.internalRenderMediaOnCloudrun)({
|
|
145
146
|
cloudRunUrl: cloudRunUrl !== null && cloudRunUrl !== void 0 ? cloudRunUrl : undefined,
|
|
146
147
|
serviceName: serviceName !== null && serviceName !== void 0 ? serviceName : undefined,
|
|
@@ -161,6 +162,7 @@ const renderMediaOnCloudrun = ({ cloudRunUrl, serviceName, region, serveUrl, com
|
|
|
161
162
|
encodingBufferSize: encodingBufferSize !== null && encodingBufferSize !== void 0 ? encodingBufferSize : null,
|
|
162
163
|
proResProfile: proResProfile !== null && proResProfile !== void 0 ? proResProfile : undefined,
|
|
163
164
|
x264Preset: x264Preset !== null && x264Preset !== void 0 ? x264Preset : null,
|
|
165
|
+
gopSize: gopSize !== null && gopSize !== void 0 ? gopSize : null,
|
|
164
166
|
crf: crf !== null && crf !== void 0 ? crf : undefined,
|
|
165
167
|
pixelFormat: pixelFormat !== null && pixelFormat !== void 0 ? pixelFormat : undefined,
|
|
166
168
|
imageFormat: imageFormat !== null && imageFormat !== void 0 ? imageFormat : undefined,
|
|
@@ -14,7 +14,7 @@ const cloudrun_crash_logs_1 = require("../../helpers/cloudrun-crash-logs");
|
|
|
14
14
|
const log_1 = require("../../log");
|
|
15
15
|
const renderArgsCheck_1 = require("./helpers/renderArgsCheck");
|
|
16
16
|
exports.RENDER_COMMAND = 'render';
|
|
17
|
-
const { audioBitrateOption, x264Option, offthreadVideoCacheSizeInBytesOption, offthreadVideoThreadsOption, scaleOption, crfOption, jpegQualityOption, videoBitrateOption, enforceAudioOption, mutedOption, colorSpaceOption, numberOfGifLoopsOption, enableMultiprocessOnLinuxOption, glOption, headlessOption, encodingMaxRateOption, encodingBufferSizeOption, delayRenderTimeoutInMillisecondsOption, binariesDirectoryOption, metadataOption, mediaCacheSizeInBytesOption, darkModeOption, pixelFormatOption, browserExecutableOption, everyNthFrameOption, proResProfileOption, userAgentOption, disableWebSecurityOption, ignoreCertificateErrorsOption, overrideHeightOption, overrideWidthOption, overrideFpsOption, overrideDurationOption, sampleRateOption, } = client_1.BrowserSafeApis.options;
|
|
17
|
+
const { audioBitrateOption, x264Option, offthreadVideoCacheSizeInBytesOption, offthreadVideoThreadsOption, scaleOption, crfOption, gopSizeOption, jpegQualityOption, videoBitrateOption, enforceAudioOption, mutedOption, colorSpaceOption, numberOfGifLoopsOption, enableMultiprocessOnLinuxOption, glOption, headlessOption, encodingMaxRateOption, encodingBufferSizeOption, delayRenderTimeoutInMillisecondsOption, binariesDirectoryOption, metadataOption, mediaCacheSizeInBytesOption, darkModeOption, pixelFormatOption, browserExecutableOption, everyNthFrameOption, proResProfileOption, userAgentOption, disableWebSecurityOption, ignoreCertificateErrorsOption, overrideHeightOption, overrideWidthOption, overrideFpsOption, overrideDurationOption, sampleRateOption, } = client_1.BrowserSafeApis.options;
|
|
18
18
|
const renderCommand = async (args, remotionRoot, logLevel) => {
|
|
19
19
|
var _a, _b, _c, _d;
|
|
20
20
|
const { serveUrl, cloudRunUrl, outName, forceBucketName, downloadName, privacy, region, } = await (0, renderArgsCheck_1.renderArgsCheck)(exports.RENDER_COMMAND, args, logLevel);
|
|
@@ -220,6 +220,9 @@ ${downloadName ? ` Downloaded File = ${downloadName}` : ''}
|
|
|
220
220
|
const crf = crfOption.getValue({
|
|
221
221
|
commandLine: cli_1.CliInternals.parsedCli,
|
|
222
222
|
}).value;
|
|
223
|
+
const gopSize = gopSizeOption.getValue({
|
|
224
|
+
commandLine: cli_1.CliInternals.parsedCli,
|
|
225
|
+
}).value;
|
|
223
226
|
const jpegQuality = jpegQualityOption.getValue({
|
|
224
227
|
commandLine: cli_1.CliInternals.parsedCli,
|
|
225
228
|
}).value;
|
|
@@ -270,6 +273,7 @@ ${downloadName ? ` Downloaded File = ${downloadName}` : ''}
|
|
|
270
273
|
encodingBufferSize,
|
|
271
274
|
proResProfile,
|
|
272
275
|
x264Preset,
|
|
276
|
+
gopSize,
|
|
273
277
|
crf,
|
|
274
278
|
pixelFormat,
|
|
275
279
|
imageFormat: imageFormat !== null && imageFormat !== void 0 ? imageFormat : undefined,
|
|
@@ -20,6 +20,7 @@ export declare const getCompositionFromBody: (body: {
|
|
|
20
20
|
scale: number;
|
|
21
21
|
proResProfile: "4444" | "4444-xq" | "hq" | "light" | "proxy" | "standard" | null;
|
|
22
22
|
x264Preset: "fast" | "faster" | "medium" | "placebo" | "slow" | "slower" | "superfast" | "ultrafast" | "veryfast" | "veryslow" | null;
|
|
23
|
+
gopSize: number | null;
|
|
23
24
|
everyNthFrame: number;
|
|
24
25
|
numberOfGifLoops: number | null;
|
|
25
26
|
frameRange: number | [number, number | null] | null;
|
|
@@ -77,6 +77,7 @@ export declare const CloudRunPayload: z.ZodDiscriminatedUnion<[z.ZodObject<{
|
|
|
77
77
|
veryfast: "veryfast";
|
|
78
78
|
veryslow: "veryslow";
|
|
79
79
|
}>>;
|
|
80
|
+
gopSize: z.ZodNullable<z.ZodNumber>;
|
|
80
81
|
everyNthFrame: z.ZodNumber;
|
|
81
82
|
numberOfGifLoops: z.ZodNullable<z.ZodNumber>;
|
|
82
83
|
frameRange: z.ZodNullable<z.ZodUnion<[z.ZodTuple<[z.ZodNumber, z.ZodNullable<z.ZodNumber>], null>, z.ZodNumber]>>;
|
|
@@ -51,6 +51,7 @@ exports.CloudRunPayload = zod_1.z.discriminatedUnion('type', [
|
|
|
51
51
|
scale: zod_1.z.number(),
|
|
52
52
|
proResProfile,
|
|
53
53
|
x264Preset,
|
|
54
|
+
gopSize: zod_1.z.number().nullable(),
|
|
54
55
|
everyNthFrame: zod_1.z.number(),
|
|
55
56
|
numberOfGifLoops: zod_1.z.number().nullable(),
|
|
56
57
|
frameRange: zod_1.z
|
|
@@ -21,6 +21,7 @@ export declare const renderMediaSingleThread: (body: {
|
|
|
21
21
|
scale: number;
|
|
22
22
|
proResProfile: "4444" | "4444-xq" | "hq" | "light" | "proxy" | "standard" | null;
|
|
23
23
|
x264Preset: "fast" | "faster" | "medium" | "placebo" | "slow" | "slower" | "superfast" | "ultrafast" | "veryfast" | "veryslow" | null;
|
|
24
|
+
gopSize: number | null;
|
|
24
25
|
everyNthFrame: number;
|
|
25
26
|
numberOfGifLoops: number | null;
|
|
26
27
|
frameRange: number | [number, number | null] | null;
|
|
@@ -112,6 +112,7 @@ const renderMediaSingleThread = async (body, res) => {
|
|
|
112
112
|
scale: body.scale,
|
|
113
113
|
proResProfile: (_x = body.proResProfile) !== null && _x !== void 0 ? _x : undefined,
|
|
114
114
|
x264Preset: body.x264Preset,
|
|
115
|
+
gopSize: body.gopSize,
|
|
115
116
|
everyNthFrame: body.everyNthFrame,
|
|
116
117
|
numberOfGifLoops: body.numberOfGifLoops,
|
|
117
118
|
onProgress,
|
|
@@ -21,6 +21,7 @@ export declare const renderStillSingleThread: (body: {
|
|
|
21
21
|
scale: number;
|
|
22
22
|
proResProfile: "4444" | "4444-xq" | "hq" | "light" | "proxy" | "standard" | null;
|
|
23
23
|
x264Preset: "fast" | "faster" | "medium" | "placebo" | "slow" | "slower" | "superfast" | "ultrafast" | "veryfast" | "veryslow" | null;
|
|
24
|
+
gopSize: number | null;
|
|
24
25
|
everyNthFrame: number;
|
|
25
26
|
numberOfGifLoops: number | null;
|
|
26
27
|
frameRange: number | [number, number | null] | null;
|
package/dist/index.d.ts
CHANGED
|
@@ -16,7 +16,7 @@ import type { GcpRegion } from './pricing/gcp-regions';
|
|
|
16
16
|
/**
|
|
17
17
|
* @deprecated Import this from `@remotion/cloudrun/client` instead
|
|
18
18
|
*/
|
|
19
|
-
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, forceFps, forceDurationInFrames, logLevel, delayRenderTimeoutInMilliseconds, concurrency, enforceAudioTrack, preferLossless, offthreadVideoCacheSizeInBytes, colorSpace, downloadBehavior, metadata, renderIdOverride, renderStatusWebhook, offthreadVideoThreads, mediaCacheSizeInBytes, sampleRate, }: RenderMediaOnCloudrunInput) => Promise<{
|
|
19
|
+
declare const renderMediaOnCloudrun: ({ cloudRunUrl, serviceName, region, serveUrl, composition, inputProps, codec, forceBucketName, privacy, outName, updateRenderProgress, jpegQuality, audioCodec, audioBitrate, videoBitrate, encodingMaxRate, encodingBufferSize, proResProfile, x264Preset, gopSize, crf, pixelFormat, imageFormat, scale, everyNthFrame, numberOfGifLoops, frameRange, envVariables, chromiumOptions, muted, forceWidth, forceHeight, forceFps, forceDurationInFrames, logLevel, delayRenderTimeoutInMilliseconds, concurrency, enforceAudioTrack, preferLossless, offthreadVideoCacheSizeInBytes, colorSpace, downloadBehavior, metadata, renderIdOverride, renderStatusWebhook, offthreadVideoThreads, mediaCacheSizeInBytes, sampleRate, }: RenderMediaOnCloudrunInput) => Promise<{
|
|
20
20
|
type: "crash";
|
|
21
21
|
cloudRunEndpoint: string;
|
|
22
22
|
message: "Service crashed without sending a response. Check the logs in GCP console.";
|
package/package.json
CHANGED
|
@@ -3,7 +3,7 @@
|
|
|
3
3
|
"url": "https://github.com/remotion-dev/remotion/tree/main/packages/cloudrun"
|
|
4
4
|
},
|
|
5
5
|
"name": "@remotion/cloudrun",
|
|
6
|
-
"version": "4.0.
|
|
6
|
+
"version": "4.0.466",
|
|
7
7
|
"description": "Render Remotion videos on Google Cloud Run",
|
|
8
8
|
"main": "dist/index.js",
|
|
9
9
|
"scripts": {
|
|
@@ -20,17 +20,17 @@
|
|
|
20
20
|
"@google-cloud/storage": "7.15.2",
|
|
21
21
|
"@google-cloud/resource-manager": "5.3.1",
|
|
22
22
|
"@google-cloud/logging": "11.2.0",
|
|
23
|
-
"@remotion/bundler": "4.0.
|
|
24
|
-
"@remotion/cli": "4.0.
|
|
25
|
-
"@remotion/renderer": "4.0.
|
|
23
|
+
"@remotion/bundler": "4.0.466",
|
|
24
|
+
"@remotion/cli": "4.0.466",
|
|
25
|
+
"@remotion/renderer": "4.0.466",
|
|
26
26
|
"google-auth-library": "8.7.0",
|
|
27
|
-
"remotion": "4.0.
|
|
27
|
+
"remotion": "4.0.466",
|
|
28
28
|
"zod": "4.3.6"
|
|
29
29
|
},
|
|
30
30
|
"devDependencies": {
|
|
31
|
-
"@remotion/compositor-linux-x64-gnu": "4.0.
|
|
31
|
+
"@remotion/compositor-linux-x64-gnu": "4.0.466",
|
|
32
32
|
"@types/minimist": "1.2.2",
|
|
33
|
-
"@remotion/eslint-config-internal": "4.0.
|
|
33
|
+
"@remotion/eslint-config-internal": "4.0.466",
|
|
34
34
|
"eslint": "9.19.0",
|
|
35
35
|
"@types/node": "20.12.14",
|
|
36
36
|
"@typescript/native-preview": "7.0.0-dev.20260217.1"
|