@remotion/cloudrun 4.0.424 → 4.0.426
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/deploy-site.d.ts +1 -0
- package/dist/api/deploy-site.js +3 -2
- package/dist/api/render-media-on-cloudrun.d.ts +6 -2
- package/dist/api/render-media-on-cloudrun.js +6 -2
- package/dist/api/render-still-on-cloudrun.d.ts +7 -5
- package/dist/api/render-still-on-cloudrun.js +21 -17
- package/dist/cli/args.js +8 -1
- package/dist/cli/commands/render/index.js +40 -3
- package/dist/cli/commands/sites/create.js +3 -1
- package/dist/cli/commands/still.js +31 -3
- package/dist/functions/helpers/get-composition-from-body.d.ts +7 -3
- package/dist/functions/helpers/payloads.d.ts +138 -376
- package/dist/functions/helpers/payloads.js +10 -6
- package/dist/functions/render-media-single-thread.d.ts +7 -3
- package/dist/functions/render-media-single-thread.js +12 -10
- package/dist/functions/render-still-single-thread.d.ts +7 -3
- package/dist/functions/render-still-single-thread.js +5 -3
- package/dist/index.d.ts +13 -13
- package/package.json +8 -8
package/dist/api/deploy-site.js
CHANGED
|
@@ -13,7 +13,7 @@ const validate_site_name_1 = require("../shared/validate-site-name");
|
|
|
13
13
|
const get_cloud_storage_client_1 = require("./helpers/get-cloud-storage-client");
|
|
14
14
|
const upload_dir_1 = require("./upload-dir");
|
|
15
15
|
const internalDeploySiteRaw = async ({ entryPoint, bucketName, siteName, options, privacy, }) => {
|
|
16
|
-
var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k, _l;
|
|
16
|
+
var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k, _l, _m;
|
|
17
17
|
(0, validate_bucketname_1.validateBucketName)(bucketName, { mustStartWithRemotion: true });
|
|
18
18
|
(0, validate_site_name_1.validateSiteName)(siteName);
|
|
19
19
|
const cloudStorageClient = (0, get_cloud_storage_client_1.getCloudStorageClient)();
|
|
@@ -47,6 +47,7 @@ const internalDeploySiteRaw = async ({ entryPoint, bucketName, siteName, options
|
|
|
47
47
|
renderDefaults: null,
|
|
48
48
|
askAIEnabled: (_j = options === null || options === void 0 ? void 0 : options.askAIEnabled) !== null && _j !== void 0 ? _j : true,
|
|
49
49
|
keyboardShortcutsEnabled: (_k = options === null || options === void 0 ? void 0 : options.keyboardShortcutsEnabled) !== null && _k !== void 0 ? _k : true,
|
|
50
|
+
rspack: (_l = options === null || options === void 0 ? void 0 : options.rspack) !== null && _l !== void 0 ? _l : false,
|
|
50
51
|
}),
|
|
51
52
|
]);
|
|
52
53
|
const { toDelete, toUpload, existingCount } = await (0, get_storage_operations_1.getStorageDiffOperations)({
|
|
@@ -58,7 +59,7 @@ const internalDeploySiteRaw = async ({ entryPoint, bucketName, siteName, options
|
|
|
58
59
|
(0, upload_dir_1.uploadDir)({
|
|
59
60
|
bucket: bucketName,
|
|
60
61
|
localDir: bundled,
|
|
61
|
-
onProgress: (
|
|
62
|
+
onProgress: (_m = options === null || options === void 0 ? void 0 : options.onUploadProgress) !== null && _m !== void 0 ? _m : (() => undefined),
|
|
62
63
|
keyPrefix: subFolder,
|
|
63
64
|
toUpload,
|
|
64
65
|
privacy: privacy !== null && privacy !== void 0 ? privacy : 'public',
|
|
@@ -29,6 +29,8 @@ type InternalRenderMediaOnCloudrun = {
|
|
|
29
29
|
chromiumOptions: ChromiumOptions | undefined;
|
|
30
30
|
forceWidth: number | null;
|
|
31
31
|
forceHeight?: number | null;
|
|
32
|
+
forceFps?: number | null;
|
|
33
|
+
forceDurationInFrames?: number | null;
|
|
32
34
|
concurrency: number | string | null;
|
|
33
35
|
preferLossless: boolean | undefined;
|
|
34
36
|
indent: boolean;
|
|
@@ -64,6 +66,8 @@ export type RenderMediaOnCloudrunInput = {
|
|
|
64
66
|
chromiumOptions?: ChromiumOptions;
|
|
65
67
|
forceWidth?: number | null;
|
|
66
68
|
forceHeight?: number | null;
|
|
69
|
+
forceFps?: number | null;
|
|
70
|
+
forceDurationInFrames?: number | null;
|
|
67
71
|
concurrency?: number | string | null;
|
|
68
72
|
preferLossless?: boolean;
|
|
69
73
|
downloadBehavior?: DownloadBehavior;
|
|
@@ -71,7 +75,7 @@ export type RenderMediaOnCloudrunInput = {
|
|
|
71
75
|
renderIdOverride?: z.infer<typeof CloudRunPayload>['renderIdOverride'];
|
|
72
76
|
renderStatusWebhook?: z.infer<typeof CloudRunPayload>['renderStatusWebhook'];
|
|
73
77
|
} & Partial<ToOptions<typeof BrowserSafeApis.optionsMap.renderMediaOnCloudRun>>;
|
|
74
|
-
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, logLevel, delayRenderTimeoutInMilliseconds, concurrency, enforceAudioTrack, preferLossless, offthreadVideoCacheSizeInBytes, offthreadVideoThreads, colorSpace, downloadBehavior, metadata, mediaCacheSizeInBytes, }: 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, 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, }: InternalRenderMediaOnCloudrun) => Promise<{
|
|
75
79
|
type: "success";
|
|
76
80
|
publicUrl?: string | null | undefined;
|
|
77
81
|
cloudStorageUri: string;
|
|
@@ -87,7 +91,7 @@ export declare const internalRenderMediaOnCloudrun: ({ cloudRunUrl, serviceName,
|
|
|
87
91
|
requestCrashTime: string;
|
|
88
92
|
requestElapsedTimeInSeconds: number;
|
|
89
93
|
}>;
|
|
90
|
-
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, downloadBehavior, metadata, renderIdOverride, renderStatusWebhook, offthreadVideoThreads, mediaCacheSizeInBytes, }: 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, 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, }: RenderMediaOnCloudrunInput) => Promise<{
|
|
91
95
|
type: "success";
|
|
92
96
|
publicUrl?: string | null | undefined;
|
|
93
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, logLevel, delayRenderTimeoutInMilliseconds, concurrency, enforceAudioTrack, preferLossless, offthreadVideoCacheSizeInBytes, offthreadVideoThreads, colorSpace, downloadBehavior, metadata, mediaCacheSizeInBytes, }) => {
|
|
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, }) => {
|
|
15
15
|
const actualCodec = (0, validate_gcp_codec_1.validateCloudrunCodec)(codec);
|
|
16
16
|
(0, validate_serveurl_1.validateServeUrl)(serveUrl);
|
|
17
17
|
if (privacy)
|
|
@@ -54,6 +54,8 @@ const internalRenderMediaOnCloudrunRaw = async ({ cloudRunUrl, serviceName, regi
|
|
|
54
54
|
outName,
|
|
55
55
|
forceWidth,
|
|
56
56
|
forceHeight,
|
|
57
|
+
forceFps,
|
|
58
|
+
forceDurationInFrames,
|
|
57
59
|
type: 'media',
|
|
58
60
|
logLevel: logLevel !== null && logLevel !== void 0 ? logLevel : 'info',
|
|
59
61
|
delayRenderTimeoutInMilliseconds: delayRenderTimeoutInMilliseconds !== null && delayRenderTimeoutInMilliseconds !== void 0 ? delayRenderTimeoutInMilliseconds : null,
|
|
@@ -138,7 +140,7 @@ exports.internalRenderMediaOnCloudrun = (0, error_handling_1.wrapWithErrorHandli
|
|
|
138
140
|
* @description Initiates a media rendering process on the Remotion Cloud Run service, facilitating configurations like service region, project composition, and output settings.
|
|
139
141
|
* @see [Documentation](https://remotion.dev/docs/cloudrun/rendermediaoncloudrun)
|
|
140
142
|
*/
|
|
141
|
-
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, downloadBehavior, metadata, renderIdOverride, renderStatusWebhook, offthreadVideoThreads, mediaCacheSizeInBytes, }) => {
|
|
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, }) => {
|
|
142
144
|
return (0, exports.internalRenderMediaOnCloudrun)({
|
|
143
145
|
cloudRunUrl: cloudRunUrl !== null && cloudRunUrl !== void 0 ? cloudRunUrl : undefined,
|
|
144
146
|
serviceName: serviceName !== null && serviceName !== void 0 ? serviceName : undefined,
|
|
@@ -171,6 +173,8 @@ const renderMediaOnCloudrun = ({ cloudRunUrl, serviceName, region, serveUrl, com
|
|
|
171
173
|
muted: muted !== null && muted !== void 0 ? muted : false,
|
|
172
174
|
forceWidth: forceWidth !== null && forceWidth !== void 0 ? forceWidth : null,
|
|
173
175
|
forceHeight: forceHeight !== null && forceHeight !== void 0 ? forceHeight : null,
|
|
176
|
+
forceFps: forceFps !== null && forceFps !== void 0 ? forceFps : null,
|
|
177
|
+
forceDurationInFrames: forceDurationInFrames !== null && forceDurationInFrames !== void 0 ? forceDurationInFrames : null,
|
|
174
178
|
logLevel: logLevel !== null && logLevel !== void 0 ? logLevel : 'info',
|
|
175
179
|
delayRenderTimeoutInMilliseconds: delayRenderTimeoutInMilliseconds !== null && delayRenderTimeoutInMilliseconds !== void 0 ? delayRenderTimeoutInMilliseconds : client_1.BrowserSafeApis.DEFAULT_TIMEOUT,
|
|
176
180
|
concurrency: concurrency !== null && concurrency !== void 0 ? concurrency : null,
|
|
@@ -22,6 +22,8 @@ type OptionalParameters = {
|
|
|
22
22
|
chromiumOptions: ChromiumOptions;
|
|
23
23
|
forceWidth: number | null;
|
|
24
24
|
forceHeight: number | null;
|
|
25
|
+
forceFps: number | null;
|
|
26
|
+
forceDurationInFrames: number | null;
|
|
25
27
|
indent: boolean;
|
|
26
28
|
downloadBehavior: DownloadBehavior;
|
|
27
29
|
renderIdOverride: z.infer<typeof CloudRunPayload>['renderIdOverride'];
|
|
@@ -29,11 +31,6 @@ type OptionalParameters = {
|
|
|
29
31
|
} & ToOptions<typeof BrowserSafeApis.optionsMap.renderStillOnCloudRun>;
|
|
30
32
|
export type RenderStillOnCloudrunInput = Partial<OptionalParameters> & MandatoryParameters;
|
|
31
33
|
export declare const renderStillOnCloudrun: (options: RenderStillOnCloudrunInput) => Promise<{
|
|
32
|
-
type: "error";
|
|
33
|
-
message: string;
|
|
34
|
-
name: string;
|
|
35
|
-
stack: string;
|
|
36
|
-
} | {
|
|
37
34
|
type: "success";
|
|
38
35
|
publicUrl?: string | null | undefined;
|
|
39
36
|
cloudStorageUri: string;
|
|
@@ -41,6 +38,11 @@ export declare const renderStillOnCloudrun: (options: RenderStillOnCloudrunInput
|
|
|
41
38
|
bucketName: string;
|
|
42
39
|
renderId: string;
|
|
43
40
|
privacy: "project-private" | "public-read";
|
|
41
|
+
} | {
|
|
42
|
+
type: "error";
|
|
43
|
+
message: string;
|
|
44
|
+
name: string;
|
|
45
|
+
stack: string;
|
|
44
46
|
} | {
|
|
45
47
|
type: "crash";
|
|
46
48
|
cloudRunEndpoint: string;
|
|
@@ -35,7 +35,7 @@ const get_cloudrun_endpoint_1 = require("./helpers/get-cloudrun-endpoint");
|
|
|
35
35
|
* @param params.metadata Metadata to be attached to the output file.
|
|
36
36
|
* @returns {Promise<RenderStillOnCloudrunOutput>} See documentation for detailed structure
|
|
37
37
|
*/
|
|
38
|
-
const internalRenderStillOnCloudRun = async ({ cloudRunUrl, serviceName, region, serveUrl, composition, inputProps, forceBucketName, privacy, outName, imageFormat, envVariables, frame, jpegQuality, chromiumOptions, scale, forceWidth, forceHeight, logLevel, delayRenderTimeoutInMilliseconds, offthreadVideoCacheSizeInBytes, offthreadVideoThreads, downloadBehavior, renderIdOverride, renderStatusWebhook, mediaCacheSizeInBytes, }) => {
|
|
38
|
+
const internalRenderStillOnCloudRun = async ({ cloudRunUrl, serviceName, region, serveUrl, composition, inputProps, forceBucketName, privacy, outName, imageFormat, envVariables, frame, jpegQuality, chromiumOptions, scale, forceWidth, forceHeight, forceFps, forceDurationInFrames, logLevel, delayRenderTimeoutInMilliseconds, offthreadVideoCacheSizeInBytes, offthreadVideoThreads, downloadBehavior, renderIdOverride, renderStatusWebhook, mediaCacheSizeInBytes, }) => {
|
|
39
39
|
(0, validate_serveurl_1.validateServeUrl)(serveUrl);
|
|
40
40
|
if (privacy)
|
|
41
41
|
(0, validate_privacy_1.validatePrivacy)(privacy);
|
|
@@ -63,6 +63,8 @@ const internalRenderStillOnCloudRun = async ({ cloudRunUrl, serviceName, region,
|
|
|
63
63
|
scale,
|
|
64
64
|
forceWidth,
|
|
65
65
|
forceHeight,
|
|
66
|
+
forceFps,
|
|
67
|
+
forceDurationInFrames,
|
|
66
68
|
frame,
|
|
67
69
|
type: 'still',
|
|
68
70
|
logLevel,
|
|
@@ -133,7 +135,7 @@ const internalRenderStillOnCloudRun = async ({ cloudRunUrl, serviceName, region,
|
|
|
133
135
|
};
|
|
134
136
|
const errorHandled = (0, error_handling_1.wrapWithErrorHandling)(internalRenderStillOnCloudRun);
|
|
135
137
|
const renderStillOnCloudrun = (options) => {
|
|
136
|
-
var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k, _l, _m, _o, _p, _q, _r, _s, _t, _u, _v, _w, _x;
|
|
138
|
+
var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k, _l, _m, _o, _p, _q, _r, _s, _t, _u, _v, _w, _x, _y, _z;
|
|
137
139
|
return errorHandled({
|
|
138
140
|
chromiumOptions: (_a = options.chromiumOptions) !== null && _a !== void 0 ? _a : {},
|
|
139
141
|
cloudRunUrl: (_b = options.cloudRunUrl) !== null && _b !== void 0 ? _b : null,
|
|
@@ -143,24 +145,26 @@ const renderStillOnCloudrun = (options) => {
|
|
|
143
145
|
forceBucketName: (_e = options.forceBucketName) !== null && _e !== void 0 ? _e : null,
|
|
144
146
|
forceHeight: (_f = options.forceHeight) !== null && _f !== void 0 ? _f : null,
|
|
145
147
|
forceWidth: (_g = options.forceWidth) !== null && _g !== void 0 ? _g : null,
|
|
146
|
-
|
|
148
|
+
forceFps: (_h = options.forceFps) !== null && _h !== void 0 ? _h : null,
|
|
149
|
+
forceDurationInFrames: (_j = options.forceDurationInFrames) !== null && _j !== void 0 ? _j : null,
|
|
150
|
+
frame: (_k = options.frame) !== null && _k !== void 0 ? _k : 0,
|
|
147
151
|
imageFormat: options.imageFormat,
|
|
148
|
-
indent: (
|
|
149
|
-
inputProps: (
|
|
150
|
-
jpegQuality: (
|
|
151
|
-
logLevel: (
|
|
152
|
-
offthreadVideoCacheSizeInBytes: (
|
|
153
|
-
offthreadVideoThreads: (
|
|
154
|
-
outName: (
|
|
155
|
-
privacy: (
|
|
152
|
+
indent: (_l = options.indent) !== null && _l !== void 0 ? _l : false,
|
|
153
|
+
inputProps: (_m = options.inputProps) !== null && _m !== void 0 ? _m : {},
|
|
154
|
+
jpegQuality: (_o = options.jpegQuality) !== null && _o !== void 0 ? _o : client_1.BrowserSafeApis.DEFAULT_JPEG_QUALITY,
|
|
155
|
+
logLevel: (_p = options.logLevel) !== null && _p !== void 0 ? _p : 'info',
|
|
156
|
+
offthreadVideoCacheSizeInBytes: (_q = options.offthreadVideoCacheSizeInBytes) !== null && _q !== void 0 ? _q : null,
|
|
157
|
+
offthreadVideoThreads: (_r = options.offthreadVideoThreads) !== null && _r !== void 0 ? _r : null,
|
|
158
|
+
outName: (_s = options.outName) !== null && _s !== void 0 ? _s : null,
|
|
159
|
+
privacy: (_t = options.privacy) !== null && _t !== void 0 ? _t : 'public',
|
|
156
160
|
region: options.region,
|
|
157
|
-
scale: (
|
|
161
|
+
scale: (_u = options.scale) !== null && _u !== void 0 ? _u : 1,
|
|
158
162
|
serveUrl: options.serveUrl,
|
|
159
|
-
serviceName: (
|
|
160
|
-
downloadBehavior: (
|
|
161
|
-
renderIdOverride: (
|
|
162
|
-
renderStatusWebhook: (
|
|
163
|
-
mediaCacheSizeInBytes: (
|
|
163
|
+
serviceName: (_v = options.serviceName) !== null && _v !== void 0 ? _v : null,
|
|
164
|
+
downloadBehavior: (_w = options.downloadBehavior) !== null && _w !== void 0 ? _w : { type: 'play-in-browser' },
|
|
165
|
+
renderIdOverride: (_x = options.renderIdOverride) !== null && _x !== void 0 ? _x : undefined,
|
|
166
|
+
renderStatusWebhook: (_y = options.renderStatusWebhook) !== null && _y !== void 0 ? _y : undefined,
|
|
167
|
+
mediaCacheSizeInBytes: (_z = options.mediaCacheSizeInBytes) !== null && _z !== void 0 ? _z : null,
|
|
164
168
|
});
|
|
165
169
|
};
|
|
166
170
|
exports.renderStillOnCloudrun = renderStillOnCloudrun;
|
package/dist/cli/args.js
CHANGED
|
@@ -2,8 +2,15 @@
|
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
3
|
exports.forceFlagProvided = exports.parsedCloudrunCli = void 0;
|
|
4
4
|
const cli_1 = require("@remotion/cli");
|
|
5
|
+
const CloudrunBooleanFlags = [
|
|
6
|
+
...cli_1.CliInternals.BooleanFlags,
|
|
7
|
+
'force',
|
|
8
|
+
'yes',
|
|
9
|
+
'y',
|
|
10
|
+
'onlyAllocateCpuDuringRequestProcessing',
|
|
11
|
+
];
|
|
5
12
|
exports.parsedCloudrunCli = cli_1.CliInternals.minimist(process.argv.slice(2), {
|
|
6
|
-
boolean:
|
|
13
|
+
boolean: CloudrunBooleanFlags,
|
|
7
14
|
string: ['_'],
|
|
8
15
|
});
|
|
9
16
|
exports.forceFlagProvided = exports.parsedCloudrunCli.f ||
|
|
@@ -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, } = client_1.BrowserSafeApis.options;
|
|
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, } = 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);
|
|
@@ -33,11 +33,44 @@ const renderCommand = async (args, remotionRoot, logLevel) => {
|
|
|
33
33
|
const audioCodec = client_1.BrowserSafeApis.options.audioCodecOption.getValue({
|
|
34
34
|
commandLine: cli_1.CliInternals.parsedCli,
|
|
35
35
|
}).value;
|
|
36
|
-
const { envVariables, frameRange, inputProps
|
|
36
|
+
const { envVariables, frameRange, inputProps } = cli_1.CliInternals.getCliOptions({
|
|
37
37
|
isStill: false,
|
|
38
38
|
logLevel,
|
|
39
39
|
indent: false,
|
|
40
40
|
});
|
|
41
|
+
const height = overrideHeightOption.getValue({
|
|
42
|
+
commandLine: cli_1.CliInternals.parsedCli,
|
|
43
|
+
}).value;
|
|
44
|
+
const width = overrideWidthOption.getValue({
|
|
45
|
+
commandLine: cli_1.CliInternals.parsedCli,
|
|
46
|
+
}).value;
|
|
47
|
+
const fps = overrideFpsOption.getValue({
|
|
48
|
+
commandLine: cli_1.CliInternals.parsedCli,
|
|
49
|
+
}).value;
|
|
50
|
+
const durationInFrames = overrideDurationOption.getValue({
|
|
51
|
+
commandLine: cli_1.CliInternals.parsedCli,
|
|
52
|
+
}).value;
|
|
53
|
+
const pixelFormat = pixelFormatOption.getValue({
|
|
54
|
+
commandLine: cli_1.CliInternals.parsedCli,
|
|
55
|
+
}).value;
|
|
56
|
+
const browserExecutable = browserExecutableOption.getValue({
|
|
57
|
+
commandLine: cli_1.CliInternals.parsedCli,
|
|
58
|
+
}).value;
|
|
59
|
+
const everyNthFrame = everyNthFrameOption.getValue({
|
|
60
|
+
commandLine: cli_1.CliInternals.parsedCli,
|
|
61
|
+
}).value;
|
|
62
|
+
const proResProfile = proResProfileOption.getValue({
|
|
63
|
+
commandLine: cli_1.CliInternals.parsedCli,
|
|
64
|
+
}).value;
|
|
65
|
+
const userAgent = userAgentOption.getValue({
|
|
66
|
+
commandLine: cli_1.CliInternals.parsedCli,
|
|
67
|
+
}).value;
|
|
68
|
+
const disableWebSecurity = disableWebSecurityOption.getValue({
|
|
69
|
+
commandLine: cli_1.CliInternals.parsedCli,
|
|
70
|
+
}).value;
|
|
71
|
+
const ignoreCertificateErrors = ignoreCertificateErrorsOption.getValue({
|
|
72
|
+
commandLine: cli_1.CliInternals.parsedCli,
|
|
73
|
+
}).value;
|
|
41
74
|
const offthreadVideoCacheSizeInBytes = offthreadVideoCacheSizeInBytesOption.getValue({
|
|
42
75
|
commandLine: cli_1.CliInternals.parsedCli,
|
|
43
76
|
}).value;
|
|
@@ -98,13 +131,15 @@ const renderCommand = async (args, remotionRoot, logLevel) => {
|
|
|
98
131
|
chromiumOptions,
|
|
99
132
|
envVariables,
|
|
100
133
|
height,
|
|
134
|
+
width,
|
|
135
|
+
fps,
|
|
136
|
+
durationInFrames,
|
|
101
137
|
indent,
|
|
102
138
|
port: config_1.ConfigInternals.getRendererPortFromConfigFileAndCliFlag(),
|
|
103
139
|
puppeteerInstance: undefined,
|
|
104
140
|
serveUrlOrWebpackUrl: serveUrl,
|
|
105
141
|
timeoutInMilliseconds: puppeteerTimeout,
|
|
106
142
|
logLevel,
|
|
107
|
-
width,
|
|
108
143
|
server: await server,
|
|
109
144
|
serializedInputPropsWithCustomSchema: no_react_1.NoReactInternals.serializeJSONWithSpecialTypes({
|
|
110
145
|
data: inputProps,
|
|
@@ -242,6 +277,8 @@ ${downloadName ? ` Downloaded File = ${downloadName}` : ''}
|
|
|
242
277
|
muted,
|
|
243
278
|
forceWidth: width,
|
|
244
279
|
forceHeight: height,
|
|
280
|
+
forceFps: fps,
|
|
281
|
+
forceDurationInFrames: durationInFrames,
|
|
245
282
|
logLevel,
|
|
246
283
|
delayRenderTimeoutInMilliseconds: puppeteerTimeout,
|
|
247
284
|
// Special case: Should not use default local concurrency, or from
|
|
@@ -129,7 +129,9 @@ const sitesCreateSubcommand = async (args, remotionRoot, logLevel) => {
|
|
|
129
129
|
};
|
|
130
130
|
updateProgress(false);
|
|
131
131
|
},
|
|
132
|
-
enableCaching:
|
|
132
|
+
enableCaching: client_1.BrowserSafeApis.options.bundleCacheOption.getValue({
|
|
133
|
+
commandLine: cli_1.CliInternals.parsedCli,
|
|
134
|
+
}).value,
|
|
133
135
|
webpackOverride: (_b = config_1.ConfigInternals.getWebpackOverrideFn()) !== null && _b !== void 0 ? _b : ((f) => f),
|
|
134
136
|
gitSource,
|
|
135
137
|
bypassBucketNameValidation: true,
|
|
@@ -13,14 +13,38 @@ const cloudrun_crash_logs_1 = require("../helpers/cloudrun-crash-logs");
|
|
|
13
13
|
const log_1 = require("../log");
|
|
14
14
|
const renderArgsCheck_1 = require("./render/helpers/renderArgsCheck");
|
|
15
15
|
exports.STILL_COMMAND = 'still';
|
|
16
|
-
const { offthreadVideoCacheSizeInBytesOption, scaleOption, jpegQualityOption, enableMultiprocessOnLinuxOption, glOption, delayRenderTimeoutInMillisecondsOption, headlessOption, binariesDirectoryOption, mediaCacheSizeInBytesOption, darkModeOption, } = client_1.BrowserSafeApis.options;
|
|
16
|
+
const { offthreadVideoCacheSizeInBytesOption, scaleOption, jpegQualityOption, enableMultiprocessOnLinuxOption, glOption, delayRenderTimeoutInMillisecondsOption, headlessOption, binariesDirectoryOption, mediaCacheSizeInBytesOption, darkModeOption, browserExecutableOption, userAgentOption, disableWebSecurityOption, ignoreCertificateErrorsOption, overrideHeightOption, overrideWidthOption, overrideFpsOption, overrideDurationOption, } = client_1.BrowserSafeApis.options;
|
|
17
17
|
const stillCommand = async (args, remotionRoot, logLevel) => {
|
|
18
18
|
const { serveUrl, cloudRunUrl, outName, forceBucketName, privacy, downloadName, region, } = await (0, renderArgsCheck_1.renderArgsCheck)(exports.STILL_COMMAND, args, logLevel);
|
|
19
|
-
const { envVariables, inputProps, stillFrame
|
|
20
|
-
isStill:
|
|
19
|
+
const { envVariables, inputProps, stillFrame } = cli_1.CliInternals.getCliOptions({
|
|
20
|
+
isStill: true,
|
|
21
21
|
logLevel,
|
|
22
22
|
indent: false,
|
|
23
23
|
});
|
|
24
|
+
const height = overrideHeightOption.getValue({
|
|
25
|
+
commandLine: cli_1.CliInternals.parsedCli,
|
|
26
|
+
}).value;
|
|
27
|
+
const width = overrideWidthOption.getValue({
|
|
28
|
+
commandLine: cli_1.CliInternals.parsedCli,
|
|
29
|
+
}).value;
|
|
30
|
+
const fps = overrideFpsOption.getValue({
|
|
31
|
+
commandLine: cli_1.CliInternals.parsedCli,
|
|
32
|
+
}).value;
|
|
33
|
+
const durationInFrames = overrideDurationOption.getValue({
|
|
34
|
+
commandLine: cli_1.CliInternals.parsedCli,
|
|
35
|
+
}).value;
|
|
36
|
+
const browserExecutable = browserExecutableOption.getValue({
|
|
37
|
+
commandLine: cli_1.CliInternals.parsedCli,
|
|
38
|
+
}).value;
|
|
39
|
+
const userAgent = userAgentOption.getValue({
|
|
40
|
+
commandLine: cli_1.CliInternals.parsedCli,
|
|
41
|
+
}).value;
|
|
42
|
+
const disableWebSecurity = disableWebSecurityOption.getValue({
|
|
43
|
+
commandLine: cli_1.CliInternals.parsedCli,
|
|
44
|
+
}).value;
|
|
45
|
+
const ignoreCertificateErrors = ignoreCertificateErrorsOption.getValue({
|
|
46
|
+
commandLine: cli_1.CliInternals.parsedCli,
|
|
47
|
+
}).value;
|
|
24
48
|
let composition = args[1];
|
|
25
49
|
const enableMultiProcessOnLinux = enableMultiprocessOnLinuxOption.getValue({
|
|
26
50
|
commandLine: cli_1.CliInternals.parsedCli,
|
|
@@ -90,6 +114,8 @@ const stillCommand = async (args, remotionRoot, logLevel) => {
|
|
|
90
114
|
timeoutInMilliseconds: puppeteerTimeout,
|
|
91
115
|
height,
|
|
92
116
|
width,
|
|
117
|
+
fps,
|
|
118
|
+
durationInFrames,
|
|
93
119
|
server: await server,
|
|
94
120
|
offthreadVideoCacheSizeInBytes,
|
|
95
121
|
binariesDirectory,
|
|
@@ -163,6 +189,8 @@ ${downloadName ? ` Downloaded File = ${downloadName}` : ''}
|
|
|
163
189
|
scale,
|
|
164
190
|
forceHeight: height,
|
|
165
191
|
forceWidth: width,
|
|
192
|
+
forceFps: fps,
|
|
193
|
+
forceDurationInFrames: durationInFrames,
|
|
166
194
|
forceBucketName,
|
|
167
195
|
outName,
|
|
168
196
|
logLevel,
|
|
@@ -4,6 +4,8 @@ export declare const getCompositionFromBody: (body: {
|
|
|
4
4
|
composition: string;
|
|
5
5
|
forceHeight?: number | null | undefined;
|
|
6
6
|
forceWidth?: number | null | undefined;
|
|
7
|
+
forceFps?: number | null | undefined;
|
|
8
|
+
forceDurationInFrames?: number | null | undefined;
|
|
7
9
|
codec: "aac" | "gif" | "h264" | "h264-mkv" | "h264-ts" | "h265" | "mp3" | "prores" | "vp8" | "vp9" | "wav";
|
|
8
10
|
serializedInputPropsWithCustomSchema: string;
|
|
9
11
|
jpegQuality: number | null;
|
|
@@ -20,7 +22,7 @@ export declare const getCompositionFromBody: (body: {
|
|
|
20
22
|
x264Preset: "fast" | "faster" | "medium" | "placebo" | "slow" | "slower" | "superfast" | "ultrafast" | "veryfast" | "veryslow" | null;
|
|
21
23
|
everyNthFrame: number;
|
|
22
24
|
numberOfGifLoops: number | null;
|
|
23
|
-
frameRange:
|
|
25
|
+
frameRange: number | [number, number | null] | null;
|
|
24
26
|
envVariables: Record<string, string>;
|
|
25
27
|
chromiumOptions?: {
|
|
26
28
|
ignoreCertificateErrors?: boolean | undefined;
|
|
@@ -55,7 +57,7 @@ export declare const getCompositionFromBody: (body: {
|
|
|
55
57
|
renderStatusWebhook?: {
|
|
56
58
|
url: string;
|
|
57
59
|
headers: Record<string, string>;
|
|
58
|
-
data
|
|
60
|
+
data: any;
|
|
59
61
|
webhookProgressInterval?: number | null | undefined;
|
|
60
62
|
} | null | undefined;
|
|
61
63
|
} | {
|
|
@@ -64,6 +66,8 @@ export declare const getCompositionFromBody: (body: {
|
|
|
64
66
|
composition: string;
|
|
65
67
|
forceHeight?: number | null | undefined;
|
|
66
68
|
forceWidth?: number | null | undefined;
|
|
69
|
+
forceFps?: number | null | undefined;
|
|
70
|
+
forceDurationInFrames?: number | null | undefined;
|
|
67
71
|
serializedInputPropsWithCustomSchema: string;
|
|
68
72
|
jpegQuality?: number | undefined;
|
|
69
73
|
imageFormat: "jpeg" | "pdf" | "png" | "webp";
|
|
@@ -98,7 +102,7 @@ export declare const getCompositionFromBody: (body: {
|
|
|
98
102
|
renderStatusWebhook?: {
|
|
99
103
|
url: string;
|
|
100
104
|
headers: Record<string, string>;
|
|
101
|
-
data
|
|
105
|
+
data: any;
|
|
102
106
|
webhookProgressInterval?: number | null | undefined;
|
|
103
107
|
} | null | undefined;
|
|
104
108
|
}) => Promise<import("remotion").VideoConfig>;
|