🎥 Make videos programmatically with React
pass through
JonnyBurger37b0918a7890
diff --git a/packages/cli/src/benchmark.ts b/packages/cli/src/benchmark.tsindex 3dd6e8246f..2df9a95262 100644--- a/packages/cli/src/benchmark.ts+++ b/packages/cli/src/benchmark.ts@@ -72,6 +72,7 @@ const {overrideWidthOption,overrideFpsOption,overrideDurationOption,+ bundleCacheOption,} = BrowserSafeApis.options;const getValidConcurrency = (cliConcurrency: number | string | null) => {@@ -280,6 +281,9 @@ export const benchmarkCommand = async (const keyboardShortcutsEnabled = keyboardShortcutsOption.getValue({commandLine: parsedCli,}).value;+ const shouldCache = bundleCacheOption.getValue({+ commandLine: parsedCli,+ }).value;if (experimentalClientSideRenderingEnabled) {Log.warn(@@ -352,6 +356,7 @@ export const benchmarkCommand = async (experimentalClientSideRenderingEnabled,askAIEnabled,keyboardShortcutsEnabled,+ shouldCache,});registerCleanupJob(`Deleting bundle`, () => cleanupBundle());diff --git a/packages/cli/src/bundle.ts b/packages/cli/src/bundle.tsindex 6c85fefca7..ff0e56b4a6 100644--- a/packages/cli/src/bundle.ts+++ b/packages/cli/src/bundle.ts@@ -22,6 +22,7 @@ const {experimentalClientSideRenderingOption,keyboardShortcutsOption,outDirOption,+ bundleCacheOption,} = BrowserSafeApis.options;export const bundleCommand = async (@@ -74,6 +75,9 @@ export const bundleCommand = async (const keyboardShortcutsEnabled = keyboardShortcutsOption.getValue({commandLine: parsedCli,}).value;+ const shouldCache = bundleCacheOption.getValue({+ commandLine: parsedCli,+ }).value;if (experimentalClientSideRenderingEnabled) {Log.warn(@@ -162,6 +166,7 @@ export const bundleCommand = async (experimentalClientSideRenderingEnabled,askAIEnabled,keyboardShortcutsEnabled,+ shouldCache,});Log.info(diff --git a/packages/cli/src/compositions.ts b/packages/cli/src/compositions.tsindex 0f0deb39d8..0b6e60766c 100644--- a/packages/cli/src/compositions.ts+++ b/packages/cli/src/compositions.ts@@ -33,6 +33,7 @@ const {userAgentOption,disableWebSecurityOption,ignoreCertificateErrorsOption,+ bundleCacheOption,} = BrowserSafeApis.options;export const listCompositionsCommand = async (@@ -135,6 +136,9 @@ export const listCompositionsCommand = async (const keyboardShortcutsEnabled = keyboardShortcutsOption.getValue({commandLine: parsedCli,}).value;+ const shouldCache = bundleCacheOption.getValue({+ commandLine: parsedCli,+ }).value;if (experimentalClientSideRenderingEnabled) {Log.warn(@@ -168,6 +172,7 @@ export const listCompositionsCommand = async (experimentalClientSideRenderingEnabled,askAIEnabled,keyboardShortcutsEnabled,+ shouldCache,});registerCleanupJob(`Cleanup bundle`, () => cleanupBundle());diff --git a/packages/cli/src/render-flows/render.ts b/packages/cli/src/render-flows/render.tsindex 2aca245daf..2fc509d757 100644--- a/packages/cli/src/render-flows/render.ts+++ b/packages/cli/src/render-flows/render.ts@@ -129,6 +129,7 @@ export const renderVideoFlow = async ({askAIEnabled,experimentalClientSideRenderingEnabled,keyboardShortcutsEnabled,+ shouldCache,}: {remotionRoot: string;fullEntryPoint: string;@@ -194,6 +195,7 @@ export const renderVideoFlow = async ({askAIEnabled: boolean;experimentalClientSideRenderingEnabled: boolean;keyboardShortcutsEnabled: boolean;+ shouldCache: boolean;}) => {let bundlingProgress: BundlingState | null = null;let renderingProgress: RenderingProgressInput | null = null;@@ -337,6 +339,7 @@ export const renderVideoFlow = async ({experimentalClientSideRenderingEnabled,askAIEnabled,keyboardShortcutsEnabled,+ shouldCache,},);diff --git a/packages/cli/src/render-flows/still.ts b/packages/cli/src/render-flows/still.tsindex 7521da8cfd..d18a329800 100644--- a/packages/cli/src/render-flows/still.ts+++ b/packages/cli/src/render-flows/still.ts@@ -87,6 +87,7 @@ export const renderStillFlow = async ({askAIEnabled,experimentalClientSideRenderingEnabled,keyboardShortcutsEnabled,+ shouldCache,}: {remotionRoot: string;fullEntryPoint: string;@@ -126,6 +127,7 @@ export const renderStillFlow = async ({askAIEnabled: boolean;experimentalClientSideRenderingEnabled: boolean;keyboardShortcutsEnabled: boolean;+ shouldCache: boolean;}) => {const isVerbose = RenderInternals.isEqualOrBelowLogLevel(logLevel, 'verbose');Log.verbose(@@ -229,6 +231,7 @@ export const renderStillFlow = async ({experimentalClientSideRenderingEnabled,askAIEnabled,keyboardShortcutsEnabled,+ shouldCache,},);diff --git a/packages/cli/src/render-queue/process-still.ts b/packages/cli/src/render-queue/process-still.tsindex 904e47ee74..8a642d4b3e 100644--- a/packages/cli/src/render-queue/process-still.ts+++ b/packages/cli/src/render-queue/process-still.ts@@ -11,6 +11,7 @@ const {experimentalClientSideRenderingOption,keyboardShortcutsOption,browserExecutableOption,+ bundleCacheOption,} = BrowserSafeApis.options;export const processStill = async ({@@ -45,6 +46,9 @@ export const processStill = async ({const keyboardShortcutsEnabled = keyboardShortcutsOption.getValue({commandLine: parsedCli,}).value;+ const shouldCache = bundleCacheOption.getValue({+ commandLine: parsedCli,+ }).value;const fullEntryPoint = convertEntryPointToServeUrl(entryPoint);@@ -88,5 +92,6 @@ export const processStill = async ({askAIEnabled,experimentalClientSideRenderingEnabled,keyboardShortcutsEnabled,+ shouldCache,});};diff --git a/packages/cli/src/render-queue/process-video.ts b/packages/cli/src/render-queue/process-video.tsindex eda077a1cc..a6618ae9b1 100644--- a/packages/cli/src/render-queue/process-video.ts+++ b/packages/cli/src/render-queue/process-video.ts@@ -13,6 +13,7 @@ const {experimentalClientSideRenderingOption,keyboardShortcutsOption,browserExecutableOption,+ bundleCacheOption,} = BrowserSafeApis.options;export const processVideoJob = async ({@@ -41,6 +42,9 @@ export const processVideoJob = async ({const keyboardShortcutsEnabled = keyboardShortcutsOption.getValue({commandLine: parsedCli,}).value;+ const shouldCache = bundleCacheOption.getValue({+ commandLine: parsedCli,+ }).value;const {ffmpegOverride} = getCliOptions({isStill: true,@@ -123,5 +127,6 @@ export const processVideoJob = async ({experimentalClientSideRenderingOption.getValue({commandLine: parsedCli}).value,keyboardShortcutsEnabled,+ shouldCache,});};diff --git a/packages/cli/src/render.tsx b/packages/cli/src/render.tsxindex f34715dc38..bcdee69c71 100644--- a/packages/cli/src/render.tsx+++ b/packages/cli/src/render.tsx@@ -60,6 +60,7 @@ const {overrideWidthOption,overrideFpsOption,overrideDurationOption,+ bundleCacheOption,} = BrowserSafeApis.options;export const render = async (@@ -246,6 +247,9 @@ export const render = async (const mediaCacheSizeInBytes = mediaCacheSizeInBytesOption.getValue({commandLine: parsedCli,}).value;+ const shouldCache = bundleCacheOption.getValue({+ commandLine: parsedCli,+ }).value;await renderVideoFlow({fullEntryPoint,@@ -321,5 +325,6 @@ export const render = async (experimentalClientSideRenderingOption.getValue({commandLine: parsedCli}).value,keyboardShortcutsEnabled,+ shouldCache,});};diff --git a/packages/cli/src/setup-cache.ts b/packages/cli/src/setup-cache.tsindex 7701c8383f..517758fe31 100644--- a/packages/cli/src/setup-cache.ts+++ b/packages/cli/src/setup-cache.ts@@ -2,7 +2,6 @@ import type {MandatoryLegacyBundleOptions} from '@remotion/bundler';import {BundlerInternals} from '@remotion/bundler';import type {LogLevel} from '@remotion/renderer';import {RenderInternals} from '@remotion/renderer';-import {BrowserSafeApis} from '@remotion/renderer/client';import type {BundlingState, CopyingState} from '@remotion/studio-server';import type {GitSource} from '@remotion/studio-shared';import {existsSync} from 'fs';@@ -36,6 +35,7 @@ export const bundleOnCliOrTakeServeUrl = async ({experimentalClientSideRenderingEnabled,askAIEnabled,keyboardShortcutsEnabled,+ shouldCache,}: {fullPath: string;remotionRoot: string;@@ -58,6 +58,7 @@ export const bundleOnCliOrTakeServeUrl = async ({experimentalClientSideRenderingEnabled: boolean;askAIEnabled: boolean;keyboardShortcutsEnabled: boolean;+ shouldCache: boolean;}): Promise<{urlOrBundle: string;cleanup: () => void;@@ -101,6 +102,7 @@ export const bundleOnCliOrTakeServeUrl = async ({experimentalClientSideRenderingEnabled,askAIEnabled,keyboardShortcutsEnabled,+ shouldCache,});return {@@ -128,6 +130,7 @@ export const bundleOnCli = async ({experimentalClientSideRenderingEnabled,askAIEnabled,keyboardShortcutsEnabled,+ shouldCache,}: {fullPath: string;remotionRoot: string;@@ -150,11 +153,8 @@ export const bundleOnCli = async ({experimentalClientSideRenderingEnabled: boolean;keyboardShortcutsEnabled: boolean;askAIEnabled: boolean;+ shouldCache: boolean;}) => {- const shouldCache = BrowserSafeApis.options.bundleCacheOption.getValue({- commandLine: {},- }).value;-const symlinkState: SymbolicLinksState = {symlinks: [],};diff --git a/packages/cli/src/still.ts b/packages/cli/src/still.tsindex c8b03d0b41..3caf73681c 100644--- a/packages/cli/src/still.ts+++ b/packages/cli/src/still.ts@@ -38,6 +38,7 @@ const {overrideWidthOption,overrideFpsOption,overrideDurationOption,+ bundleCacheOption,} = BrowserSafeApis.options;export const still = async (@@ -154,6 +155,9 @@ export const still = async (const keyboardShortcutsEnabled = keyboardShortcutsOption.getValue({commandLine: parsedCli,}).value;+ const shouldCache = bundleCacheOption.getValue({+ commandLine: parsedCli,+ }).value;const chromiumOptions: Required<ChromiumOptions> = {disableWebSecurity,@@ -213,5 +217,6 @@ export const still = async (experimentalClientSideRenderingOption.getValue({commandLine: parsedCli}).value,keyboardShortcutsEnabled,+ shouldCache,});};diff --git a/packages/renderer/src/options/concurrency.tsx b/packages/renderer/src/options/concurrency.tsxindex 3243305bdb..c9bb2d7c91 100644--- a/packages/renderer/src/options/concurrency.tsx+++ b/packages/renderer/src/options/concurrency.tsx@@ -48,6 +48,12 @@ export const concurrencyOption = {};},setConfig: (value) => {+ validateConcurrency({+ value,+ setting: 'Config.setConcurrency',+ checkIfValidForCurrentMachine: false,+ });+currentConcurrency = value;},id: cliFlag,