@remotion/cloudrun 4.0.267 → 4.0.269

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.
@@ -1,6 +1,5 @@
1
1
 
2
2
  
3
- > @remotion/cloudrun@4.0.267 make /Users/jonathanburger/remotion/packages/cloudrun
4
- > tsc -d && bun build.ts
3
+ > @remotion/cloudrun@4.0.269 make /Users/jonathanburger/remotion/packages/cloudrun
4
+ > tsc -d && cp src/shared/sa-permissions.json dist/shared/sa-permissions.json
5
5
 
6
- [4.87ms] Made reproducible build with gtar
package/build.ts CHANGED
@@ -1,11 +1,5 @@
1
- import {$} from 'bun';
2
1
  import {bundleInstaller} from './src/admin/bundle-installer';
3
2
  import {bundleRenderLogic} from './src/admin/bundle-renderLogic';
4
3
 
5
- await $`bun x tsc -d`;
6
-
7
- const permissions = Bun.file('src/shared/sa-permissions.json');
8
- await Bun.write('dist/shared/sa-permissions.json', permissions);
9
-
10
4
  await bundleRenderLogic();
11
5
  await bundleInstaller();
@@ -17,7 +17,7 @@ const bundleRenderLogic = async () => {
17
17
  const outfile = path_1.default.join(outdir, 'index.js');
18
18
  ((_a = fs_1.default.rmSync) !== null && _a !== void 0 ? _a : fs_1.default.rmdirSync)(outdir, { recursive: true });
19
19
  fs_1.default.mkdirSync(outdir, { recursive: true });
20
- const template = require.resolve(path_1.default.join(__dirname, '../functions/index'));
20
+ const template = require.resolve(path_1.default.join(__dirname, '../../dist/functions/index'));
21
21
  await bundler_1.BundlerInternals.esbuild.build({
22
22
  platform: 'node',
23
23
  target: 'node18',
@@ -1,5 +1,5 @@
1
- import type { AudioCodec, ChromiumOptions, FrameRange, LogLevel, PixelFormat, ProResProfile, ToOptions, VideoImageFormat } from '@remotion/renderer';
2
- import type { BrowserSafeApis } from '@remotion/renderer/client';
1
+ import { type AudioCodec, type ChromiumOptions, type FrameRange, type LogLevel, type PixelFormat, type ProResProfile, type ToOptions, type VideoImageFormat } from '@remotion/renderer';
2
+ import { BrowserSafeApis } from '@remotion/renderer/client';
3
3
  import type { z } from 'zod';
4
4
  import type { CloudRunCrashResponse, CloudRunPayload, DownloadBehavior, RenderMediaOnCloudrunOutput } from '../functions/helpers/payloads';
5
5
  import type { GcpRegion } from '../pricing/gcp-regions';
@@ -35,7 +35,7 @@ type InternalRenderMediaOnCloudrun = {
35
35
  metadata?: Record<string, string> | null;
36
36
  renderIdOverride: z.infer<typeof CloudRunPayload>['renderIdOverride'];
37
37
  renderStatusWebhook: z.infer<typeof CloudRunPayload>['renderStatusWebhook'];
38
- } & Partial<ToOptions<typeof BrowserSafeApis.optionsMap.renderMediaOnCloudRun>>;
38
+ } & ToOptions<typeof BrowserSafeApis.optionsMap.renderMediaOnCloudRun>;
39
39
  export type RenderMediaOnCloudrunInput = {
40
40
  region: GcpRegion;
41
41
  serveUrl: string;
@@ -70,5 +70,5 @@ export type RenderMediaOnCloudrunInput = {
70
70
  } & Partial<ToOptions<typeof BrowserSafeApis.optionsMap.renderMediaOnCloudRun>>;
71
71
  declare const internalRenderMediaOnCloudrunRaw: ({ 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, }: InternalRenderMediaOnCloudrun) => Promise<RenderMediaOnCloudrunOutput | CloudRunCrashResponse>;
72
72
  export declare const internalRenderMediaOnCloudrun: typeof internalRenderMediaOnCloudrunRaw;
73
- 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, }: RenderMediaOnCloudrunInput) => Promise<RenderMediaOnCloudrunOutput | CloudRunCrashResponse>;
73
+ 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, }: RenderMediaOnCloudrunInput) => Promise<RenderMediaOnCloudrunOutput | CloudRunCrashResponse>;
74
74
  export {};
@@ -1,6 +1,7 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
3
  exports.renderMediaOnCloudrun = exports.internalRenderMediaOnCloudrun = void 0;
4
+ const client_1 = require("@remotion/renderer/client");
4
5
  const error_handling_1 = require("@remotion/renderer/error-handling");
5
6
  const no_react_1 = require("remotion/no-react");
6
7
  const version_1 = require("remotion/version");
@@ -136,7 +137,7 @@ exports.internalRenderMediaOnCloudrun = (0, error_handling_1.wrapWithErrorHandli
136
137
  * @description Initiates a media rendering process on the Remotion Cloud Run service, facilitating configurations like service region, project composition, and output settings.
137
138
  * @see [Documentation](https://remotion.dev/docs/cloudrun/rendermediaoncloudrun)
138
139
  */
139
- 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, }) => {
140
+ 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, }) => {
140
141
  return (0, exports.internalRenderMediaOnCloudrun)({
141
142
  cloudRunUrl: cloudRunUrl !== null && cloudRunUrl !== void 0 ? cloudRunUrl : undefined,
142
143
  serviceName: serviceName !== null && serviceName !== void 0 ? serviceName : undefined,
@@ -149,33 +150,33 @@ const renderMediaOnCloudrun = ({ cloudRunUrl, serviceName, region, serveUrl, com
149
150
  privacy: privacy !== null && privacy !== void 0 ? privacy : undefined,
150
151
  outName: outName !== null && outName !== void 0 ? outName : undefined,
151
152
  updateRenderProgress: updateRenderProgress !== null && updateRenderProgress !== void 0 ? updateRenderProgress : undefined,
152
- jpegQuality: jpegQuality !== null && jpegQuality !== void 0 ? jpegQuality : undefined,
153
+ jpegQuality: jpegQuality !== null && jpegQuality !== void 0 ? jpegQuality : 80,
153
154
  audioCodec: audioCodec !== null && audioCodec !== void 0 ? audioCodec : undefined,
154
155
  audioBitrate: audioBitrate !== null && audioBitrate !== void 0 ? audioBitrate : null,
155
156
  videoBitrate: videoBitrate !== null && videoBitrate !== void 0 ? videoBitrate : null,
156
157
  encodingMaxRate: encodingMaxRate !== null && encodingMaxRate !== void 0 ? encodingMaxRate : null,
157
158
  encodingBufferSize: encodingBufferSize !== null && encodingBufferSize !== void 0 ? encodingBufferSize : null,
158
159
  proResProfile: proResProfile !== null && proResProfile !== void 0 ? proResProfile : undefined,
159
- x264Preset: x264Preset !== null && x264Preset !== void 0 ? x264Preset : undefined,
160
+ x264Preset: x264Preset !== null && x264Preset !== void 0 ? x264Preset : null,
160
161
  crf: crf !== null && crf !== void 0 ? crf : undefined,
161
162
  pixelFormat: pixelFormat !== null && pixelFormat !== void 0 ? pixelFormat : undefined,
162
163
  imageFormat: imageFormat !== null && imageFormat !== void 0 ? imageFormat : undefined,
163
- scale: scale !== null && scale !== void 0 ? scale : undefined,
164
+ scale: scale !== null && scale !== void 0 ? scale : 1,
164
165
  everyNthFrame: everyNthFrame !== null && everyNthFrame !== void 0 ? everyNthFrame : undefined,
165
166
  numberOfGifLoops: numberOfGifLoops !== null && numberOfGifLoops !== void 0 ? numberOfGifLoops : null,
166
167
  frameRange: frameRange !== null && frameRange !== void 0 ? frameRange : undefined,
167
168
  envVariables: envVariables !== null && envVariables !== void 0 ? envVariables : undefined,
168
169
  chromiumOptions: chromiumOptions !== null && chromiumOptions !== void 0 ? chromiumOptions : undefined,
169
- muted: muted !== null && muted !== void 0 ? muted : undefined,
170
+ muted: muted !== null && muted !== void 0 ? muted : false,
170
171
  forceWidth: forceWidth !== null && forceWidth !== void 0 ? forceWidth : null,
171
172
  forceHeight: forceHeight !== null && forceHeight !== void 0 ? forceHeight : null,
172
173
  logLevel: logLevel !== null && logLevel !== void 0 ? logLevel : 'info',
173
- delayRenderTimeoutInMilliseconds: delayRenderTimeoutInMilliseconds !== null && delayRenderTimeoutInMilliseconds !== void 0 ? delayRenderTimeoutInMilliseconds : undefined,
174
+ delayRenderTimeoutInMilliseconds: delayRenderTimeoutInMilliseconds !== null && delayRenderTimeoutInMilliseconds !== void 0 ? delayRenderTimeoutInMilliseconds : client_1.BrowserSafeApis.DEFAULT_TIMEOUT,
174
175
  concurrency: concurrency !== null && concurrency !== void 0 ? concurrency : null,
175
- enforceAudioTrack: enforceAudioTrack !== null && enforceAudioTrack !== void 0 ? enforceAudioTrack : undefined,
176
- preferLossless: preferLossless !== null && preferLossless !== void 0 ? preferLossless : undefined,
177
- offthreadVideoCacheSizeInBytes: offthreadVideoCacheSizeInBytes !== null && offthreadVideoCacheSizeInBytes !== void 0 ? offthreadVideoCacheSizeInBytes : undefined,
178
- colorSpace: colorSpace !== null && colorSpace !== void 0 ? colorSpace : undefined,
176
+ enforceAudioTrack: enforceAudioTrack !== null && enforceAudioTrack !== void 0 ? enforceAudioTrack : false,
177
+ preferLossless: preferLossless !== null && preferLossless !== void 0 ? preferLossless : false,
178
+ offthreadVideoCacheSizeInBytes: offthreadVideoCacheSizeInBytes !== null && offthreadVideoCacheSizeInBytes !== void 0 ? offthreadVideoCacheSizeInBytes : null,
179
+ colorSpace: colorSpace !== null && colorSpace !== void 0 ? colorSpace : null,
179
180
  indent: false,
180
181
  downloadBehavior: downloadBehavior !== null && downloadBehavior !== void 0 ? downloadBehavior : {
181
182
  type: 'play-in-browser',
@@ -183,6 +184,7 @@ const renderMediaOnCloudrun = ({ cloudRunUrl, serviceName, region, serveUrl, com
183
184
  metadata: metadata !== null && metadata !== void 0 ? metadata : null,
184
185
  renderIdOverride: renderIdOverride !== null && renderIdOverride !== void 0 ? renderIdOverride : undefined,
185
186
  renderStatusWebhook: renderStatusWebhook !== null && renderStatusWebhook !== void 0 ? renderStatusWebhook : undefined,
187
+ offthreadVideoThreads: offthreadVideoThreads !== null && offthreadVideoThreads !== void 0 ? offthreadVideoThreads : null,
186
188
  });
187
189
  };
188
190
  exports.renderMediaOnCloudrun = renderMediaOnCloudrun;
@@ -250,6 +250,7 @@ ${downloadName ? ` Downloaded File = ${downloadName}` : ''}
250
250
  webhookProgressInterval: null,
251
251
  }
252
252
  : null,
253
+ offthreadVideoThreads,
253
254
  });
254
255
  if (res.type === 'crash') {
255
256
  (0, cloudrun_crash_logs_1.displayCrashLogs)(res, logLevel);
package/dist/index.d.ts CHANGED
@@ -16,7 +16,7 @@ import type { GcpRegion } from './pricing/gcp-regions';
16
16
  /**
17
17
  * @deprecated Import this from `@remotion/cloudrun/client` instead
18
18
  */
19
- declare const renderMediaOnCloudrun: ({ cloudRunUrl, serviceName, region, serveUrl, composition, inputProps, codec, forceBucketName, privacy, outName, updateRenderProgress, jpegQuality, audioCodec, audioBitrate, videoBitrate, encodingMaxRate, encodingBufferSize, proResProfile, x264Preset, crf, pixelFormat, imageFormat, scale, everyNthFrame, numberOfGifLoops, frameRange, envVariables, chromiumOptions, muted, forceWidth, forceHeight, logLevel, delayRenderTimeoutInMilliseconds, concurrency, enforceAudioTrack, preferLossless, offthreadVideoCacheSizeInBytes, colorSpace, downloadBehavior, metadata, renderIdOverride, renderStatusWebhook, }: RenderMediaOnCloudrunInput) => Promise<RenderMediaOnCloudrunOutput | import("./functions/helpers/payloads").CloudRunCrashResponse>;
19
+ declare const renderMediaOnCloudrun: ({ cloudRunUrl, serviceName, region, serveUrl, composition, inputProps, codec, forceBucketName, privacy, outName, updateRenderProgress, jpegQuality, audioCodec, audioBitrate, videoBitrate, encodingMaxRate, encodingBufferSize, proResProfile, x264Preset, crf, pixelFormat, imageFormat, scale, everyNthFrame, numberOfGifLoops, frameRange, envVariables, chromiumOptions, muted, forceWidth, forceHeight, logLevel, delayRenderTimeoutInMilliseconds, concurrency, enforceAudioTrack, preferLossless, offthreadVideoCacheSizeInBytes, colorSpace, downloadBehavior, metadata, renderIdOverride, renderStatusWebhook, offthreadVideoThreads, }: RenderMediaOnCloudrunInput) => Promise<RenderMediaOnCloudrunOutput | import("./functions/helpers/payloads").CloudRunCrashResponse>;
20
20
  /**
21
21
  * @deprecated Import this from `@remotion/cloudrun/client` instead
22
22
  */
package/package.json CHANGED
@@ -3,7 +3,7 @@
3
3
  "url": "https://github.com/remotion-dev/remotion/tree/main/packages/cloudrun"
4
4
  },
5
5
  "name": "@remotion/cloudrun",
6
- "version": "4.0.267",
6
+ "version": "4.0.269",
7
7
  "description": "Render Remotion videos on Google Cloud Run",
8
8
  "main": "dist/index.js",
9
9
  "sideEffects": false,
@@ -16,16 +16,16 @@
16
16
  "@google-cloud/logging": "^11.1.0",
17
17
  "google-auth-library": "^8.7.0",
18
18
  "zod": "3.22.3",
19
- "@remotion/bundler": "4.0.267",
20
- "@remotion/renderer": "4.0.267",
21
- "remotion": "4.0.267",
22
- "@remotion/cli": "4.0.267"
19
+ "@remotion/bundler": "4.0.269",
20
+ "remotion": "4.0.269",
21
+ "@remotion/cli": "4.0.269",
22
+ "@remotion/renderer": "4.0.269"
23
23
  },
24
24
  "devDependencies": {
25
25
  "@types/minimist": "1.2.2",
26
26
  "eslint": "9.19.0",
27
- "@remotion/eslint-config-internal": "4.0.267",
28
- "@remotion/compositor-linux-x64-gnu": "4.0.267"
27
+ "@remotion/compositor-linux-x64-gnu": "4.0.269",
28
+ "@remotion/eslint-config-internal": "4.0.269"
29
29
  },
30
30
  "exports": {
31
31
  "./package.json": "./package.json",
@@ -50,9 +50,8 @@
50
50
  },
51
51
  "homepage": "https://www.remotion.dev/docs/cloudrun",
52
52
  "scripts": {
53
- "make": "tsc -d && bun build.ts",
54
- "buildContainer": "bun src/admin/bundle-renderLogic.ts",
55
- "tarInstaller": "bun src/admin/bundle-installer.ts",
53
+ "make": "tsc -d && cp src/shared/sa-permissions.json dist/shared/sa-permissions.json",
54
+ "makeruntime": "bun build.ts",
56
55
  "lint": "eslint src",
57
56
  "test": "bun test src"
58
57
  }