Skip to content

🎥 Make videos programmatically with React

create option

Jonny Burger1b40a32df93a
diff --git a/packages/cli-autocomplete/src/source.ts b/packages/cli-autocomplete/src/source.ts
index 871247db3e..4bd8dc8fb1 100644
--- a/packages/cli-autocomplete/src/source.ts
+++ b/packages/cli-autocomplete/src/source.ts
@@ -207,6 +207,11 @@ const localRenderOptions: Fig.Option[] = [
name: "--muted",
description: "Mute the output video",
},
+ {
+ name: "--repro",
+ description:
+ "Collect information that you can submit to Remotion if asked for a reproduction",
+ },
];
const stillOptions: Fig.Option[] = [
diff --git a/packages/cli/src/benchmark.ts b/packages/cli/src/benchmark.ts
index 50675ed439..efd5ced284 100644
--- a/packages/cli/src/benchmark.ts
+++ b/packages/cli/src/benchmark.ts
@@ -373,6 +373,7 @@ export const benchmarkCommand = async (
}).serializedString,
offthreadVideoCacheSizeInBytes,
colorSpace,
+ repro: false,
},
(run, progress) => {
benchmarkProgress.update(
diff --git a/packages/cli/src/config/index.ts b/packages/cli/src/config/index.ts
index 786fa861ed..2f183902a4 100644
--- a/packages/cli/src/config/index.ts
+++ b/packages/cli/src/config/index.ts
@@ -464,7 +464,7 @@ declare global {
readonly setBeepOnFinish: (beepOnFinish: boolean) => void;
/**
- * Generate a report during rendering.
+ * Collect information that you can submit to Remotion if asked for a reproduction.
*/
readonly setRepro: (enableRepro: boolean) => void;
}
diff --git a/packages/cli/src/render-flows/render.ts b/packages/cli/src/render-flows/render.ts
index e3e69ece99..2aba748679 100644
--- a/packages/cli/src/render-flows/render.ts
+++ b/packages/cli/src/render-flows/render.ts
@@ -499,7 +499,7 @@ export const renderVideoFlow = async ({
}).serializedString,
offthreadVideoCacheSizeInBytes,
colorSpace,
- repro,
+ repro: repro ?? false,
});
updateRenderProgress({newline: true, printToConsole: true});
diff --git a/packages/cloudrun/src/functions/render-media-single-thread.ts b/packages/cloudrun/src/functions/render-media-single-thread.ts
index e8527e9dba..074d5b9585 100644
--- a/packages/cloudrun/src/functions/render-media-single-thread.ts
+++ b/packages/cloudrun/src/functions/render-media-single-thread.ts
@@ -105,6 +105,7 @@ export const renderMediaSingleThread = async (
server: undefined,
offthreadVideoCacheSizeInBytes: body.offthreadVideoCacheSizeInBytes,
colorSpace: body.colorSpace,
+ repro: false,
});
const storage = new Storage();
diff --git a/packages/lambda/src/functions/renderer.ts b/packages/lambda/src/functions/renderer.ts
index b257699a3d..1bd3f9f5c1 100644
--- a/packages/lambda/src/functions/renderer.ts
+++ b/packages/lambda/src/functions/renderer.ts
@@ -125,6 +125,7 @@ const renderHandler = async (
await new Promise<void>((resolve, reject) => {
RenderInternals.internalRenderMedia({
+ repro: false,
composition: {
id: params.composition,
durationInFrames: params.durationInFrames,
diff --git a/packages/renderer/src/options/index.tsx b/packages/renderer/src/options/index.tsx
index b4af71ef12..69ce48e9d5 100644
--- a/packages/renderer/src/options/index.tsx
+++ b/packages/renderer/src/options/index.tsx
@@ -14,6 +14,7 @@ import {jpegQualityOption} from './jpeg-quality';
import {muteOption} from './mute';
import {numberOfGifLoopsOption} from './number-of-gif-loops';
import {offthreadVideoCacheSizeInBytes} from './offthreadvideo-cache-size';
+import {reproOption} from './repro';
import {scaleOption} from './scale';
import {videoBitrate} from './video-bitrate';
import {videoCodecOption} from './video-codec';
@@ -40,6 +41,7 @@ export const allOptions = {
encodingBufferSizeOption,
beepOnFinishOption,
numberOfGifLoopsOption,
+ reproOption,
};
export type AvailableOptions = keyof typeof allOptions;
diff --git a/packages/renderer/src/options/options-map.ts b/packages/renderer/src/options/options-map.ts
index 56012a4832..2adebd9580 100644
--- a/packages/renderer/src/options/options-map.ts
+++ b/packages/renderer/src/options/options-map.ts
@@ -1,5 +1,6 @@
import {numberOfGifLoopsOption} from './number-of-gif-loops';
import {offthreadVideoCacheSizeInBytes} from './offthreadvideo-cache-size';
+import {reproOption} from './repro';
import {videoBitrate} from './video-bitrate';
export const optionsMap = {
@@ -7,6 +8,7 @@ export const optionsMap = {
offthreadVideoCacheSizeInBytes,
videoBitrate,
numberOfGifLoops: numberOfGifLoopsOption,
+ repro: reproOption,
},
renderStill: {
offthreadVideoCacheSizeInBytes,
diff --git a/packages/renderer/src/options/repro.tsx b/packages/renderer/src/options/repro.tsx
new file mode 100644
index 0000000000..1b3c4f3324
--- /dev/null
+++ b/packages/renderer/src/options/repro.tsx
@@ -0,0 +1,14 @@
+import type {AnyRemotionOption} from './option';
+
+export const reproOption = {
+ name: 'Create reproduction',
+ cliFlag: 'repro',
+ description: () => (
+ <>
+ Create a ZIP that you can submit to Remotion if asked for a reproduction.
+ </>
+ ),
+ ssrName: 'repro',
+ docLink: 'https://www.remotion.dev/docs/render-media#repro',
+ type: false as boolean,
+} satisfies AnyRemotionOption;
diff --git a/packages/renderer/src/render-media.ts b/packages/renderer/src/render-media.ts
index b07abb53f6..8ee707ddc3 100644
--- a/packages/renderer/src/render-media.ts
+++ b/packages/renderer/src/render-media.ts
@@ -130,7 +130,6 @@ export type InternalRenderMediaOptions = {
serveUrl: string;
concurrency: number | string | null;
colorSpace: ColorSpace;
- repro?: boolean;
} & MoreRenderMediaOptions;
type Prettify<T> = {
@@ -888,6 +887,6 @@ export const renderMedia = ({
}).serializedString,
offthreadVideoCacheSizeInBytes: offthreadVideoCacheSizeInBytes ?? null,
colorSpace: colorSpace ?? 'default',
- repro,
+ repro: repro ?? false,
});
};