@remotion/cloudrun 4.1.0-alpha3 → 4.1.0-alpha5
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/get-composition-from-body.d.ts +2 -1
- package/dist/functions/helpers/get-composition-from-body.js +20 -6
- 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 +23 -6
- package/dist/functions/render-still-single-thread.js +16 -6
- package/package.json +7 -8
- package/tsconfig.tsbuildinfo +1 -1
- package/dist/cli/commands/render/renderMedia.d.ts +0 -2
- package/dist/cli/commands/render/renderMedia.js +0 -156
- package/dist/cli/commands/render/renderStill.d.ts +0 -2
- package/dist/cli/commands/render/renderStill.js +0 -123
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
|
};
|
|
@@ -1 +1,2 @@
|
|
|
1
|
-
|
|
1
|
+
import type { CloudRunPayloadType } from './payloads';
|
|
2
|
+
export declare const getCompositionFromBody: (body: CloudRunPayloadType) => Promise<import("remotion").VideoConfig>;
|
|
@@ -2,12 +2,26 @@
|
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
3
|
exports.getCompositionFromBody = void 0;
|
|
4
4
|
const renderer_1 = require("@remotion/renderer");
|
|
5
|
-
const getCompositionFromBody = async (
|
|
6
|
-
|
|
7
|
-
const
|
|
8
|
-
|
|
9
|
-
|
|
5
|
+
const getCompositionFromBody = async (body) => {
|
|
6
|
+
var _a, _b, _c;
|
|
7
|
+
const { metadata, propsSize } = await renderer_1.RenderInternals.internalSelectComposition({
|
|
8
|
+
serveUrl: body.serveUrl,
|
|
9
|
+
browserExecutable: null,
|
|
10
|
+
chromiumOptions: (_a = body.chromiumOptions) !== null && _a !== void 0 ? _a : {},
|
|
11
|
+
envVariables: (_b = body.envVariables) !== null && _b !== void 0 ? _b : {},
|
|
12
|
+
id: body.composition,
|
|
13
|
+
indent: false,
|
|
14
|
+
inputProps: (_c = body.inputProps) !== null && _c !== void 0 ? _c : {},
|
|
15
|
+
logLevel: body.logLevel,
|
|
16
|
+
onBrowserLog: () => null,
|
|
17
|
+
port: null,
|
|
18
|
+
puppeteerInstance: undefined,
|
|
19
|
+
server: undefined,
|
|
20
|
+
timeoutInMilliseconds: body.delayRenderTimeoutInMilliseconds,
|
|
21
|
+
});
|
|
22
|
+
if (propsSize > 10000000) {
|
|
23
|
+
renderer_1.RenderInternals.Log.warn(`The props of your composition are large (${propsSize} bytes). This may cause slowdown.`);
|
|
10
24
|
}
|
|
11
|
-
|
|
25
|
+
return metadata;
|
|
12
26
|
};
|
|
13
27
|
exports.getCompositionFromBody = getCompositionFromBody;
|