@remotion/cli 4.0.22 → 4.0.24

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.
Files changed (61) hide show
  1. package/dist/benchmark.js +3 -1
  2. package/dist/better-opn/index.d.ts +0 -1
  3. package/dist/compositions.js +2 -1
  4. package/dist/config/index.d.ts +2 -0
  5. package/dist/config/index.js +3 -0
  6. package/dist/config/offthread-video-cache-size.d.ts +2 -0
  7. package/dist/config/offthread-video-cache-size.js +12 -0
  8. package/dist/editor/components/Modals.js +1 -1
  9. package/dist/editor/components/NewComposition/NewCompCode.d.ts +0 -1
  10. package/dist/editor/components/NewComposition/RemInput.d.ts +1 -1
  11. package/dist/editor/components/Notifications/ServerDisconnected.js +2 -1
  12. package/dist/editor/components/RenderButton.js +1 -0
  13. package/dist/editor/components/RenderModal/CrfSetting.d.ts +2 -2
  14. package/dist/editor/components/RenderModal/EnforceAudioTrackSetting.d.ts +2 -2
  15. package/dist/editor/components/RenderModal/MutedSetting.d.ts +2 -2
  16. package/dist/editor/components/RenderModal/NumberSetting.d.ts +2 -2
  17. package/dist/editor/components/RenderModal/OptionExplainer.d.ts +2 -2
  18. package/dist/editor/components/RenderModal/RenderModal.d.ts +1 -0
  19. package/dist/editor/components/RenderModal/RenderModal.js +7 -2
  20. package/dist/editor/components/RenderModal/RenderModalAdvanced.d.ts +2 -0
  21. package/dist/editor/components/RenderModal/RenderModalAdvanced.js +22 -2
  22. package/dist/editor/components/RenderModal/RenderModalPicture.d.ts +1 -1
  23. package/dist/editor/components/RenderModal/SchemaEditor/input-props-serialization.d.ts +14 -0
  24. package/dist/editor/components/RenderModal/SchemaEditor/input-props-serialization.js +42 -0
  25. package/dist/editor/components/RenderModal/layout.js +1 -1
  26. package/dist/editor/components/RenderQueue/actions.d.ts +4 -2
  27. package/dist/editor/components/RenderQueue/actions.js +4 -2
  28. package/dist/editor/components/RightPanel.js +12 -45
  29. package/dist/editor/components/SidebarRenderButton.js +8 -1
  30. package/dist/editor/components/UpdateCheck.d.ts +0 -1
  31. package/dist/editor/helpers/colors.d.ts +1 -1
  32. package/dist/editor/helpers/convert-env-variables.d.ts +8 -2
  33. package/dist/editor/helpers/render-modal-sections.d.ts +0 -1
  34. package/dist/editor/state/modals.d.ts +1 -0
  35. package/dist/get-cli-options.d.ts +1 -0
  36. package/dist/get-cli-options.js +1 -0
  37. package/dist/get-composition-id.d.ts +2 -1
  38. package/dist/get-composition-id.js +3 -1
  39. package/dist/get-composition-with-dimension-override.d.ts +2 -1
  40. package/dist/get-composition-with-dimension-override.js +2 -1
  41. package/dist/index.d.ts +4 -1
  42. package/dist/list-of-remotion-packages.js +1 -0
  43. package/dist/parse-command-line.d.ts +3 -0
  44. package/dist/parse-command-line.js +3 -0
  45. package/dist/preview-server/error-overlay/react-overlay/utils/open-in-editor.d.ts +1 -1
  46. package/dist/preview-server/render-queue/job.d.ts +3 -0
  47. package/dist/preview-server/render-queue/make-retry-payload.js +2 -0
  48. package/dist/preview-server/render-queue/process-still.js +1 -0
  49. package/dist/preview-server/render-queue/process-video.js +1 -0
  50. package/dist/preview-server/routes/add-render.js +2 -0
  51. package/dist/preview-server/routes.d.ts +0 -1
  52. package/dist/preview-server/routes.js +2 -0
  53. package/dist/render-flows/render.d.ts +2 -1
  54. package/dist/render-flows/render.js +5 -1
  55. package/dist/render-flows/still.d.ts +2 -1
  56. package/dist/render-flows/still.js +4 -1
  57. package/dist/render.js +2 -1
  58. package/dist/still.js +2 -1
  59. package/package.json +9 -9
  60. package/dist/config/presets-profile.d.ts +0 -3
  61. package/dist/config/presets-profile.js +0 -12
package/dist/benchmark.js CHANGED
@@ -95,7 +95,7 @@ const benchmarkCommand = async (remotionRoot, args) => {
95
95
  process.exit(1);
96
96
  }
97
97
  const fullEntryPoint = (0, convert_entry_point_to_serve_url_1.convertEntryPointToServeUrl)(file);
98
- const { inputProps, envVariables, browserExecutable, chromiumOptions, port, puppeteerTimeout, browser, scale, publicDir, proResProfile, x264Preset, frameRange: defaultFrameRange, overwrite, jpegQuality, crf: configFileCrf, pixelFormat, scale: configFileScale, numberOfGifLoops, everyNthFrame, muted, enforceAudioTrack, ffmpegOverride, audioBitrate, videoBitrate, height, width, concurrency: unparsedConcurrency, logLevel, } = await (0, get_cli_options_1.getCliOptions)({
98
+ const { inputProps, envVariables, browserExecutable, chromiumOptions, port, puppeteerTimeout, browser, scale, publicDir, proResProfile, x264Preset, frameRange: defaultFrameRange, overwrite, jpegQuality, crf: configFileCrf, pixelFormat, scale: configFileScale, numberOfGifLoops, everyNthFrame, muted, enforceAudioTrack, ffmpegOverride, audioBitrate, videoBitrate, height, width, concurrency: unparsedConcurrency, logLevel, offthreadVideoCacheSizeInBytes, } = await (0, get_cli_options_1.getCliOptions)({
99
99
  isLambda: false,
100
100
  type: 'series',
101
101
  remotionRoot,
@@ -145,6 +145,7 @@ const benchmarkCommand = async (remotionRoot, args) => {
145
145
  // Intentionally disabling server to not cache results
146
146
  server: undefined,
147
147
  logLevel,
148
+ offthreadVideoCacheSizeInBytes,
148
149
  });
149
150
  const ids = (remainingArgs[0]
150
151
  ? remainingArgs[0]
@@ -235,6 +236,7 @@ const benchmarkCommand = async (remotionRoot, args) => {
235
236
  indent: undefined,
236
237
  staticBase: null,
237
238
  }).serializedString,
239
+ offthreadVideoCacheSizeInBytes,
238
240
  }, (run, progress) => {
239
241
  benchmarkProgress.update(makeBenchmarkProgressBar({
240
242
  totalRuns: runs,
@@ -1,4 +1,3 @@
1
- /// <reference types="node" />
2
1
  export declare const openBrowser: ({ url, browserFlag, browserArgs, }: {
3
2
  url: string;
4
3
  browserFlag: string | undefined;
@@ -20,7 +20,7 @@ const listCompositionsCommand = async (remotionRoot, args) => {
20
20
  }
21
21
  const logLevel = config_1.ConfigInternals.Logging.getLogLevel();
22
22
  log_1.Log.verbose('Entry point:', file, 'reason:', reason);
23
- const { browserExecutable, chromiumOptions, envVariables, inputProps, puppeteerTimeout, port, publicDir, } = await (0, get_cli_options_1.getCliOptions)({
23
+ const { browserExecutable, chromiumOptions, envVariables, inputProps, puppeteerTimeout, port, publicDir, offthreadVideoCacheSizeInBytes, } = await (0, get_cli_options_1.getCliOptions)({
24
24
  isLambda: false,
25
25
  type: 'get-compositions',
26
26
  remotionRoot,
@@ -57,6 +57,7 @@ const listCompositionsCommand = async (remotionRoot, args) => {
57
57
  puppeteerInstance: undefined,
58
58
  logLevel,
59
59
  server: undefined,
60
+ offthreadVideoCacheSizeInBytes,
60
61
  });
61
62
  (0, print_compositions_1.printCompositions)(compositions);
62
63
  };
@@ -246,6 +246,7 @@ type FlatConfig = RemotionConfigObject & RemotionBundlingOptions & {
246
246
  * See the Encoding guide in the docs for defaults and available options.
247
247
  */
248
248
  setAudioCodec: (codec: 'pcm-16' | 'aac' | 'mp3' | 'opus') => void;
249
+ setOffthreadVideoCacheSizeInBytes: (size: number | null) => void;
249
250
  /**
250
251
  * @deprecated 'The config format has changed. Change `Config.Bundling.*()` calls to `Config.*()` in your config file.'
251
252
  */
@@ -325,4 +326,5 @@ export declare const ConfigInternals: {
325
326
  getWebpackPolling: () => number | null;
326
327
  getShouldOpenBrowser: () => boolean;
327
328
  getChromiumUserAgent: () => string | null;
329
+ getOffthreadVideoCacheSizeInBytes: () => number | null;
328
330
  };
@@ -69,6 +69,7 @@ const max_timeline_tracks_2 = require("./max-timeline-tracks");
69
69
  const muted_1 = require("./muted");
70
70
  const number_of_gif_loops_1 = require("./number-of-gif-loops");
71
71
  const number_of_shared_audio_tags_1 = require("./number-of-shared-audio-tags");
72
+ const offthread_video_cache_size_1 = require("./offthread-video-cache-size");
72
73
  const open_browser_1 = require("./open-browser");
73
74
  const output_location_2 = require("./output-location");
74
75
  const override_webpack_2 = require("./override-webpack");
@@ -153,6 +154,7 @@ exports.Config = {
153
154
  overrideWidth: width_1.overrideWidth,
154
155
  overrideFfmpegCommand: ffmpeg_override_1.setFfmpegOverrideFunction,
155
156
  setAudioCodec: audio_codec_1.setAudioCodec,
157
+ setOffthreadVideoCacheSizeInBytes: offthread_video_cache_size_1.setOffthreadVideoCacheSizeInBytes,
156
158
  };
157
159
  exports.ConfigInternals = {
158
160
  getRange: frame_range_1.getRange,
@@ -204,4 +206,5 @@ exports.ConfigInternals = {
204
206
  getWebpackPolling: webpack_poll_1.getWebpackPolling,
205
207
  getShouldOpenBrowser: open_browser_1.getShouldOpenBrowser,
206
208
  getChromiumUserAgent: user_agent_1.getChromiumUserAgent,
209
+ getOffthreadVideoCacheSizeInBytes: offthread_video_cache_size_1.getOffthreadVideoCacheSizeInBytes,
207
210
  };
@@ -0,0 +1,2 @@
1
+ export declare const getOffthreadVideoCacheSizeInBytes: () => number | null;
2
+ export declare const setOffthreadVideoCacheSizeInBytes: (size: number | null) => void;
@@ -0,0 +1,12 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.setOffthreadVideoCacheSizeInBytes = exports.getOffthreadVideoCacheSizeInBytes = void 0;
4
+ let offthreadVideoCacheSizeInBytes = null;
5
+ const getOffthreadVideoCacheSizeInBytes = () => {
6
+ return offthreadVideoCacheSizeInBytes;
7
+ };
8
+ exports.getOffthreadVideoCacheSizeInBytes = getOffthreadVideoCacheSizeInBytes;
9
+ const setOffthreadVideoCacheSizeInBytes = (size) => {
10
+ offthreadVideoCacheSizeInBytes = size;
11
+ };
12
+ exports.setOffthreadVideoCacheSizeInBytes = setOffthreadVideoCacheSizeInBytes;
@@ -16,7 +16,7 @@ const UpdateModal_1 = require("./UpdateModal/UpdateModal");
16
16
  const Modals = () => {
17
17
  const { selectedModal: modalContextType } = (0, react_1.useContext)(modals_1.ModalsContext);
18
18
  const canRender = (0, react_1.useContext)(client_id_1.StudioServerConnectionCtx).type === 'connected';
19
- return ((0, jsx_runtime_1.jsxs)(jsx_runtime_1.Fragment, { children: [modalContextType && modalContextType.type === 'new-comp' && ((0, jsx_runtime_1.jsx)(NewComposition_1.default, { initialCompType: modalContextType.compType })), modalContextType && canRender && modalContextType.type === 'render' && ((0, jsx_runtime_1.jsx)(RenderModal_1.RenderModalWithLoader, { initialFrame: modalContextType.initialFrame, compositionId: modalContextType.compositionId, initialVideoImageFormat: modalContextType.initialVideoImageFormat, initialJpegQuality: modalContextType.initialJpegQuality, initialOutName: modalContextType.initialOutName, initialScale: modalContextType.initialScale, initialVerbose: modalContextType.initialVerbose, initialRenderType: modalContextType.initialRenderType, initialVideoCodecForAudioTab: modalContextType.initialVideoCodecForAudioTab, initialVideoCodecForVideoTab: modalContextType.initialVideoCodecForVideoTab, initialConcurrency: modalContextType.initialConcurrency, maxConcurrency: modalContextType.maxConcurrency, minConcurrency: modalContextType.minConcurrency, initialStillImageFormat: modalContextType.initialStillImageFormat, initialMuted: modalContextType.initialMuted, initialEnforceAudioTrack: modalContextType.initialEnforceAudioTrack, initialProResProfile: modalContextType.initialProResProfile, initialx264Preset: modalContextType.initialx264Preset, initialPixelFormat: modalContextType.initialPixelFormat, initialAudioBitrate: modalContextType.initialAudioBitrate, initialVideoBitrate: modalContextType.initialVideoBitrate, initialEveryNthFrame: modalContextType.initialEveryNthFrame, initialNumberOfGifLoops: modalContextType.initialNumberOfGifLoops, initialDelayRenderTimeout: modalContextType.initialDelayRenderTimeout, initialAudioCodec: modalContextType.initialAudioCodec, initialEnvVariables: modalContextType.initialEnvVariables, initialDisableWebSecurity: modalContextType.initialDisableWebSecurity, initialGl: modalContextType.initialOpenGlRenderer, initialHeadless: modalContextType.initialHeadless, initialIgnoreCertificateErrors: modalContextType.initialIgnoreCertificateErrors, defaultProps: modalContextType.defaultProps, inFrameMark: modalContextType.inFrameMark, outFrameMark: modalContextType.outFrameMark })), modalContextType &&
19
+ return ((0, jsx_runtime_1.jsxs)(jsx_runtime_1.Fragment, { children: [modalContextType && modalContextType.type === 'new-comp' && ((0, jsx_runtime_1.jsx)(NewComposition_1.default, { initialCompType: modalContextType.compType })), modalContextType && canRender && modalContextType.type === 'render' && ((0, jsx_runtime_1.jsx)(RenderModal_1.RenderModalWithLoader, { initialFrame: modalContextType.initialFrame, compositionId: modalContextType.compositionId, initialVideoImageFormat: modalContextType.initialVideoImageFormat, initialJpegQuality: modalContextType.initialJpegQuality, initialOutName: modalContextType.initialOutName, initialScale: modalContextType.initialScale, initialVerbose: modalContextType.initialVerbose, initialRenderType: modalContextType.initialRenderType, initialOffthreadVideoCacheSizeInBytes: modalContextType.initialOffthreadVideoCacheSizeInBytes, initialVideoCodecForAudioTab: modalContextType.initialVideoCodecForAudioTab, initialVideoCodecForVideoTab: modalContextType.initialVideoCodecForVideoTab, initialConcurrency: modalContextType.initialConcurrency, maxConcurrency: modalContextType.maxConcurrency, minConcurrency: modalContextType.minConcurrency, initialStillImageFormat: modalContextType.initialStillImageFormat, initialMuted: modalContextType.initialMuted, initialEnforceAudioTrack: modalContextType.initialEnforceAudioTrack, initialProResProfile: modalContextType.initialProResProfile, initialx264Preset: modalContextType.initialx264Preset, initialPixelFormat: modalContextType.initialPixelFormat, initialAudioBitrate: modalContextType.initialAudioBitrate, initialVideoBitrate: modalContextType.initialVideoBitrate, initialEveryNthFrame: modalContextType.initialEveryNthFrame, initialNumberOfGifLoops: modalContextType.initialNumberOfGifLoops, initialDelayRenderTimeout: modalContextType.initialDelayRenderTimeout, initialAudioCodec: modalContextType.initialAudioCodec, initialEnvVariables: modalContextType.initialEnvVariables, initialDisableWebSecurity: modalContextType.initialDisableWebSecurity, initialGl: modalContextType.initialOpenGlRenderer, initialHeadless: modalContextType.initialHeadless, initialIgnoreCertificateErrors: modalContextType.initialIgnoreCertificateErrors, defaultProps: modalContextType.defaultProps, inFrameMark: modalContextType.inFrameMark, outFrameMark: modalContextType.outFrameMark })), modalContextType &&
20
20
  canRender &&
21
21
  modalContextType.type === 'render-progress' && ((0, jsx_runtime_1.jsx)(RenderStatusModal_1.RenderStatusModal, { jobId: modalContextType.jobId })), modalContextType && modalContextType.type === 'update' && ((0, jsx_runtime_1.jsx)(UpdateModal_1.UpdateModal, { info: modalContextType.info })), modalContextType && modalContextType.type === 'quick-switcher' && ((0, jsx_runtime_1.jsx)(QuickSwitcher_1.default, { invocationTimestamp: modalContextType.invocationTimestamp, initialMode: modalContextType.mode }))] }));
22
22
  };
@@ -1,4 +1,3 @@
1
- /// <reference types="react" />
2
1
  export declare const getNewCompositionCode: ({ type, height, width, fps, durationInFrames, name, raw, }: {
3
2
  type: 'still' | 'composition';
4
3
  height: number;
@@ -12,6 +12,6 @@ export declare const getInputBorderColor: ({ status, isFocused, isHovered, }: {
12
12
  status: 'error' | 'warning' | 'ok';
13
13
  isFocused: boolean;
14
14
  isHovered: boolean;
15
- }) => "hsla(0, 0%, 100%, 0.15)" | "rgba(0, 0, 0, 0.6)" | "rgba(255, 255, 255, 0.05)" | "#ff3232" | "#f1c40f";
15
+ }) => "hsla(0, 0%, 100%, 0.15)" | "#ff3232" | "rgba(0, 0, 0, 0.6)" | "rgba(255, 255, 255, 0.05)" | "#f1c40f";
16
16
  export declare const RemotionInput: React.ForwardRefExoticComponent<Pick<Props, "key" | keyof React.InputHTMLAttributes<HTMLInputElement> | "status" | "rightAlign"> & React.RefAttributes<HTMLInputElement>>;
17
17
  export {};
@@ -38,14 +38,15 @@ window.addEventListener('beforeunload', () => {
38
38
  });
39
39
  const ServerDisconnected = () => {
40
40
  const ctx = (0, react_1.useContext)(client_id_1.StudioServerConnectionCtx);
41
+ const fav = document.getElementById('__remotion_favicon');
41
42
  if (ctx.type !== 'disconnected') {
43
+ fav.setAttribute('href', '/remotion.png');
42
44
  return null;
43
45
  }
44
46
  if (pageIsGoingToReload) {
45
47
  return null;
46
48
  }
47
49
  const base64Favicon = 'data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAGQAAABkCAYAAABw4pVUAAAACXBIWXMAAAsTAAALEwEAmpwYAAAAAXNSR0IArs4c6QAAAARnQU1BAACxjwv8YQUAAARiSURBVHgB7d1NThRBFAfw/2tGgru5gXMD8QZ4AmVjAi6kN0TiAm8gnkBcGARNumcx4E48Ae0JaE9gewLHlQSZelaNgyHGL/RVd1X3+y10RQL58+rVx1QBKKWUUkoppZRSSimllFJKKVUjQs32stEiJcktZiwxzKL9Fvqzb6S0/44JVBKbtwa9aj29U6JjagtkJzsYzBEyBi9d5utsQIULCcxvelgo03R5jBarJZCXw/17E+bt82r4Hy4gtuEQekUbK8h7IHvDV5vMZht+VAlRfmYw3EhXKrSA10Ce2X7RIzpGDVzlgM1wPb2bI2JeA9nN99/b/waoV+XCmTAex1g13gLZyUZrdjjJ0CAbTB5bMN4C2ctHxwxaRABiCsZLIG6KmxC/R2BiCCaBBwn4NgJk10B2GOWj3Wz/IQLlpUL28oOjyy4AG1AZppuhVYt4hWRZ1o8gDGc6rL4YHjxCQMQDOcNCEI38bxnmLTc9d30PARAPZAITZP/4A1ctx3bjcw0NEw8koeQ64tRnu25qeggTb+q2/BmRcyv9K7yw3MTOsmiFuLMOtICblJzS5+Mm+opoIBOgFYHMuL5yVHcoooFQuwJxag9FNJCIG/rv1BqKaCDfzshbqbZQxAJxK3SJI9qATUPJstdef0axQGJbof+jwRc6eQ2PxAIx4DZXx3duSrybv3oCTyR7yACdYR762sIXDKQbFfId4ZGPJi8YCA3QLf05YvF+IhYIEV1Dx9hNu8XdbLQFQV6OcDuFaFNyKiwWiJ19DNBN/VN8XoMQrRABDFqCEJ32CiBisT08rRAZAwjRQAKjgcgQO+rVQARMb3gJ0UAkML+DEA1EwAQkdkNMcnOx1Zcxf8V9ol7y88GSm4tdDKRy1xsgSIes/0BM4ndN5HZ7OzZkMePperqSQ5jkkFWhO6r76WrYJ4b2N+YTumF60QeeSG6/d2DI4rHvW1eCPaT9Q9YZw/sVOMlZVoUWM8zpg/Su97dVJGdZFVrKhbFR05MdYoFcwWmF1rF9kbG8UeP7KaI3qBp628QTHrueUccwdZHw/ZDWNHY7tU1u1B2GIxqIYSO2Dd0Ud79wnq/eaOpBgR4EMVDW/oijINu87d7U6hYaJBrInA0k0iu4bvVtZ1KrBRrm4Vr06GNkF3cO7RCVhvK4pmiFOISkjOStk1lVrBQIiPh5SAyN3fWKWeMuEBjxCmEkh3bVvokAzd5idL2iQqDEA1nASXmK+XFIfeTCo5gFAudllvo8G20TUeNVElMQ58QrxLHD1jbB3GumSnhsz7qHE9BhTEGc87aOm16KJHi7rfqj8yfI53E1j/l9eK8L651stJUQeXx/iuzU1QztZLGIsRp+xvtOh3Qo3/qCedumEC6qZetpJztwz7O6UAa4FNsP7ELTfXbWbskUdjgq9M9VCJoFcwvTlfyPDd9t3XNJjA+2IZcGpmxi+7tpjW3OupurJziZhtKWPzWhlFJKKaWUUkoppZRSSiml/uwrgZ/Bfwo/wccAAAAASUVORK5CYII=';
48
- const fav = document.getElementById('__remotion_favicon');
49
50
  fav.setAttribute('href', base64Favicon);
50
51
  return ((0, jsx_runtime_1.jsx)("div", { style: container, className: "css-reset", children: (0, jsx_runtime_1.jsxs)("div", { style: message, children: ["The studio server has disconnected. ", (0, jsx_runtime_1.jsx)("br", {}), window.remotion_studioServerCommand ? ((0, jsx_runtime_1.jsxs)("span", { children: ["Run", ' ', (0, jsx_runtime_1.jsx)("code", { style: inlineCode, children: window.remotion_studioServerCommand }), ' ', "to run it again."] })) : ((0, jsx_runtime_1.jsx)("span", { children: "Fast refresh will not work." }))] }) }));
51
52
  };
@@ -95,6 +95,7 @@ const RenderButton = () => {
95
95
  initialOpenGlRenderer: defaults.openGlRenderer,
96
96
  initialHeadless: defaults.headless,
97
97
  initialIgnoreCertificateErrors: defaults.ignoreCertificateErrors,
98
+ initialOffthreadVideoCacheSizeInBytes: defaults.offthreadVideoCacheSizeInBytes,
98
99
  defaultProps: (_c = props[video.id]) !== null && _c !== void 0 ? _c : video.defaultProps,
99
100
  inFrameMark: inFrame,
100
101
  outFrameMark: outFrame,
@@ -1,5 +1,5 @@
1
1
  /// <reference types="react" />
2
- import type { Codec, RemotionOption } from '@remotion/renderer';
2
+ import type { AnyRemotionOption, Codec } from '@remotion/renderer';
3
3
  export declare const useCrfState: (codec: Codec) => {
4
4
  crf: number;
5
5
  setCrf: import("react").Dispatch<import("react").SetStateAction<number>>;
@@ -11,5 +11,5 @@ export declare const CrfSetting: React.FC<{
11
11
  setCrf: React.Dispatch<React.SetStateAction<number>>;
12
12
  min: number;
13
13
  max: number;
14
- option: RemotionOption;
14
+ option: AnyRemotionOption;
15
15
  }>;
@@ -1,8 +1,8 @@
1
- import type { RemotionOption } from '@remotion/renderer';
1
+ import type { AnyRemotionOption } from '@remotion/renderer';
2
2
  import React from 'react';
3
3
  export declare const EnforceAudioTrackSetting: React.FC<{
4
4
  enforceAudioTrack: boolean;
5
5
  setEnforceAudioTrack: React.Dispatch<React.SetStateAction<boolean>>;
6
6
  muted: boolean;
7
- option: RemotionOption;
7
+ option: AnyRemotionOption;
8
8
  }>;
@@ -1,8 +1,8 @@
1
- import type { RemotionOption } from '@remotion/renderer';
1
+ import type { AnyRemotionOption } from '@remotion/renderer';
2
2
  import React from 'react';
3
3
  export declare const MutedSetting: React.FC<{
4
4
  muted: boolean;
5
5
  setMuted: React.Dispatch<React.SetStateAction<boolean>>;
6
6
  enforceAudioTrack: boolean;
7
- hint: RemotionOption;
7
+ hint: AnyRemotionOption;
8
8
  }>;
@@ -1,4 +1,4 @@
1
- import type { RemotionOption } from '@remotion/renderer';
1
+ import type { AnyRemotionOption } from '@remotion/renderer';
2
2
  import React from 'react';
3
3
  export declare const NumberSetting: React.FC<{
4
4
  name: string;
@@ -8,5 +8,5 @@ export declare const NumberSetting: React.FC<{
8
8
  min: number;
9
9
  step: number;
10
10
  formatter?: (value: string | number) => string;
11
- hint?: RemotionOption;
11
+ hint?: AnyRemotionOption;
12
12
  }>;
@@ -1,5 +1,5 @@
1
- import type { RemotionOption } from '@remotion/renderer';
1
+ import type { AnyRemotionOption } from '@remotion/renderer';
2
2
  import React from 'react';
3
3
  export declare const OptionExplainer: React.FC<{
4
- option: RemotionOption;
4
+ option: AnyRemotionOption;
5
5
  }>;
@@ -31,6 +31,7 @@ type RenderModalProps = {
31
31
  initialDisableWebSecurity: boolean;
32
32
  initialGl: OpenGlRenderer | null;
33
33
  initialIgnoreCertificateErrors: boolean;
34
+ initialOffthreadVideoCacheSizeInBytes: number | null;
34
35
  initialHeadless: boolean;
35
36
  defaultProps: Record<string, unknown>;
36
37
  inFrameMark: number | null;
@@ -114,7 +114,7 @@ const outer = {
114
114
  display: 'flex',
115
115
  flexDirection: 'column',
116
116
  };
117
- const RenderModal = ({ initialFrame, initialVideoImageFormat, initialStillImageFormat, initialJpegQuality, initialScale, initialVerbose, initialOutName, initialRenderType, initialVideoCodecForAudioTab, initialVideoCodecForVideoTab, initialConcurrency, maxConcurrency, minConcurrency, initialMuted, initialEnforceAudioTrack, initialProResProfile, initialx264Preset, initialPixelFormat, initialVideoBitrate, initialAudioBitrate, initialEveryNthFrame, initialNumberOfGifLoops, initialDelayRenderTimeout, initialAudioCodec, initialEnvVariables, initialDisableWebSecurity, initialGl, initialHeadless, initialIgnoreCertificateErrors, defaultProps, inFrameMark, outFrameMark, onClose, resolvedComposition, unresolvedComposition, }) => {
117
+ const RenderModal = ({ initialFrame, initialVideoImageFormat, initialStillImageFormat, initialJpegQuality, initialScale, initialVerbose, initialOutName, initialRenderType, initialVideoCodecForAudioTab, initialVideoCodecForVideoTab, initialConcurrency, maxConcurrency, minConcurrency, initialMuted, initialEnforceAudioTrack, initialProResProfile, initialx264Preset, initialPixelFormat, initialVideoBitrate, initialAudioBitrate, initialEveryNthFrame, initialNumberOfGifLoops, initialDelayRenderTimeout, initialOffthreadVideoCacheSizeInBytes, initialAudioCodec, initialEnvVariables, initialDisableWebSecurity, initialGl, initialHeadless, initialIgnoreCertificateErrors, defaultProps, inFrameMark, outFrameMark, onClose, resolvedComposition, unresolvedComposition, }) => {
118
118
  const isMounted = (0, react_1.useRef)(true);
119
119
  const [state, dispatch] = (0, react_1.useReducer)(reducer, initialState);
120
120
  const [unclampedFrame, setFrame] = (0, react_1.useState)(() => initialFrame);
@@ -160,6 +160,7 @@ const RenderModal = ({ initialFrame, initialVideoImageFormat, initialStillImageF
160
160
  const [limitNumberOfGifLoops, setLimitNumberOfGifLoops] = (0, react_1.useState)(() => initialNumberOfGifLoops !== null);
161
161
  const [numberOfGifLoopsSetting, setNumberOfGifLoopsSetting] = (0, react_1.useState)(() => initialNumberOfGifLoops !== null && initialNumberOfGifLoops !== void 0 ? initialNumberOfGifLoops : 1);
162
162
  const [delayRenderTimeout, setDelayRenderTimeout] = (0, react_1.useState)(() => initialDelayRenderTimeout);
163
+ const [offthreadVideoCacheSizeInBytes, setOffthreadVideoCacheSizeInBytes] = (0, react_1.useState)(initialOffthreadVideoCacheSizeInBytes);
163
164
  const codec = (0, react_1.useMemo)(() => {
164
165
  if (renderMode === 'audio') {
165
166
  return videoCodecForAudioTab;
@@ -333,6 +334,7 @@ const RenderModal = ({ initialFrame, initialVideoImageFormat, initialStillImageF
333
334
  delayRenderTimeout,
334
335
  envVariables: (0, convert_env_variables_1.envVariablesArrayToObject)(envVariables),
335
336
  inputProps,
337
+ offthreadVideoCacheSizeInBytes,
336
338
  })
337
339
  .then(() => {
338
340
  dispatchIfMounted({ type: 'succeed' });
@@ -355,6 +357,7 @@ const RenderModal = ({ initialFrame, initialVideoImageFormat, initialStillImageF
355
357
  delayRenderTimeout,
356
358
  envVariables,
357
359
  inputProps,
360
+ offthreadVideoCacheSizeInBytes,
358
361
  onClose,
359
362
  ]);
360
363
  const [everyNthFrameSetting, setEveryNthFrameSetting] = (0, react_1.useState)(() => initialEveryNthFrame);
@@ -398,6 +401,7 @@ const RenderModal = ({ initialFrame, initialVideoImageFormat, initialStillImageF
398
401
  chromiumOptions,
399
402
  envVariables: (0, convert_env_variables_1.envVariablesArrayToObject)(envVariables),
400
403
  inputProps,
404
+ offthreadVideoCacheSizeInBytes,
401
405
  })
402
406
  .then(() => {
403
407
  dispatchIfMounted({ type: 'succeed' });
@@ -437,6 +441,7 @@ const RenderModal = ({ initialFrame, initialVideoImageFormat, initialStillImageF
437
441
  chromiumOptions,
438
442
  envVariables,
439
443
  inputProps,
444
+ offthreadVideoCacheSizeInBytes,
440
445
  onClose,
441
446
  ]);
442
447
  (0, react_1.useEffect)(() => {
@@ -594,7 +599,7 @@ const RenderModal = ({ initialFrame, initialVideoImageFormat, initialStillImageF
594
599
  return ((0, jsx_runtime_1.jsxs)("div", { style: outer, children: [(0, jsx_runtime_1.jsx)(ModalHeader_1.NewCompHeader, { title: `Render ${resolvedComposition.id}` }), (0, jsx_runtime_1.jsxs)("div", { style: container, children: [(0, jsx_runtime_1.jsx)(SegmentedControl_1.SegmentedControl, { items: renderTabOptions, needsWrapping: false }), (0, jsx_runtime_1.jsx)("div", { style: flexer }), (0, jsx_runtime_1.jsxs)(Button_1.Button, { autoFocus: true, onClick: trigger, disabled: renderDisabled, style: {
595
600
  ...buttonStyle,
596
601
  backgroundColor: outnameValidation.valid ? colors_1.BLUE : colors_1.BLUE_DISABLED,
597
- }, children: [state.type === 'idle' ? `Render ${renderMode}` : 'Rendering...', (0, jsx_runtime_1.jsx)(ShortcutHint_1.ShortcutHint, { keyToPress: "\u21B5", cmdOrCtrl: true })] })] }), (0, jsx_runtime_1.jsxs)("div", { style: horizontalLayout, children: [(0, jsx_runtime_1.jsxs)("div", { style: leftSidebar, children: [shownTabs.includes('general') ? ((0, jsx_runtime_1.jsxs)(vertical_1.VerticalTab, { style: horizontalTab, selected: tab === 'general', onClick: () => setTab('general'), children: [(0, jsx_runtime_1.jsx)("div", { style: iconContainer, children: (0, jsx_runtime_1.jsx)(file_1.FileIcon, { style: icon }) }), "General"] })) : null, shownTabs.includes('data') ? ((0, jsx_runtime_1.jsxs)(vertical_1.VerticalTab, { style: horizontalTab, selected: tab === 'data', onClick: () => setTab('data'), children: [(0, jsx_runtime_1.jsx)("div", { style: iconContainer, children: (0, jsx_runtime_1.jsx)(data_1.DataIcon, { style: icon }) }), "Input Props"] })) : null, shownTabs.includes('picture') ? ((0, jsx_runtime_1.jsxs)(vertical_1.VerticalTab, { style: horizontalTab, selected: tab === 'picture', onClick: () => setTab('picture'), children: [(0, jsx_runtime_1.jsx)("div", { style: iconContainer, children: (0, jsx_runtime_1.jsx)(frame_1.PicIcon, { style: icon }) }), "Picture"] })) : null, shownTabs.includes('audio') ? ((0, jsx_runtime_1.jsxs)(vertical_1.VerticalTab, { style: horizontalTab, selected: tab === 'audio', onClick: () => setTab('audio'), children: [(0, jsx_runtime_1.jsx)("div", { style: iconContainer, children: (0, jsx_runtime_1.jsx)(audio_1.AudioIcon, { style: icon }) }), "Audio"] })) : null, shownTabs.includes('gif') ? ((0, jsx_runtime_1.jsxs)(vertical_1.VerticalTab, { style: horizontalTab, selected: tab === 'gif', onClick: () => setTab('gif'), children: [(0, jsx_runtime_1.jsx)("div", { style: iconContainer, children: (0, jsx_runtime_1.jsx)(gif_1.GifIcon, { style: icon }) }), "GIF"] })) : null, shownTabs.includes('advanced') ? ((0, jsx_runtime_1.jsxs)(vertical_1.VerticalTab, { style: horizontalTab, selected: tab === 'advanced', onClick: () => setTab('advanced'), children: [(0, jsx_runtime_1.jsx)("div", { style: iconContainer, children: (0, jsx_runtime_1.jsx)(gear_1.GearIcon, { style: icon }) }), "Other"] })) : null] }), (0, jsx_runtime_1.jsx)("div", { style: optionsPanel, className: is_menu_item_1.VERTICAL_SCROLLBAR_CLASSNAME, children: tab === 'general' ? ((0, jsx_runtime_1.jsx)(RenderModalBasic_1.RenderModalBasic, { codec: codec, resolvedComposition: resolvedComposition, frame: frame, imageFormatOptions: imageFormatOptions, outName: outName, proResProfile: proResProfile, renderMode: renderMode, setVideoCodec: setCodec, setFrame: setFrame, setOutName: setOutName, setProResProfile: setProResProfile, endFrame: endFrame, setEndFrame: setEndFrame, setStartFrame: setStartFrame, startFrame: startFrame, validationMessage: outnameValidation.valid ? null : outnameValidation.error.message })) : tab === 'picture' ? ((0, jsx_runtime_1.jsx)(RenderModalPicture_1.RenderModalPicture, { renderMode: renderMode, scale: scale, setScale: setScale, pixelFormat: pixelFormat, setPixelFormat: setPixelFormat, imageFormatOptions: imageFormatOptions, crf: crf, setCrf: setCrf, customTargetVideoBitrate: customTargetVideoBitrate, maxCrf: maxCrf, minCrf: minCrf, jpegQuality: jpegQuality, qualityControlType: qualityControlType, setJpegQuality: setJpegQuality, setCustomTargetVideoBitrateValue: setCustomTargetVideoBitrateValue, setQualityControl: setQualityControl, videoImageFormat: videoImageFormat, stillImageFormat: stillImageFormat, shouldDisplayQualityControlPicker: supportsBothQualityControls })) : tab === 'audio' ? ((0, jsx_runtime_1.jsx)(RenderModalAudio_1.RenderModalAudio, { muted: muted, renderMode: renderMode, setMuted: setMuted, codec: codec, audioCodec: audioCodec, setAudioCodec: setAudioCodec, enforceAudioTrack: enforceAudioTrack, setEnforceAudioTrackState: setEnforceAudioTrackState, customTargetAudioBitrate: customTargetAudioBitrate, setCustomTargetAudioBitrateValue: setCustomTargetAudioBitrateValue, setShouldHaveCustomTargetAudioBitrate: setShouldHaveCustomTargetAudioBitrate, shouldHaveCustomTargetAudioBitrate: shouldHaveCustomTargetAudioBitrate })) : tab === 'gif' ? ((0, jsx_runtime_1.jsx)(RenderModalGif_1.RenderModalGif, { everyNthFrame: everyNthFrame, limitNumberOfGifLoops: limitNumberOfGifLoops, numberOfGifLoopsSetting: numberOfGifLoopsSetting, setEveryNthFrameSetting: setEveryNthFrameSetting, setLimitNumberOfGifLoops: setLimitNumberOfGifLoops, setNumberOfGifLoopsSetting: setNumberOfGifLoopsSetting })) : tab === 'data' ? ((0, jsx_runtime_1.jsx)(DataEditor_1.DataEditor, { inputProps: inputProps, setInputProps: setInputProps, unresolvedComposition: unresolvedComposition, mayShowSaveButton: false, propsEditType: "input-props", saving: saving, setSaving: setSaving })) : ((0, jsx_runtime_1.jsx)(RenderModalAdvanced_1.RenderModalAdvanced, { x264Preset: x264Preset, setx264Preset: setx264Preset, concurrency: concurrency, maxConcurrency: maxConcurrency, minConcurrency: minConcurrency, renderMode: renderMode, setConcurrency: setConcurrency, setVerboseLogging: setVerboseLogging, verbose: verbose, delayRenderTimeout: delayRenderTimeout, setDelayRenderTimeout: setDelayRenderTimeout, disallowParallelEncoding: disallowParallelEncoding, setDisallowParallelEncoding: setDisallowParallelEncoding, setDisableWebSecurity: setDisableWebSecurity, setIgnoreCertificateErrors: setIgnoreCertificateErrors, setHeadless: setHeadless, headless: headless, ignoreCertificateErrors: ignoreCertificateErrors, disableWebSecurity: disableWebSecurity, openGlOption: openGlOption, setOpenGlOption: setOpenGlOption, setEnvVariables: setEnvVariables, envVariables: envVariables, codec: codec })) })] })] }));
602
+ }, children: [state.type === 'idle' ? `Render ${renderMode}` : 'Rendering...', (0, jsx_runtime_1.jsx)(ShortcutHint_1.ShortcutHint, { keyToPress: "\u21B5", cmdOrCtrl: true })] })] }), (0, jsx_runtime_1.jsxs)("div", { style: horizontalLayout, children: [(0, jsx_runtime_1.jsxs)("div", { style: leftSidebar, children: [shownTabs.includes('general') ? ((0, jsx_runtime_1.jsxs)(vertical_1.VerticalTab, { style: horizontalTab, selected: tab === 'general', onClick: () => setTab('general'), children: [(0, jsx_runtime_1.jsx)("div", { style: iconContainer, children: (0, jsx_runtime_1.jsx)(file_1.FileIcon, { style: icon }) }), "General"] })) : null, shownTabs.includes('data') ? ((0, jsx_runtime_1.jsxs)(vertical_1.VerticalTab, { style: horizontalTab, selected: tab === 'data', onClick: () => setTab('data'), children: [(0, jsx_runtime_1.jsx)("div", { style: iconContainer, children: (0, jsx_runtime_1.jsx)(data_1.DataIcon, { style: icon }) }), "Input Props"] })) : null, shownTabs.includes('picture') ? ((0, jsx_runtime_1.jsxs)(vertical_1.VerticalTab, { style: horizontalTab, selected: tab === 'picture', onClick: () => setTab('picture'), children: [(0, jsx_runtime_1.jsx)("div", { style: iconContainer, children: (0, jsx_runtime_1.jsx)(frame_1.PicIcon, { style: icon }) }), "Picture"] })) : null, shownTabs.includes('audio') ? ((0, jsx_runtime_1.jsxs)(vertical_1.VerticalTab, { style: horizontalTab, selected: tab === 'audio', onClick: () => setTab('audio'), children: [(0, jsx_runtime_1.jsx)("div", { style: iconContainer, children: (0, jsx_runtime_1.jsx)(audio_1.AudioIcon, { style: icon }) }), "Audio"] })) : null, shownTabs.includes('gif') ? ((0, jsx_runtime_1.jsxs)(vertical_1.VerticalTab, { style: horizontalTab, selected: tab === 'gif', onClick: () => setTab('gif'), children: [(0, jsx_runtime_1.jsx)("div", { style: iconContainer, children: (0, jsx_runtime_1.jsx)(gif_1.GifIcon, { style: icon }) }), "GIF"] })) : null, shownTabs.includes('advanced') ? ((0, jsx_runtime_1.jsxs)(vertical_1.VerticalTab, { style: horizontalTab, selected: tab === 'advanced', onClick: () => setTab('advanced'), children: [(0, jsx_runtime_1.jsx)("div", { style: iconContainer, children: (0, jsx_runtime_1.jsx)(gear_1.GearIcon, { style: icon }) }), "Other"] })) : null] }), (0, jsx_runtime_1.jsx)("div", { style: optionsPanel, className: is_menu_item_1.VERTICAL_SCROLLBAR_CLASSNAME, children: tab === 'general' ? ((0, jsx_runtime_1.jsx)(RenderModalBasic_1.RenderModalBasic, { codec: codec, resolvedComposition: resolvedComposition, frame: frame, imageFormatOptions: imageFormatOptions, outName: outName, proResProfile: proResProfile, renderMode: renderMode, setVideoCodec: setCodec, setFrame: setFrame, setOutName: setOutName, setProResProfile: setProResProfile, endFrame: endFrame, setEndFrame: setEndFrame, setStartFrame: setStartFrame, startFrame: startFrame, validationMessage: outnameValidation.valid ? null : outnameValidation.error.message })) : tab === 'picture' ? ((0, jsx_runtime_1.jsx)(RenderModalPicture_1.RenderModalPicture, { renderMode: renderMode, scale: scale, setScale: setScale, pixelFormat: pixelFormat, setPixelFormat: setPixelFormat, imageFormatOptions: imageFormatOptions, crf: crf, setCrf: setCrf, customTargetVideoBitrate: customTargetVideoBitrate, maxCrf: maxCrf, minCrf: minCrf, jpegQuality: jpegQuality, qualityControlType: qualityControlType, setJpegQuality: setJpegQuality, setCustomTargetVideoBitrateValue: setCustomTargetVideoBitrateValue, setQualityControl: setQualityControl, videoImageFormat: videoImageFormat, stillImageFormat: stillImageFormat, shouldDisplayQualityControlPicker: supportsBothQualityControls })) : tab === 'audio' ? ((0, jsx_runtime_1.jsx)(RenderModalAudio_1.RenderModalAudio, { muted: muted, renderMode: renderMode, setMuted: setMuted, codec: codec, audioCodec: audioCodec, setAudioCodec: setAudioCodec, enforceAudioTrack: enforceAudioTrack, setEnforceAudioTrackState: setEnforceAudioTrackState, customTargetAudioBitrate: customTargetAudioBitrate, setCustomTargetAudioBitrateValue: setCustomTargetAudioBitrateValue, setShouldHaveCustomTargetAudioBitrate: setShouldHaveCustomTargetAudioBitrate, shouldHaveCustomTargetAudioBitrate: shouldHaveCustomTargetAudioBitrate })) : tab === 'gif' ? ((0, jsx_runtime_1.jsx)(RenderModalGif_1.RenderModalGif, { everyNthFrame: everyNthFrame, limitNumberOfGifLoops: limitNumberOfGifLoops, numberOfGifLoopsSetting: numberOfGifLoopsSetting, setEveryNthFrameSetting: setEveryNthFrameSetting, setLimitNumberOfGifLoops: setLimitNumberOfGifLoops, setNumberOfGifLoopsSetting: setNumberOfGifLoopsSetting })) : tab === 'data' ? ((0, jsx_runtime_1.jsx)(DataEditor_1.DataEditor, { inputProps: inputProps, setInputProps: setInputProps, unresolvedComposition: unresolvedComposition, mayShowSaveButton: false, propsEditType: "input-props", saving: saving, setSaving: setSaving })) : ((0, jsx_runtime_1.jsx)(RenderModalAdvanced_1.RenderModalAdvanced, { x264Preset: x264Preset, setx264Preset: setx264Preset, concurrency: concurrency, maxConcurrency: maxConcurrency, minConcurrency: minConcurrency, renderMode: renderMode, setConcurrency: setConcurrency, setVerboseLogging: setVerboseLogging, verbose: verbose, delayRenderTimeout: delayRenderTimeout, setDelayRenderTimeout: setDelayRenderTimeout, disallowParallelEncoding: disallowParallelEncoding, setDisallowParallelEncoding: setDisallowParallelEncoding, setDisableWebSecurity: setDisableWebSecurity, setIgnoreCertificateErrors: setIgnoreCertificateErrors, setHeadless: setHeadless, headless: headless, ignoreCertificateErrors: ignoreCertificateErrors, disableWebSecurity: disableWebSecurity, openGlOption: openGlOption, setOpenGlOption: setOpenGlOption, setEnvVariables: setEnvVariables, envVariables: envVariables, offthreadVideoCacheSizeInBytes: offthreadVideoCacheSizeInBytes, setOffthreadVideoCacheSizeInBytes: setOffthreadVideoCacheSizeInBytes, codec: codec })) })] })] }));
598
603
  };
599
604
  const RenderModalWithLoader = (props) => {
600
605
  const { setSelectedModal } = (0, react_1.useContext)(modals_1.ModalsContext);
@@ -26,5 +26,7 @@ export declare const RenderModalAdvanced: React.FC<{
26
26
  setEnvVariables: React.Dispatch<React.SetStateAction<[string, string][]>>;
27
27
  x264Preset: X264Preset | null;
28
28
  setx264Preset: React.Dispatch<React.SetStateAction<X264Preset>>;
29
+ offthreadVideoCacheSizeInBytes: number | null;
30
+ setOffthreadVideoCacheSizeInBytes: React.Dispatch<React.SetStateAction<number | null>>;
29
31
  codec: Codec;
30
32
  }>;
@@ -17,13 +17,21 @@ const container = {
17
17
  flex: 1,
18
18
  overflowY: 'auto',
19
19
  };
20
- const RenderModalAdvanced = ({ renderMode, maxConcurrency, minConcurrency, setConcurrency, concurrency, setVerboseLogging, verbose, delayRenderTimeout, setDelayRenderTimeout, disallowParallelEncoding, setDisallowParallelEncoding, setDisableWebSecurity, setIgnoreCertificateErrors, setHeadless, headless, ignoreCertificateErrors, disableWebSecurity, openGlOption, setOpenGlOption, setEnvVariables, envVariables, setx264Preset, x264Preset, codec, }) => {
20
+ const RenderModalAdvanced = ({ renderMode, maxConcurrency, minConcurrency, setConcurrency, concurrency, setVerboseLogging, verbose, delayRenderTimeout, setDelayRenderTimeout, disallowParallelEncoding, setDisallowParallelEncoding, setDisableWebSecurity, setIgnoreCertificateErrors, setHeadless, headless, ignoreCertificateErrors, disableWebSecurity, openGlOption, setOpenGlOption, setEnvVariables, envVariables, setx264Preset, x264Preset, codec, offthreadVideoCacheSizeInBytes, setOffthreadVideoCacheSizeInBytes, }) => {
21
21
  const extendedOpenGlOptions = (0, react_1.useMemo)(() => {
22
22
  return ['angle', 'egl', 'swangle', 'swiftshader', 'default'];
23
23
  }, []);
24
24
  const onVerboseLoggingChanged = (0, react_1.useCallback)((e) => {
25
25
  setVerboseLogging(e.target.checked);
26
26
  }, [setVerboseLogging]);
27
+ const toggleCustomOffthreadVideoCacheSizeInBytes = (0, react_1.useCallback)(() => {
28
+ setOffthreadVideoCacheSizeInBytes((previous) => {
29
+ if (previous === null) {
30
+ return 512 * 1024 * 1024;
31
+ }
32
+ return null;
33
+ });
34
+ }, [setOffthreadVideoCacheSizeInBytes]);
27
35
  const onDisallowParallelEncodingChanged = (0, react_1.useCallback)((e) => {
28
36
  setDisallowParallelEncoding(e.target.checked);
29
37
  }, [setDisallowParallelEncoding]);
@@ -69,10 +77,22 @@ const RenderModalAdvanced = ({ renderMode, maxConcurrency, minConcurrency, setCo
69
77
  };
70
78
  });
71
79
  }, [setx264Preset, x264Preset]);
80
+ const changeOffthreadVideoCacheSizeInBytes = (0, react_1.useCallback)((cb) => {
81
+ setOffthreadVideoCacheSizeInBytes((prev) => {
82
+ if (prev === null) {
83
+ throw new TypeError('Expected previous value');
84
+ }
85
+ if (typeof cb === 'function') {
86
+ return cb(prev);
87
+ }
88
+ return cb;
89
+ });
90
+ }, [setOffthreadVideoCacheSizeInBytes]);
72
91
  return ((0, jsx_runtime_1.jsxs)("div", { style: container, className: is_menu_item_1.VERTICAL_SCROLLBAR_CLASSNAME, children: [renderMode === 'video' && codec === 'h264' ? ((0, jsx_runtime_1.jsxs)("div", { style: layout_1.optionRow, children: [(0, jsx_runtime_1.jsx)("div", { style: layout_1.label, children: "x264 Preset" }), (0, jsx_runtime_1.jsx)("div", { style: layout_1.rightRow, children: (0, jsx_runtime_1.jsx)(ComboBox_1.Combobox, { title: x264Preset, selectedId: x264Preset, values: x264PresetOptions }) })] })) : null, renderMode === 'still' ? null : ((0, jsx_runtime_1.jsx)(NumberSetting_1.NumberSetting, { min: minConcurrency, max: maxConcurrency, step: 1, name: "Concurrency", formatter: (w) => `${w}x`, onValueChanged: setConcurrency, value: concurrency })), (0, jsx_runtime_1.jsx)(NumberSetting_1.NumberSetting
73
92
  // Also appears in packages/renderer/src/validate-puppeteer-timeout.ts
74
93
  , {
75
94
  // Also appears in packages/renderer/src/validate-puppeteer-timeout.ts
76
- min: 7000, max: 900000, name: "delayRender() timeout", onValueChanged: setDelayRenderTimeout, formatter: (w) => `${w}ms`, step: 1000, value: delayRenderTimeout }), (0, jsx_runtime_1.jsxs)("div", { style: layout_1.optionRow, children: [(0, jsx_runtime_1.jsx)("div", { style: layout_1.label, children: "No parallel encoding" }), (0, jsx_runtime_1.jsx)("div", { style: layout_1.rightRow, children: (0, jsx_runtime_1.jsx)(Checkbox_1.Checkbox, { checked: disallowParallelEncoding, onChange: onDisallowParallelEncodingChanged, name: "disallow-parallel-encoding" }) })] }), (0, jsx_runtime_1.jsxs)("div", { style: layout_1.optionRow, children: [(0, jsx_runtime_1.jsx)("div", { style: layout_1.label, children: "Verbose logging" }), (0, jsx_runtime_1.jsx)("div", { style: layout_1.rightRow, children: (0, jsx_runtime_1.jsx)(Checkbox_1.Checkbox, { checked: verbose, onChange: onVerboseLoggingChanged, name: "verbose-logging" }) })] }), (0, jsx_runtime_1.jsx)(RenderModalHr_1.RenderModalHr, {}), (0, jsx_runtime_1.jsxs)("div", { style: layout_1.optionRow, children: [(0, jsx_runtime_1.jsx)("div", { style: layout_1.label, children: "Disable web security" }), (0, jsx_runtime_1.jsx)("div", { style: layout_1.rightRow, children: (0, jsx_runtime_1.jsx)(Checkbox_1.Checkbox, { checked: disableWebSecurity, onChange: onDisableWebSecurityChanged, name: "disable-web-security" }) })] }), (0, jsx_runtime_1.jsxs)("div", { style: layout_1.optionRow, children: [(0, jsx_runtime_1.jsx)("div", { style: layout_1.label, children: "Ignore certificate errors " }), (0, jsx_runtime_1.jsx)("div", { style: layout_1.rightRow, children: (0, jsx_runtime_1.jsx)(Checkbox_1.Checkbox, { checked: ignoreCertificateErrors, onChange: onIgnoreCertificatErrors, name: "ignore-certificate-errors" }) })] }), (0, jsx_runtime_1.jsxs)("div", { style: layout_1.optionRow, children: [(0, jsx_runtime_1.jsx)("div", { style: layout_1.label, children: "Headless mode" }), (0, jsx_runtime_1.jsx)("div", { style: layout_1.rightRow, children: (0, jsx_runtime_1.jsx)(Checkbox_1.Checkbox, { checked: headless, onChange: onHeadless, name: "headless" }) })] }), (0, jsx_runtime_1.jsxs)("div", { style: layout_1.optionRow, children: [(0, jsx_runtime_1.jsx)("div", { style: layout_1.label, children: "OpenGL render backend" }), (0, jsx_runtime_1.jsx)("div", { style: layout_1.rightRow, children: (0, jsx_runtime_1.jsx)(ComboBox_1.Combobox, { values: openGlOptions, selectedId: openGlOption, title: "OpenGl option" }) })] }), (0, jsx_runtime_1.jsx)(RenderModalHr_1.RenderModalHr, {}), (0, jsx_runtime_1.jsx)(RenderModalEnvironmentVariables_1.RenderModalEnvironmentVariables, { envVariables: envVariables, setEnvVariables: setEnvVariables })] }));
95
+ min: 7000, max: 900000, name: "delayRender() timeout", onValueChanged: setDelayRenderTimeout, formatter: (w) => `${w}ms`, step: 1000, value: delayRenderTimeout }), (0, jsx_runtime_1.jsxs)("div", { style: layout_1.optionRow, children: [(0, jsx_runtime_1.jsx)("div", { style: layout_1.label, children: "No parallel encoding" }), (0, jsx_runtime_1.jsx)("div", { style: layout_1.rightRow, children: (0, jsx_runtime_1.jsx)(Checkbox_1.Checkbox, { checked: disallowParallelEncoding, onChange: onDisallowParallelEncodingChanged, name: "disallow-parallel-encoding" }) })] }), renderMode === 'audio' ? null : ((0, jsx_runtime_1.jsxs)("div", { style: layout_1.optionRow, children: [(0, jsx_runtime_1.jsx)("div", { style: layout_1.label, children: "Custom OffthreadVideo cache" }), (0, jsx_runtime_1.jsx)("div", { style: layout_1.rightRow, children: (0, jsx_runtime_1.jsx)(Checkbox_1.Checkbox, { checked: offthreadVideoCacheSizeInBytes !== null, onChange: toggleCustomOffthreadVideoCacheSizeInBytes, name: "custom-audio-bitrate" }) })] })), renderMode === 'audio' ||
96
+ offthreadVideoCacheSizeInBytes === null ? null : ((0, jsx_runtime_1.jsx)(NumberSetting_1.NumberSetting, { min: minConcurrency, max: 2000 * 1024 * 1024, step: 1024, name: "OffthreadVideo cache size", formatter: (w) => `${w} bytes`, onValueChanged: changeOffthreadVideoCacheSizeInBytes, value: offthreadVideoCacheSizeInBytes })), (0, jsx_runtime_1.jsxs)("div", { style: layout_1.optionRow, children: [(0, jsx_runtime_1.jsx)("div", { style: layout_1.label, children: "Verbose logging" }), (0, jsx_runtime_1.jsx)("div", { style: layout_1.rightRow, children: (0, jsx_runtime_1.jsx)(Checkbox_1.Checkbox, { checked: verbose, onChange: onVerboseLoggingChanged, name: "verbose-logging" }) })] }), (0, jsx_runtime_1.jsx)(RenderModalHr_1.RenderModalHr, {}), (0, jsx_runtime_1.jsxs)("div", { style: layout_1.optionRow, children: [(0, jsx_runtime_1.jsx)("div", { style: layout_1.label, children: "Disable web security" }), (0, jsx_runtime_1.jsx)("div", { style: layout_1.rightRow, children: (0, jsx_runtime_1.jsx)(Checkbox_1.Checkbox, { checked: disableWebSecurity, onChange: onDisableWebSecurityChanged, name: "disable-web-security" }) })] }), (0, jsx_runtime_1.jsxs)("div", { style: layout_1.optionRow, children: [(0, jsx_runtime_1.jsx)("div", { style: layout_1.label, children: "Ignore certificate errors " }), (0, jsx_runtime_1.jsx)("div", { style: layout_1.rightRow, children: (0, jsx_runtime_1.jsx)(Checkbox_1.Checkbox, { checked: ignoreCertificateErrors, onChange: onIgnoreCertificatErrors, name: "ignore-certificate-errors" }) })] }), (0, jsx_runtime_1.jsxs)("div", { style: layout_1.optionRow, children: [(0, jsx_runtime_1.jsx)("div", { style: layout_1.label, children: "Headless mode" }), (0, jsx_runtime_1.jsx)("div", { style: layout_1.rightRow, children: (0, jsx_runtime_1.jsx)(Checkbox_1.Checkbox, { checked: headless, onChange: onHeadless, name: "headless" }) })] }), (0, jsx_runtime_1.jsxs)("div", { style: layout_1.optionRow, children: [(0, jsx_runtime_1.jsx)("div", { style: layout_1.label, children: "OpenGL render backend" }), (0, jsx_runtime_1.jsx)("div", { style: layout_1.rightRow, children: (0, jsx_runtime_1.jsx)(ComboBox_1.Combobox, { values: openGlOptions, selectedId: openGlOption, title: "OpenGl option" }) })] }), (0, jsx_runtime_1.jsx)(RenderModalHr_1.RenderModalHr, {}), (0, jsx_runtime_1.jsx)(RenderModalEnvironmentVariables_1.RenderModalEnvironmentVariables, { envVariables: envVariables, setEnvVariables: setEnvVariables })] }));
77
97
  };
78
98
  exports.RenderModalAdvanced = RenderModalAdvanced;
@@ -3,7 +3,7 @@ import React from 'react';
3
3
  import type { SegmentedControlItem } from '../SegmentedControl';
4
4
  import type { RenderType } from './RenderModalAdvanced';
5
5
  declare const qualityControlModes: readonly ["crf", "bitrate"];
6
- export type QualityControl = typeof qualityControlModes[number];
6
+ export type QualityControl = (typeof qualityControlModes)[number];
7
7
  export declare const RenderModalPicture: React.FC<{
8
8
  renderMode: RenderType;
9
9
  scale: number;
@@ -0,0 +1,14 @@
1
+ export type SerializedJSONWithCustomFields = {
2
+ serializedString: string;
3
+ customDateUsed: boolean;
4
+ customFileUsed: boolean;
5
+ mapUsed: boolean;
6
+ setUsed: boolean;
7
+ };
8
+ export declare const FILE_TOKEN = "remotion-file:";
9
+ export declare const serializeJSONWithDate: ({ data, indent, staticBase, }: {
10
+ data: unknown;
11
+ indent: number | undefined;
12
+ staticBase: string;
13
+ }) => SerializedJSONWithCustomFields;
14
+ export declare const deserializeJSONWithCustomFields: (data: string) => any;
@@ -0,0 +1,42 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.deserializeJSONWithCustomFields = exports.serializeJSONWithDate = exports.FILE_TOKEN = void 0;
4
+ const DATE_TOKEN = 'remotion-date:';
5
+ exports.FILE_TOKEN = 'remotion-file:';
6
+ const serializeJSONWithDate = ({ data, indent, staticBase, }) => {
7
+ let customDateUsed = false;
8
+ let customFileUsed = false;
9
+ let mapUsed = false;
10
+ let setUsed = false;
11
+ const serializedString = JSON.stringify(data, function (key, value) {
12
+ const item = this[key];
13
+ if (item instanceof Date) {
14
+ customDateUsed = true;
15
+ return `${DATE_TOKEN}${item.toISOString()}`;
16
+ }
17
+ if (item instanceof Map) {
18
+ mapUsed = true;
19
+ return value;
20
+ }
21
+ if (item instanceof Set) {
22
+ setUsed = true;
23
+ return value;
24
+ }
25
+ if (typeof item === 'string' && item.startsWith(staticBase)) {
26
+ customFileUsed = true;
27
+ return `${exports.FILE_TOKEN}${item.replace(staticBase + '/', '')}`;
28
+ }
29
+ return value;
30
+ }, indent);
31
+ return { serializedString, customDateUsed, customFileUsed, mapUsed, setUsed };
32
+ };
33
+ exports.serializeJSONWithDate = serializeJSONWithDate;
34
+ const deserializeJSONWithCustomFields = (data) => {
35
+ return JSON.parse(data, (_, value) => {
36
+ if (typeof value === 'string' && value.startsWith(DATE_TOKEN)) {
37
+ return new Date(value.replace(DATE_TOKEN, ''));
38
+ }
39
+ return value;
40
+ });
41
+ };
42
+ exports.deserializeJSONWithCustomFields = deserializeJSONWithCustomFields;
@@ -12,7 +12,7 @@ exports.optionRow = {
12
12
  paddingBottom: 8,
13
13
  };
14
14
  exports.label = {
15
- width: 170,
15
+ width: 220,
16
16
  fontSize: 15,
17
17
  lineHeight: '40px',
18
18
  color: colors_1.LIGHT_TEXT,
@@ -2,7 +2,7 @@ import type { AudioCodec, Codec, PixelFormat, ProResProfile, StillImageFormat, V
2
2
  import type { RenderJob } from '../../../preview-server/render-queue/job';
3
3
  import type { RequiredChromiumOptions } from '../../../required-chromium-options';
4
4
  import type { EnumPath } from '../RenderModal/SchemaEditor/extract-enum-json-paths';
5
- export declare const addStillRenderJob: ({ compositionId, outName, imageFormat, jpegQuality, frame, scale, verbose, chromiumOptions, delayRenderTimeout, envVariables, inputProps, }: {
5
+ export declare const addStillRenderJob: ({ compositionId, outName, imageFormat, jpegQuality, frame, scale, verbose, chromiumOptions, delayRenderTimeout, envVariables, inputProps, offthreadVideoCacheSizeInBytes, }: {
6
6
  compositionId: string;
7
7
  outName: string;
8
8
  imageFormat: StillImageFormat;
@@ -14,8 +14,9 @@ export declare const addStillRenderJob: ({ compositionId, outName, imageFormat,
14
14
  delayRenderTimeout: number;
15
15
  envVariables: Record<string, string>;
16
16
  inputProps: Record<string, unknown>;
17
+ offthreadVideoCacheSizeInBytes: number | null;
17
18
  }) => Promise<undefined>;
18
- export declare const addVideoRenderJob: ({ compositionId, outName, imageFormat, jpegQuality, scale, verbose, codec, concurrency, crf, startFrame, endFrame, muted, enforceAudioTrack, proResProfile, x264Preset, pixelFormat, audioBitrate, videoBitrate, everyNthFrame, numberOfGifLoops, delayRenderTimeout, audioCodec, disallowParallelEncoding, chromiumOptions, envVariables, inputProps, }: {
19
+ export declare const addVideoRenderJob: ({ compositionId, outName, imageFormat, jpegQuality, scale, verbose, codec, concurrency, crf, startFrame, endFrame, muted, enforceAudioTrack, proResProfile, x264Preset, pixelFormat, audioBitrate, videoBitrate, everyNthFrame, numberOfGifLoops, delayRenderTimeout, audioCodec, disallowParallelEncoding, chromiumOptions, envVariables, inputProps, offthreadVideoCacheSizeInBytes, }: {
19
20
  compositionId: string;
20
21
  outName: string;
21
22
  imageFormat: VideoImageFormat;
@@ -42,6 +43,7 @@ export declare const addVideoRenderJob: ({ compositionId, outName, imageFormat,
42
43
  chromiumOptions: RequiredChromiumOptions;
43
44
  envVariables: Record<string, string>;
44
45
  inputProps: Record<string, unknown>;
46
+ offthreadVideoCacheSizeInBytes: number | null;
45
47
  }) => Promise<undefined>;
46
48
  export declare const unsubscribeFromFileExistenceWatcher: ({ file, clientId, }: {
47
49
  file: string;
@@ -26,7 +26,7 @@ const callApi = (endpoint, body, signal) => {
26
26
  });
27
27
  });
28
28
  };
29
- const addStillRenderJob = ({ compositionId, outName, imageFormat, jpegQuality, frame, scale, verbose, chromiumOptions, delayRenderTimeout, envVariables, inputProps, }) => {
29
+ const addStillRenderJob = ({ compositionId, outName, imageFormat, jpegQuality, frame, scale, verbose, chromiumOptions, delayRenderTimeout, envVariables, inputProps, offthreadVideoCacheSizeInBytes, }) => {
30
30
  return callApi('/api/render', {
31
31
  compositionId,
32
32
  type: 'still',
@@ -44,10 +44,11 @@ const addStillRenderJob = ({ compositionId, outName, imageFormat, jpegQuality, f
44
44
  staticBase: window.remotion_staticBase,
45
45
  indent: undefined,
46
46
  }).serializedString,
47
+ offthreadVideoCacheSizeInBytes,
47
48
  });
48
49
  };
49
50
  exports.addStillRenderJob = addStillRenderJob;
50
- const addVideoRenderJob = ({ compositionId, outName, imageFormat, jpegQuality, scale, verbose, codec, concurrency, crf, startFrame, endFrame, muted, enforceAudioTrack, proResProfile, x264Preset, pixelFormat, audioBitrate, videoBitrate, everyNthFrame, numberOfGifLoops, delayRenderTimeout, audioCodec, disallowParallelEncoding, chromiumOptions, envVariables, inputProps, }) => {
51
+ const addVideoRenderJob = ({ compositionId, outName, imageFormat, jpegQuality, scale, verbose, codec, concurrency, crf, startFrame, endFrame, muted, enforceAudioTrack, proResProfile, x264Preset, pixelFormat, audioBitrate, videoBitrate, everyNthFrame, numberOfGifLoops, delayRenderTimeout, audioCodec, disallowParallelEncoding, chromiumOptions, envVariables, inputProps, offthreadVideoCacheSizeInBytes, }) => {
51
52
  return callApi('/api/render', {
52
53
  compositionId,
53
54
  type: 'video',
@@ -80,6 +81,7 @@ const addVideoRenderJob = ({ compositionId, outName, imageFormat, jpegQuality, s
80
81
  staticBase: window.remotion_staticBase,
81
82
  indent: undefined,
82
83
  }).serializedString,
84
+ offthreadVideoCacheSizeInBytes,
83
85
  });
84
86
  };
85
87
  exports.addVideoRenderJob = addVideoRenderJob;