@remotion/cloudrun 4.1.0-alpha3 → 4.1.0-alpha4
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/dist/api/check-if-service-exists.js +0 -1
- package/dist/api/helpers/parse-service-name.d.ts +1 -1
- package/dist/api/helpers/parse-service-name.js +1 -1
- package/dist/api/render-media-on-cloudrun.d.ts +9 -1
- package/dist/api/render-media-on-cloudrun.js +25 -16
- package/dist/api/render-still-on-cloudrun.d.ts +3 -1
- package/dist/api/render-still-on-cloudrun.js +8 -5
- package/dist/api/test/service-names.test.js +1 -1
- package/dist/cli/commands/render/index.js +10 -4
- package/dist/cli/commands/still.js +4 -3
- package/dist/cli/log.d.ts +3 -4
- package/dist/functions/helpers/payloads.d.ts +99 -84
- package/dist/functions/helpers/payloads.js +26 -21
- package/dist/functions/index.js +4 -3
- package/dist/functions/render-media-single-thread.js +22 -5
- package/dist/functions/render-still-single-thread.js +15 -5
- package/package.json +7 -8
- package/tsconfig.tsbuildinfo +1 -1
package/.turbo/turbo-build.log
CHANGED
|
@@ -1,13 +1,13 @@
|
|
|
1
1
|
|
|
2
|
-
> @remotion/cloudrun@3.3.
|
|
2
|
+
> @remotion/cloudrun@3.3.101 build /Users/jonathanburger/remotion-v4/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@3.3.
|
|
6
|
+
> @remotion/cloudrun@3.3.101 buildContainer /Users/jonathanburger/remotion-v4/packages/cloudrun
|
|
7
7
|
> ts-node src/admin/bundle-renderLogic.ts
|
|
8
8
|
|
|
9
9
|
distribution bundled.
|
|
10
10
|
|
|
11
|
-
> @remotion/cloudrun@3.3.
|
|
11
|
+
> @remotion/cloudrun@3.3.101 tarInstaller /Users/jonathanburger/remotion-v4/packages/cloudrun
|
|
12
12
|
> ts-node src/admin/bundle-installer.ts
|
|
13
13
|
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { GcpRegion } from '../../pricing/gcp-regions';
|
|
1
|
+
import type { GcpRegion } from '../../pricing/gcp-regions';
|
|
2
2
|
export declare const getGcpParent: (region: GcpRegion) => string;
|
|
3
3
|
export declare const parseServiceName: (fullServiceName: string, region: GcpRegion) => {
|
|
4
4
|
serviceName: string;
|
|
@@ -10,7 +10,7 @@ const parseServiceName = (fullServiceName, region) => {
|
|
|
10
10
|
const parent = (0, exports.getGcpParent)(region);
|
|
11
11
|
const shortServiceName = fullServiceName.replace(parent + '/services/', '');
|
|
12
12
|
const deployedRegion = fullServiceName.split('/')[3];
|
|
13
|
-
const matched = shortServiceName.match(/remotion
|
|
13
|
+
const matched = shortServiceName.match(/remotion-(.*)-mem([0-9])/);
|
|
14
14
|
if (!matched) {
|
|
15
15
|
throw new Error(`Could not parse service name ${shortServiceName}`);
|
|
16
16
|
}
|
|
@@ -32,6 +32,10 @@ export declare type RenderMediaOnCloudrunInput = {
|
|
|
32
32
|
forceWidth?: number | null;
|
|
33
33
|
forceHeight?: number | null;
|
|
34
34
|
logLevel?: LogLevel;
|
|
35
|
+
delayRenderTimeoutInMilliseconds?: number;
|
|
36
|
+
concurrency?: number | string | null;
|
|
37
|
+
enforceAudioTrack?: boolean;
|
|
38
|
+
preferLossless?: boolean;
|
|
35
39
|
};
|
|
36
40
|
/**
|
|
37
41
|
* @description Triggers a render on a GCP Cloud Run service given a composition and a Cloud Run URL.
|
|
@@ -65,6 +69,10 @@ export declare type RenderMediaOnCloudrunInput = {
|
|
|
65
69
|
* @param params.forceWidth Overrides default composition width.
|
|
66
70
|
* @param params.forceHeight Overrides default composition height.
|
|
67
71
|
* @param params.logLevel Level of logging that Cloud Run service should perform. Default "info".
|
|
72
|
+
* @param params.delayRenderTimeoutInMilliseconds A number describing how long the render may take to resolve all delayRender() calls before it times out.
|
|
73
|
+
* @param params.concurrency By default, each Cloud Run service renders with concurrency 1 (one open browser tab). You may use the option to customize this value.
|
|
74
|
+
* @param params.enforceAudioTrack Render a silent audio track if there wouldn't be any otherwise.
|
|
75
|
+
* @param params.preferLossless Uses a lossless audio codec, if one is available for the codec. If you set audioCodec, it takes priority over preferLossless.
|
|
68
76
|
* @returns {Promise<RenderMediaOnCloudrunOutput>} See documentation for detailed structure
|
|
69
77
|
*/
|
|
70
|
-
export declare const renderMediaOnCloudrun: ({ cloudRunUrl, serviceName, region, serveUrl, composition, inputProps, codec, forceBucketName, privacy, outName, updateRenderProgress, jpegQuality, audioCodec, audioBitrate, videoBitrate, proResProfile, crf, pixelFormat, imageFormat, scale, everyNthFrame, numberOfGifLoops, frameRange, envVariables, chromiumOptions, muted, forceWidth, forceHeight, logLevel, }: RenderMediaOnCloudrunInput) => Promise<RenderMediaOnCloudrunOutput>;
|
|
78
|
+
export declare const renderMediaOnCloudrun: ({ cloudRunUrl, serviceName, region, serveUrl, composition, inputProps, codec, forceBucketName, privacy, outName, updateRenderProgress, jpegQuality, audioCodec, audioBitrate, videoBitrate, proResProfile, crf, pixelFormat, imageFormat, scale, everyNthFrame, numberOfGifLoops, frameRange, envVariables, chromiumOptions, muted, forceWidth, forceHeight, logLevel, delayRenderTimeoutInMilliseconds, concurrency, enforceAudioTrack, preferLossless, }: RenderMediaOnCloudrunInput) => Promise<RenderMediaOnCloudrunOutput>;
|
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
3
|
exports.renderMediaOnCloudrun = void 0;
|
|
4
|
+
const renderer_1 = require("@remotion/renderer");
|
|
4
5
|
const validate_gcp_codec_1 = require("../shared/validate-gcp-codec");
|
|
5
6
|
const validate_privacy_1 = require("../shared/validate-privacy");
|
|
6
7
|
const validate_serveurl_1 = require("../shared/validate-serveurl");
|
|
@@ -39,9 +40,13 @@ const get_cloudrun_endpoint_1 = require("./helpers/get-cloudrun-endpoint");
|
|
|
39
40
|
* @param params.forceWidth Overrides default composition width.
|
|
40
41
|
* @param params.forceHeight Overrides default composition height.
|
|
41
42
|
* @param params.logLevel Level of logging that Cloud Run service should perform. Default "info".
|
|
43
|
+
* @param params.delayRenderTimeoutInMilliseconds A number describing how long the render may take to resolve all delayRender() calls before it times out.
|
|
44
|
+
* @param params.concurrency By default, each Cloud Run service renders with concurrency 1 (one open browser tab). You may use the option to customize this value.
|
|
45
|
+
* @param params.enforceAudioTrack Render a silent audio track if there wouldn't be any otherwise.
|
|
46
|
+
* @param params.preferLossless Uses a lossless audio codec, if one is available for the codec. If you set audioCodec, it takes priority over preferLossless.
|
|
42
47
|
* @returns {Promise<RenderMediaOnCloudrunOutput>} See documentation for detailed structure
|
|
43
48
|
*/
|
|
44
|
-
const renderMediaOnCloudrun = async ({ cloudRunUrl, serviceName, region, serveUrl, composition, inputProps, codec, forceBucketName, privacy, outName, updateRenderProgress, jpegQuality, audioCodec, audioBitrate, videoBitrate, proResProfile, crf, pixelFormat, imageFormat, scale, everyNthFrame, numberOfGifLoops, frameRange, envVariables, chromiumOptions, muted, forceWidth, forceHeight, logLevel, }) => {
|
|
49
|
+
const renderMediaOnCloudrun = async ({ cloudRunUrl, serviceName, region, serveUrl, composition, inputProps, codec, forceBucketName, privacy, outName, updateRenderProgress, jpegQuality, audioCodec, audioBitrate, videoBitrate, proResProfile, crf, pixelFormat, imageFormat, scale, everyNthFrame, numberOfGifLoops, frameRange, envVariables, chromiumOptions, muted, forceWidth, forceHeight, logLevel, delayRenderTimeoutInMilliseconds, concurrency, enforceAudioTrack, preferLossless, }) => {
|
|
45
50
|
const actualCodec = (0, validate_gcp_codec_1.validateCloudrunCodec)(codec);
|
|
46
51
|
(0, validate_serveurl_1.validateServeUrl)(serveUrl);
|
|
47
52
|
if (privacy)
|
|
@@ -56,22 +61,22 @@ const renderMediaOnCloudrun = async ({ cloudRunUrl, serviceName, region, serveUr
|
|
|
56
61
|
composition,
|
|
57
62
|
serveUrl,
|
|
58
63
|
codec: actualCodec,
|
|
59
|
-
inputProps,
|
|
60
|
-
jpegQuality,
|
|
61
|
-
audioCodec,
|
|
62
|
-
audioBitrate,
|
|
63
|
-
videoBitrate,
|
|
64
|
-
crf,
|
|
65
|
-
pixelFormat,
|
|
66
|
-
imageFormat,
|
|
67
|
-
scale,
|
|
68
|
-
proResProfile,
|
|
69
|
-
everyNthFrame,
|
|
70
|
-
numberOfGifLoops,
|
|
71
|
-
frameRange,
|
|
72
|
-
envVariables,
|
|
64
|
+
inputProps: inputProps !== null && inputProps !== void 0 ? inputProps : {},
|
|
65
|
+
jpegQuality: jpegQuality !== null && jpegQuality !== void 0 ? jpegQuality : renderer_1.RenderInternals.DEFAULT_JPEG_QUALITY,
|
|
66
|
+
audioCodec: audioCodec !== null && audioCodec !== void 0 ? audioCodec : null,
|
|
67
|
+
audioBitrate: audioBitrate !== null && audioBitrate !== void 0 ? audioBitrate : null,
|
|
68
|
+
videoBitrate: videoBitrate !== null && videoBitrate !== void 0 ? videoBitrate : null,
|
|
69
|
+
crf: crf !== null && crf !== void 0 ? crf : null,
|
|
70
|
+
pixelFormat: pixelFormat !== null && pixelFormat !== void 0 ? pixelFormat : renderer_1.RenderInternals.DEFAULT_PIXEL_FORMAT,
|
|
71
|
+
imageFormat: imageFormat !== null && imageFormat !== void 0 ? imageFormat : renderer_1.RenderInternals.DEFAULT_VIDEO_IMAGE_FORMAT,
|
|
72
|
+
scale: scale !== null && scale !== void 0 ? scale : 1,
|
|
73
|
+
proResProfile: proResProfile !== null && proResProfile !== void 0 ? proResProfile : null,
|
|
74
|
+
everyNthFrame: everyNthFrame !== null && everyNthFrame !== void 0 ? everyNthFrame : 1,
|
|
75
|
+
numberOfGifLoops: numberOfGifLoops !== null && numberOfGifLoops !== void 0 ? numberOfGifLoops : null,
|
|
76
|
+
frameRange: frameRange !== null && frameRange !== void 0 ? frameRange : null,
|
|
77
|
+
envVariables: envVariables !== null && envVariables !== void 0 ? envVariables : {},
|
|
73
78
|
chromiumOptions,
|
|
74
|
-
muted,
|
|
79
|
+
muted: muted !== null && muted !== void 0 ? muted : false,
|
|
75
80
|
outputBucket,
|
|
76
81
|
privacy,
|
|
77
82
|
outName,
|
|
@@ -79,6 +84,10 @@ const renderMediaOnCloudrun = async ({ cloudRunUrl, serviceName, region, serveUr
|
|
|
79
84
|
forceHeight,
|
|
80
85
|
type: 'media',
|
|
81
86
|
logLevel: logLevel !== null && logLevel !== void 0 ? logLevel : 'info',
|
|
87
|
+
delayRenderTimeoutInMilliseconds: delayRenderTimeoutInMilliseconds !== null && delayRenderTimeoutInMilliseconds !== void 0 ? delayRenderTimeoutInMilliseconds : renderer_1.RenderInternals.DEFAULT_TIMEOUT,
|
|
88
|
+
concurrency: concurrency !== null && concurrency !== void 0 ? concurrency : null,
|
|
89
|
+
enforceAudioTrack: enforceAudioTrack !== null && enforceAudioTrack !== void 0 ? enforceAudioTrack : false,
|
|
90
|
+
preferLossless: preferLossless !== null && preferLossless !== void 0 ? preferLossless : false,
|
|
82
91
|
};
|
|
83
92
|
const client = await (0, get_auth_client_for_url_1.getAuthClientForUrl)(cloudRunEndpoint);
|
|
84
93
|
const postResponse = await client.request({
|
|
@@ -20,6 +20,7 @@ export declare type RenderStillOnCloudrunInput = {
|
|
|
20
20
|
forceWidth?: number | null;
|
|
21
21
|
forceHeight?: number | null;
|
|
22
22
|
logLevel?: LogLevel;
|
|
23
|
+
delayRenderTimeoutInMilliseconds?: number;
|
|
23
24
|
};
|
|
24
25
|
/**
|
|
25
26
|
* @description Triggers a render on a GCP Cloud Run service given a composition and a Cloud Run URL.
|
|
@@ -42,6 +43,7 @@ export declare type RenderStillOnCloudrunInput = {
|
|
|
42
43
|
* @param params.forceWidth Overrides default composition width.
|
|
43
44
|
* @param params.forceHeight Overrides default composition height.
|
|
44
45
|
* @param params.logLevel Level of logging that Cloud Run service should perform. Default "info".
|
|
46
|
+
* @param params.delayRenderTimeoutInMilliseconds A number describing how long the render may take to resolve all delayRender() calls before it times out.
|
|
45
47
|
* @returns {Promise<RenderStillOnCloudrunOutput>} See documentation for detailed structure
|
|
46
48
|
*/
|
|
47
|
-
export declare const renderStillOnCloudrun: ({ cloudRunUrl, serviceName, region, serveUrl, composition, inputProps, forceBucketName, privacy, outName, imageFormat, envVariables, frame, jpegQuality, chromiumOptions, scale, forceWidth, forceHeight, logLevel, }: RenderStillOnCloudrunInput) => Promise<RenderStillOnCloudrunOutput>;
|
|
49
|
+
export declare const renderStillOnCloudrun: ({ cloudRunUrl, serviceName, region, serveUrl, composition, inputProps, forceBucketName, privacy, outName, imageFormat, envVariables, frame, jpegQuality, chromiumOptions, scale, forceWidth, forceHeight, logLevel, delayRenderTimeoutInMilliseconds, }: RenderStillOnCloudrunInput) => Promise<RenderStillOnCloudrunOutput>;
|
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
3
|
exports.renderStillOnCloudrun = void 0;
|
|
4
|
+
const renderer_1 = require("@remotion/renderer");
|
|
4
5
|
const validate_privacy_1 = require("../shared/validate-privacy");
|
|
5
6
|
const validate_serveurl_1 = require("../shared/validate-serveurl");
|
|
6
7
|
const get_or_create_bucket_1 = require("./get-or-create-bucket");
|
|
@@ -27,9 +28,10 @@ const get_cloudrun_endpoint_1 = require("./helpers/get-cloudrun-endpoint");
|
|
|
27
28
|
* @param params.forceWidth Overrides default composition width.
|
|
28
29
|
* @param params.forceHeight Overrides default composition height.
|
|
29
30
|
* @param params.logLevel Level of logging that Cloud Run service should perform. Default "info".
|
|
31
|
+
* @param params.delayRenderTimeoutInMilliseconds A number describing how long the render may take to resolve all delayRender() calls before it times out.
|
|
30
32
|
* @returns {Promise<RenderStillOnCloudrunOutput>} See documentation for detailed structure
|
|
31
33
|
*/
|
|
32
|
-
const renderStillOnCloudrun = async ({ cloudRunUrl, serviceName, region, serveUrl, composition, inputProps, forceBucketName, privacy, outName, imageFormat, envVariables, frame, jpegQuality, chromiumOptions, scale, forceWidth, forceHeight, logLevel, }) => {
|
|
34
|
+
const renderStillOnCloudrun = async ({ cloudRunUrl, serviceName, region, serveUrl, composition, inputProps, forceBucketName, privacy, outName, imageFormat, envVariables, frame, jpegQuality, chromiumOptions, scale, forceWidth, forceHeight, logLevel, delayRenderTimeoutInMilliseconds, }) => {
|
|
33
35
|
(0, validate_serveurl_1.validateServeUrl)(serveUrl);
|
|
34
36
|
if (privacy)
|
|
35
37
|
(0, validate_privacy_1.validatePrivacy)(privacy);
|
|
@@ -42,20 +44,21 @@ const renderStillOnCloudrun = async ({ cloudRunUrl, serviceName, region, serveUr
|
|
|
42
44
|
const data = {
|
|
43
45
|
composition,
|
|
44
46
|
serveUrl,
|
|
45
|
-
inputProps,
|
|
47
|
+
inputProps: inputProps !== null && inputProps !== void 0 ? inputProps : {},
|
|
46
48
|
outputBucket,
|
|
47
49
|
outName,
|
|
48
|
-
privacy,
|
|
50
|
+
privacy: privacy !== null && privacy !== void 0 ? privacy : 'public',
|
|
49
51
|
imageFormat,
|
|
50
|
-
envVariables,
|
|
52
|
+
envVariables: envVariables !== null && envVariables !== void 0 ? envVariables : {},
|
|
51
53
|
jpegQuality,
|
|
52
54
|
chromiumOptions,
|
|
53
|
-
scale,
|
|
55
|
+
scale: scale !== null && scale !== void 0 ? scale : 1,
|
|
54
56
|
forceWidth,
|
|
55
57
|
forceHeight,
|
|
56
58
|
frame: frame !== null && frame !== void 0 ? frame : 0,
|
|
57
59
|
type: 'still',
|
|
58
60
|
logLevel: logLevel !== null && logLevel !== void 0 ? logLevel : 'info',
|
|
61
|
+
delayRenderTimeoutInMilliseconds: delayRenderTimeoutInMilliseconds !== null && delayRenderTimeoutInMilliseconds !== void 0 ? delayRenderTimeoutInMilliseconds : renderer_1.RenderInternals.DEFAULT_TIMEOUT,
|
|
59
62
|
};
|
|
60
63
|
const client = await (0, get_auth_client_for_url_1.getAuthClientForUrl)(cloudRunEndpoint);
|
|
61
64
|
const renderResponse = await client.request({
|
|
@@ -20,7 +20,7 @@ process.env.REMOTION_GCP_PROJECT_ID = 'remotion-test-project';
|
|
|
20
20
|
(0, vitest_1.expect)(parsed).toEqual({
|
|
21
21
|
consoleUrl: `https://console.cloud.google.com/run/detail/asia-east1/remotion-${dashedVersion}-mem100000k-cpu8-0-t3600/logs`,
|
|
22
22
|
region: 'asia-east1',
|
|
23
|
-
remotionVersion: '
|
|
23
|
+
remotionVersion: remotion_1.VERSION.replace(/\./g, '-'),
|
|
24
24
|
serviceName: `remotion-${dashedVersion}-mem100000k-cpu8-0-t3600`,
|
|
25
25
|
});
|
|
26
26
|
// Max length of service name is 49 characters, asking for less in case the version string gets longer
|
|
@@ -13,7 +13,7 @@ const log_1 = require("../../log");
|
|
|
13
13
|
const renderArgsCheck_1 = require("./helpers/renderArgsCheck");
|
|
14
14
|
exports.RENDER_COMMAND = 'render';
|
|
15
15
|
const renderCommand = async (args, remotionRoot) => {
|
|
16
|
-
var _a;
|
|
16
|
+
var _a, _b;
|
|
17
17
|
const { serveUrl, cloudRunUrl, outName, forceBucketName, downloadName, privacy, region, } = await (0, renderArgsCheck_1.renderArgsCheck)(exports.RENDER_COMMAND, args);
|
|
18
18
|
const { codec, reason: codecReason } = cli_1.CliInternals.getFinalOutputCodec({
|
|
19
19
|
cliFlag: cli_1.CliInternals.parsedCli.codec,
|
|
@@ -24,7 +24,7 @@ const renderCommand = async (args, remotionRoot) => {
|
|
|
24
24
|
});
|
|
25
25
|
const imageFormat = args_1.parsedCloudrunCli['image-format'];
|
|
26
26
|
const audioCodec = args_1.parsedCloudrunCli['audio-codec'];
|
|
27
|
-
const { chromiumOptions, crf, envVariables, frameRange, inputProps, logLevel, puppeteerTimeout, pixelFormat, proResProfile, jpegQuality, scale, everyNthFrame, numberOfGifLoops, muted, audioBitrate, videoBitrate, height, width, browserExecutable, port, } = await cli_1.CliInternals.getCliOptions({
|
|
27
|
+
const { chromiumOptions, crf, envVariables, frameRange, inputProps, logLevel, puppeteerTimeout, pixelFormat, proResProfile, jpegQuality, scale, everyNthFrame, numberOfGifLoops, muted, audioBitrate, videoBitrate, height, width, browserExecutable, port, enforceAudioTrack, } = await cli_1.CliInternals.getCliOptions({
|
|
28
28
|
type: 'series',
|
|
29
29
|
isLambda: true,
|
|
30
30
|
remotionRoot,
|
|
@@ -38,7 +38,7 @@ const renderCommand = async (args, remotionRoot) => {
|
|
|
38
38
|
indent: false,
|
|
39
39
|
port,
|
|
40
40
|
remotionRoot,
|
|
41
|
-
|
|
41
|
+
logLevel,
|
|
42
42
|
webpackConfigOrServeUrl: serveUrl,
|
|
43
43
|
});
|
|
44
44
|
const { compositionId } = await cli_1.CliInternals.getCompositionWithDimensionOverride({
|
|
@@ -54,7 +54,7 @@ const renderCommand = async (args, remotionRoot) => {
|
|
|
54
54
|
puppeteerInstance: undefined,
|
|
55
55
|
serveUrlOrWebpackUrl: serveUrl,
|
|
56
56
|
timeoutInMilliseconds: puppeteerTimeout,
|
|
57
|
-
|
|
57
|
+
logLevel,
|
|
58
58
|
width,
|
|
59
59
|
server: await server,
|
|
60
60
|
});
|
|
@@ -127,6 +127,12 @@ ${downloadName ? ` Downloaded File = ${downloadName}` : ''}
|
|
|
127
127
|
forceBucketName,
|
|
128
128
|
updateRenderProgress,
|
|
129
129
|
logLevel: config_1.ConfigInternals.Logging.getLogLevel(),
|
|
130
|
+
// Special case: Should not use default local concurrency, or from
|
|
131
|
+
// config file, just when explicitly set
|
|
132
|
+
concurrency: (_b = cli_1.CliInternals.parsedCli.concurrency) !== null && _b !== void 0 ? _b : null,
|
|
133
|
+
delayRenderTimeoutInMilliseconds: puppeteerTimeout,
|
|
134
|
+
enforceAudioTrack,
|
|
135
|
+
preferLossless: false,
|
|
130
136
|
});
|
|
131
137
|
renderProgress.doneIn = Date.now() - renderStart;
|
|
132
138
|
updateProgress();
|
|
@@ -13,7 +13,7 @@ exports.STILL_COMMAND = 'still';
|
|
|
13
13
|
const stillCommand = async (args, remotionRoot) => {
|
|
14
14
|
var _a, _b;
|
|
15
15
|
const { serveUrl, cloudRunUrl, outName, forceBucketName, privacy, downloadName, region, } = await (0, renderArgsCheck_1.renderArgsCheck)(exports.STILL_COMMAND, args);
|
|
16
|
-
const { chromiumOptions, envVariables, inputProps,
|
|
16
|
+
const { chromiumOptions, envVariables, inputProps, puppeteerTimeout, jpegQuality, stillFrame, scale, height, width, browserExecutable, port, logLevel, } = await cli_1.CliInternals.getCliOptions({
|
|
17
17
|
type: 'still',
|
|
18
18
|
isLambda: true,
|
|
19
19
|
remotionRoot,
|
|
@@ -27,7 +27,7 @@ const stillCommand = async (args, remotionRoot) => {
|
|
|
27
27
|
indent: false,
|
|
28
28
|
port,
|
|
29
29
|
remotionRoot,
|
|
30
|
-
|
|
30
|
+
logLevel,
|
|
31
31
|
webpackConfigOrServeUrl: serveUrl,
|
|
32
32
|
});
|
|
33
33
|
const { compositionId } = await cli_1.CliInternals.getCompositionWithDimensionOverride({
|
|
@@ -35,7 +35,7 @@ const stillCommand = async (args, remotionRoot) => {
|
|
|
35
35
|
compositionIdFromUi: null,
|
|
36
36
|
indent: false,
|
|
37
37
|
serveUrlOrWebpackUrl: serveUrl,
|
|
38
|
-
|
|
38
|
+
logLevel,
|
|
39
39
|
browserExecutable,
|
|
40
40
|
chromiumOptions,
|
|
41
41
|
envVariables,
|
|
@@ -102,6 +102,7 @@ ${downloadName ? ` Downloaded File = ${downloadName}` : ''}
|
|
|
102
102
|
forceBucketName,
|
|
103
103
|
outName,
|
|
104
104
|
logLevel: config_1.ConfigInternals.Logging.getLogLevel(),
|
|
105
|
+
delayRenderTimeoutInMilliseconds: puppeteerTimeout,
|
|
105
106
|
});
|
|
106
107
|
doneIn = Date.now() - renderStart;
|
|
107
108
|
updateProgress(true);
|
package/dist/cli/log.d.ts
CHANGED
|
@@ -2,20 +2,19 @@ export declare const Log: {
|
|
|
2
2
|
verbose: (message?: any, ...optionalParams: any[]) => void;
|
|
3
3
|
verboseAdvanced: (options: {
|
|
4
4
|
indent: boolean;
|
|
5
|
-
logLevel: "
|
|
5
|
+
logLevel: "error" | "verbose" | "info" | "warn";
|
|
6
6
|
} & {
|
|
7
7
|
tag?: string | undefined;
|
|
8
|
-
secondTag?: string | undefined;
|
|
9
8
|
}, message?: any, ...optionalParams: any[]) => void;
|
|
10
9
|
info: (message?: any, ...optionalParams: any[]) => void;
|
|
11
10
|
infoAdvanced: (options: {
|
|
12
11
|
indent: boolean;
|
|
13
|
-
logLevel: "
|
|
12
|
+
logLevel: "error" | "verbose" | "info" | "warn";
|
|
14
13
|
}, message?: any, ...optionalParams: any[]) => void;
|
|
15
14
|
warn: (message?: any, ...optionalParams: any[]) => void;
|
|
16
15
|
warnAdvanced: (options: {
|
|
17
16
|
indent: boolean;
|
|
18
|
-
logLevel: "
|
|
17
|
+
logLevel: "error" | "verbose" | "info" | "warn";
|
|
19
18
|
}, message?: any, ...optionalParams: any[]) => void;
|
|
20
19
|
error: (message?: any, ...optionalParams: any[]) => void;
|
|
21
20
|
};
|
|
@@ -6,20 +6,20 @@ export declare const CloudRunPayload: z.ZodDiscriminatedUnion<"type", [z.ZodObje
|
|
|
6
6
|
forceHeight: z.ZodNullable<z.ZodOptional<z.ZodNumber>>;
|
|
7
7
|
forceWidth: z.ZodNullable<z.ZodOptional<z.ZodNumber>>;
|
|
8
8
|
codec: z.ZodEnum<["h264", "h265", "vp8", "vp9", "mp3", "aac", "wav", "prores", "h264-mkv", "gif"]>;
|
|
9
|
-
inputProps: z.
|
|
10
|
-
jpegQuality: z.
|
|
11
|
-
audioCodec: z.ZodNullable<z.
|
|
12
|
-
audioBitrate: z.ZodNullable<z.
|
|
13
|
-
videoBitrate: z.ZodNullable<z.
|
|
14
|
-
crf: z.ZodNullable<z.
|
|
15
|
-
pixelFormat: z.
|
|
16
|
-
imageFormat: z.
|
|
17
|
-
scale: z.
|
|
18
|
-
proResProfile: z.
|
|
19
|
-
everyNthFrame: z.
|
|
20
|
-
numberOfGifLoops: z.ZodNullable<z.
|
|
21
|
-
frameRange: z.
|
|
22
|
-
envVariables: z.
|
|
9
|
+
inputProps: z.ZodRecord<z.ZodString, z.ZodUnknown>;
|
|
10
|
+
jpegQuality: z.ZodNumber;
|
|
11
|
+
audioCodec: z.ZodNullable<z.ZodEnum<["pcm-16", "aac", "mp3", "opus"]>>;
|
|
12
|
+
audioBitrate: z.ZodNullable<z.ZodString>;
|
|
13
|
+
videoBitrate: z.ZodNullable<z.ZodString>;
|
|
14
|
+
crf: z.ZodNullable<z.ZodNumber>;
|
|
15
|
+
pixelFormat: z.ZodEnum<["yuv420p", "yuva420p", "yuv422p", "yuv444p", "yuv420p10le", "yuv422p10le", "yuv444p10le", "yuva444p10le"]>;
|
|
16
|
+
imageFormat: z.ZodEnum<["png", "jpeg", "none"]>;
|
|
17
|
+
scale: z.ZodNumber;
|
|
18
|
+
proResProfile: z.ZodNullable<z.ZodEnum<["4444-xq", "4444", "hq", "standard", "light", "proxy"]>>;
|
|
19
|
+
everyNthFrame: z.ZodNumber;
|
|
20
|
+
numberOfGifLoops: z.ZodNullable<z.ZodNumber>;
|
|
21
|
+
frameRange: z.ZodNullable<z.ZodUnion<[z.ZodTuple<[z.ZodNumber, z.ZodNumber], null>, z.ZodNumber]>>;
|
|
22
|
+
envVariables: z.ZodRecord<z.ZodString, z.ZodString>;
|
|
23
23
|
chromiumOptions: z.ZodOptional<z.ZodObject<{
|
|
24
24
|
ignoreCertificateErrors: z.ZodOptional<z.ZodBoolean>;
|
|
25
25
|
disableWebSecurity: z.ZodOptional<z.ZodBoolean>;
|
|
@@ -39,34 +39,43 @@ export declare const CloudRunPayload: z.ZodDiscriminatedUnion<"type", [z.ZodObje
|
|
|
39
39
|
headless?: boolean | undefined;
|
|
40
40
|
userAgent?: string | null | undefined;
|
|
41
41
|
}>>;
|
|
42
|
-
muted: z.
|
|
42
|
+
muted: z.ZodBoolean;
|
|
43
43
|
outputBucket: z.ZodString;
|
|
44
44
|
outName: z.ZodOptional<z.ZodString>;
|
|
45
45
|
privacy: z.ZodOptional<z.ZodEnum<["public", "private"]>>;
|
|
46
46
|
logLevel: z.ZodEnum<["verbose", "info", "warn", "error"]>;
|
|
47
|
+
delayRenderTimeoutInMilliseconds: z.ZodNumber;
|
|
48
|
+
concurrency: z.ZodNullable<z.ZodUnion<[z.ZodNumber, z.ZodString]>>;
|
|
49
|
+
enforceAudioTrack: z.ZodBoolean;
|
|
50
|
+
preferLossless: z.ZodBoolean;
|
|
47
51
|
}, "strip", z.ZodTypeAny, {
|
|
48
52
|
serveUrl: string;
|
|
49
|
-
codec: "h264" | "h265" | "vp8" | "vp9" | "mp3" | "aac" | "wav" | "prores" | "h264-mkv" | "gif";
|
|
50
|
-
logLevel: "verbose" | "info" | "warn" | "error";
|
|
51
|
-
composition: string;
|
|
52
53
|
type: "media";
|
|
54
|
+
composition: string;
|
|
55
|
+
codec: "h264" | "h265" | "vp8" | "vp9" | "mp3" | "aac" | "wav" | "prores" | "h264-mkv" | "gif";
|
|
56
|
+
inputProps: Record<string, unknown>;
|
|
57
|
+
jpegQuality: number;
|
|
58
|
+
audioCodec: "mp3" | "aac" | "pcm-16" | "opus" | null;
|
|
59
|
+
audioBitrate: string | null;
|
|
60
|
+
videoBitrate: string | null;
|
|
61
|
+
crf: number | null;
|
|
62
|
+
pixelFormat: "yuv420p" | "yuva420p" | "yuv422p" | "yuv444p" | "yuv420p10le" | "yuv422p10le" | "yuv444p10le" | "yuva444p10le";
|
|
63
|
+
imageFormat: "png" | "jpeg" | "none";
|
|
64
|
+
scale: number;
|
|
65
|
+
proResProfile: "4444-xq" | "4444" | "hq" | "standard" | "light" | "proxy" | null;
|
|
66
|
+
everyNthFrame: number;
|
|
67
|
+
numberOfGifLoops: number | null;
|
|
68
|
+
frameRange: ((number | [number, number]) & (number | [number, number] | undefined)) | null;
|
|
69
|
+
envVariables: Record<string, string>;
|
|
70
|
+
muted: boolean;
|
|
53
71
|
outputBucket: string;
|
|
72
|
+
logLevel: "error" | "verbose" | "info" | "warn";
|
|
73
|
+
delayRenderTimeoutInMilliseconds: number;
|
|
74
|
+
concurrency: string | number | null;
|
|
75
|
+
enforceAudioTrack: boolean;
|
|
76
|
+
preferLossless: boolean;
|
|
54
77
|
forceHeight?: number | null | undefined;
|
|
55
78
|
forceWidth?: number | null | undefined;
|
|
56
|
-
inputProps?: Record<string, unknown> | undefined;
|
|
57
|
-
jpegQuality?: number | undefined;
|
|
58
|
-
audioCodec?: "mp3" | "aac" | "pcm-16" | "opus" | null | undefined;
|
|
59
|
-
audioBitrate?: string | null | undefined;
|
|
60
|
-
videoBitrate?: string | null | undefined;
|
|
61
|
-
crf?: number | null | undefined;
|
|
62
|
-
pixelFormat?: "yuv420p" | "yuva420p" | "yuv422p" | "yuv444p" | "yuv420p10le" | "yuv422p10le" | "yuv444p10le" | "yuva444p10le" | undefined;
|
|
63
|
-
imageFormat?: "png" | "jpeg" | "none" | undefined;
|
|
64
|
-
scale?: number | undefined;
|
|
65
|
-
proResProfile?: "4444-xq" | "4444" | "hq" | "standard" | "light" | "proxy" | undefined;
|
|
66
|
-
everyNthFrame?: number | undefined;
|
|
67
|
-
numberOfGifLoops?: number | null | undefined;
|
|
68
|
-
frameRange?: number | [number, number] | undefined;
|
|
69
|
-
envVariables?: Record<string, string> | undefined;
|
|
70
79
|
chromiumOptions?: {
|
|
71
80
|
ignoreCertificateErrors?: boolean | undefined;
|
|
72
81
|
disableWebSecurity?: boolean | undefined;
|
|
@@ -74,32 +83,36 @@ export declare const CloudRunPayload: z.ZodDiscriminatedUnion<"type", [z.ZodObje
|
|
|
74
83
|
headless?: boolean | undefined;
|
|
75
84
|
userAgent?: string | null | undefined;
|
|
76
85
|
} | undefined;
|
|
77
|
-
muted?: boolean | undefined;
|
|
78
86
|
outName?: string | undefined;
|
|
79
87
|
privacy?: "public" | "private" | undefined;
|
|
80
88
|
}, {
|
|
81
89
|
serveUrl: string;
|
|
82
|
-
codec: "h264" | "h265" | "vp8" | "vp9" | "mp3" | "aac" | "wav" | "prores" | "h264-mkv" | "gif";
|
|
83
|
-
logLevel: "verbose" | "info" | "warn" | "error";
|
|
84
|
-
composition: string;
|
|
85
90
|
type: "media";
|
|
91
|
+
composition: string;
|
|
92
|
+
codec: "h264" | "h265" | "vp8" | "vp9" | "mp3" | "aac" | "wav" | "prores" | "h264-mkv" | "gif";
|
|
93
|
+
inputProps: Record<string, unknown>;
|
|
94
|
+
jpegQuality: number;
|
|
95
|
+
audioCodec: "mp3" | "aac" | "pcm-16" | "opus" | null;
|
|
96
|
+
audioBitrate: string | null;
|
|
97
|
+
videoBitrate: string | null;
|
|
98
|
+
crf: number | null;
|
|
99
|
+
pixelFormat: "yuv420p" | "yuva420p" | "yuv422p" | "yuv444p" | "yuv420p10le" | "yuv422p10le" | "yuv444p10le" | "yuva444p10le";
|
|
100
|
+
imageFormat: "png" | "jpeg" | "none";
|
|
101
|
+
scale: number;
|
|
102
|
+
proResProfile: "4444-xq" | "4444" | "hq" | "standard" | "light" | "proxy" | null;
|
|
103
|
+
everyNthFrame: number;
|
|
104
|
+
numberOfGifLoops: number | null;
|
|
105
|
+
frameRange: ((number | [number, number]) & (number | [number, number] | undefined)) | null;
|
|
106
|
+
envVariables: Record<string, string>;
|
|
107
|
+
muted: boolean;
|
|
86
108
|
outputBucket: string;
|
|
109
|
+
logLevel: "error" | "verbose" | "info" | "warn";
|
|
110
|
+
delayRenderTimeoutInMilliseconds: number;
|
|
111
|
+
concurrency: string | number | null;
|
|
112
|
+
enforceAudioTrack: boolean;
|
|
113
|
+
preferLossless: boolean;
|
|
87
114
|
forceHeight?: number | null | undefined;
|
|
88
115
|
forceWidth?: number | null | undefined;
|
|
89
|
-
inputProps?: Record<string, unknown> | undefined;
|
|
90
|
-
jpegQuality?: number | undefined;
|
|
91
|
-
audioCodec?: "mp3" | "aac" | "pcm-16" | "opus" | null | undefined;
|
|
92
|
-
audioBitrate?: string | null | undefined;
|
|
93
|
-
videoBitrate?: string | null | undefined;
|
|
94
|
-
crf?: number | null | undefined;
|
|
95
|
-
pixelFormat?: "yuv420p" | "yuva420p" | "yuv422p" | "yuv444p" | "yuv420p10le" | "yuv422p10le" | "yuv444p10le" | "yuva444p10le" | undefined;
|
|
96
|
-
imageFormat?: "png" | "jpeg" | "none" | undefined;
|
|
97
|
-
scale?: number | undefined;
|
|
98
|
-
proResProfile?: "4444-xq" | "4444" | "hq" | "standard" | "light" | "proxy" | undefined;
|
|
99
|
-
everyNthFrame?: number | undefined;
|
|
100
|
-
numberOfGifLoops?: number | null | undefined;
|
|
101
|
-
frameRange?: number | [number, number] | undefined;
|
|
102
|
-
envVariables?: Record<string, string> | undefined;
|
|
103
116
|
chromiumOptions?: {
|
|
104
117
|
ignoreCertificateErrors?: boolean | undefined;
|
|
105
118
|
disableWebSecurity?: boolean | undefined;
|
|
@@ -107,7 +120,6 @@ export declare const CloudRunPayload: z.ZodDiscriminatedUnion<"type", [z.ZodObje
|
|
|
107
120
|
headless?: boolean | undefined;
|
|
108
121
|
userAgent?: string | null | undefined;
|
|
109
122
|
} | undefined;
|
|
110
|
-
muted?: boolean | undefined;
|
|
111
123
|
outName?: string | undefined;
|
|
112
124
|
privacy?: "public" | "private" | undefined;
|
|
113
125
|
}>, z.ZodObject<{
|
|
@@ -116,12 +128,12 @@ export declare const CloudRunPayload: z.ZodDiscriminatedUnion<"type", [z.ZodObje
|
|
|
116
128
|
composition: z.ZodString;
|
|
117
129
|
forceHeight: z.ZodNullable<z.ZodOptional<z.ZodNumber>>;
|
|
118
130
|
forceWidth: z.ZodNullable<z.ZodOptional<z.ZodNumber>>;
|
|
119
|
-
inputProps: z.
|
|
131
|
+
inputProps: z.ZodRecord<z.ZodString, z.ZodUnknown>;
|
|
120
132
|
jpegQuality: z.ZodOptional<z.ZodNumber>;
|
|
121
|
-
imageFormat: z.
|
|
122
|
-
scale: z.
|
|
123
|
-
privacy: z.
|
|
124
|
-
envVariables: z.
|
|
133
|
+
imageFormat: z.ZodEnum<["png", "jpeg", "pdf", "webp"]>;
|
|
134
|
+
scale: z.ZodNumber;
|
|
135
|
+
privacy: z.ZodEnum<["public", "private"]>;
|
|
136
|
+
envVariables: z.ZodRecord<z.ZodString, z.ZodString>;
|
|
125
137
|
chromiumOptions: z.ZodOptional<z.ZodObject<{
|
|
126
138
|
ignoreCertificateErrors: z.ZodOptional<z.ZodBoolean>;
|
|
127
139
|
disableWebSecurity: z.ZodOptional<z.ZodBoolean>;
|
|
@@ -144,22 +156,24 @@ export declare const CloudRunPayload: z.ZodDiscriminatedUnion<"type", [z.ZodObje
|
|
|
144
156
|
outputBucket: z.ZodString;
|
|
145
157
|
outName: z.ZodOptional<z.ZodString>;
|
|
146
158
|
frame: z.ZodNumber;
|
|
159
|
+
delayRenderTimeoutInMilliseconds: z.ZodNumber;
|
|
147
160
|
logLevel: z.ZodEnum<["verbose", "info", "warn", "error"]>;
|
|
148
161
|
}, "strip", z.ZodTypeAny, {
|
|
149
162
|
serveUrl: string;
|
|
150
|
-
logLevel: "verbose" | "info" | "warn" | "error";
|
|
151
|
-
composition: string;
|
|
152
163
|
type: "still";
|
|
153
|
-
|
|
164
|
+
composition: string;
|
|
165
|
+
inputProps: Record<string, unknown>;
|
|
166
|
+
imageFormat: "png" | "jpeg" | "pdf" | "webp";
|
|
167
|
+
scale: number;
|
|
168
|
+
envVariables: Record<string, string>;
|
|
154
169
|
outputBucket: string;
|
|
170
|
+
privacy: "public" | "private";
|
|
171
|
+
logLevel: "error" | "verbose" | "info" | "warn";
|
|
172
|
+
delayRenderTimeoutInMilliseconds: number;
|
|
173
|
+
frame: number;
|
|
155
174
|
forceHeight?: number | null | undefined;
|
|
156
175
|
forceWidth?: number | null | undefined;
|
|
157
|
-
inputProps?: Record<string, unknown> | undefined;
|
|
158
176
|
jpegQuality?: number | undefined;
|
|
159
|
-
imageFormat?: "png" | "jpeg" | "pdf" | "webp" | undefined;
|
|
160
|
-
scale?: number | undefined;
|
|
161
|
-
privacy?: "public" | "private" | undefined;
|
|
162
|
-
envVariables?: Record<string, string> | undefined;
|
|
163
177
|
chromiumOptions?: {
|
|
164
178
|
ignoreCertificateErrors?: boolean | undefined;
|
|
165
179
|
disableWebSecurity?: boolean | undefined;
|
|
@@ -170,19 +184,20 @@ export declare const CloudRunPayload: z.ZodDiscriminatedUnion<"type", [z.ZodObje
|
|
|
170
184
|
outName?: string | undefined;
|
|
171
185
|
}, {
|
|
172
186
|
serveUrl: string;
|
|
173
|
-
logLevel: "verbose" | "info" | "warn" | "error";
|
|
174
|
-
composition: string;
|
|
175
187
|
type: "still";
|
|
176
|
-
|
|
188
|
+
composition: string;
|
|
189
|
+
inputProps: Record<string, unknown>;
|
|
190
|
+
imageFormat: "png" | "jpeg" | "pdf" | "webp";
|
|
191
|
+
scale: number;
|
|
192
|
+
envVariables: Record<string, string>;
|
|
177
193
|
outputBucket: string;
|
|
194
|
+
privacy: "public" | "private";
|
|
195
|
+
logLevel: "error" | "verbose" | "info" | "warn";
|
|
196
|
+
delayRenderTimeoutInMilliseconds: number;
|
|
197
|
+
frame: number;
|
|
178
198
|
forceHeight?: number | null | undefined;
|
|
179
199
|
forceWidth?: number | null | undefined;
|
|
180
|
-
inputProps?: Record<string, unknown> | undefined;
|
|
181
200
|
jpegQuality?: number | undefined;
|
|
182
|
-
imageFormat?: "png" | "jpeg" | "pdf" | "webp" | undefined;
|
|
183
|
-
scale?: number | undefined;
|
|
184
|
-
privacy?: "public" | "private" | undefined;
|
|
185
|
-
envVariables?: Record<string, string> | undefined;
|
|
186
201
|
chromiumOptions?: {
|
|
187
202
|
ignoreCertificateErrors?: boolean | undefined;
|
|
188
203
|
disableWebSecurity?: boolean | undefined;
|
|
@@ -214,20 +229,20 @@ declare const renderStillOnCloudrunResponsePayload: z.ZodObject<{
|
|
|
214
229
|
status: z.ZodLiteral<"success">;
|
|
215
230
|
privacy: z.ZodEnum<["public-read", "project-private"]>;
|
|
216
231
|
}, "strip", z.ZodTypeAny, {
|
|
232
|
+
bucketName: string;
|
|
233
|
+
size: number;
|
|
234
|
+
status: "success";
|
|
217
235
|
privacy: "public-read" | "project-private";
|
|
218
236
|
cloudStorageUri: string;
|
|
219
|
-
size: number;
|
|
220
|
-
bucketName: string;
|
|
221
237
|
renderId: string;
|
|
222
|
-
status: "success";
|
|
223
238
|
publicUrl?: string | null | undefined;
|
|
224
239
|
}, {
|
|
240
|
+
bucketName: string;
|
|
241
|
+
size: number;
|
|
242
|
+
status: "success";
|
|
225
243
|
privacy: "public-read" | "project-private";
|
|
226
244
|
cloudStorageUri: string;
|
|
227
|
-
size: number;
|
|
228
|
-
bucketName: string;
|
|
229
245
|
renderId: string;
|
|
230
|
-
status: "success";
|
|
231
246
|
publicUrl?: string | null | undefined;
|
|
232
247
|
}>;
|
|
233
248
|
declare const renderMediaOnCloudrunResponsePayload: z.ZodObject<{
|
|
@@ -239,20 +254,20 @@ declare const renderMediaOnCloudrunResponsePayload: z.ZodObject<{
|
|
|
239
254
|
status: z.ZodLiteral<"success">;
|
|
240
255
|
privacy: z.ZodEnum<["public-read", "project-private"]>;
|
|
241
256
|
}, "strip", z.ZodTypeAny, {
|
|
257
|
+
bucketName: string;
|
|
258
|
+
size: number;
|
|
259
|
+
status: "success";
|
|
242
260
|
privacy: "public-read" | "project-private";
|
|
243
261
|
cloudStorageUri: string;
|
|
244
|
-
size: number;
|
|
245
|
-
bucketName: string;
|
|
246
262
|
renderId: string;
|
|
247
|
-
status: "success";
|
|
248
263
|
publicUrl?: string | null | undefined;
|
|
249
264
|
}, {
|
|
265
|
+
bucketName: string;
|
|
266
|
+
size: number;
|
|
267
|
+
status: "success";
|
|
250
268
|
privacy: "public-read" | "project-private";
|
|
251
269
|
cloudStorageUri: string;
|
|
252
|
-
size: number;
|
|
253
|
-
bucketName: string;
|
|
254
270
|
renderId: string;
|
|
255
|
-
status: "success";
|
|
256
271
|
publicUrl?: string | null | undefined;
|
|
257
272
|
}>;
|
|
258
273
|
export declare type CloudRunPayloadType = z.infer<typeof CloudRunPayload>;
|