🎥 Make videos programmatically with React
x264Preset
Jonny Burgerce9ae5a4d089
diff --git a/packages/cloudrun/src/cli/commands/render/index.ts b/packages/cloudrun/src/cli/commands/render/index.tsindex 5814c60303..12b735c544 100644--- a/packages/cloudrun/src/cli/commands/render/index.ts+++ b/packages/cloudrun/src/cli/commands/render/index.ts@@ -2,6 +2,7 @@ import {CliInternals} from '@remotion/cli';import {ConfigInternals} from '@remotion/cli/config';import type {LogLevel} from '@remotion/renderer';import {RenderInternals} from '@remotion/renderer';+import {BrowserSafeApis} from '@remotion/renderer/client';import {NoReactInternals} from 'remotion/no-react';import {downloadFile} from '../../../api/download-file';import {internalRenderMediaOnCloudrun} from '../../../api/render-media-on-cloudrun';@@ -51,7 +52,6 @@ export const renderCommand = async (puppeteerTimeout,pixelFormat,proResProfile,- x264Preset,jpegQuality,scale,everyNthFrame,@@ -182,6 +182,10 @@ ${downloadName ? ` Downloaded File = ${downloadName}` : ''}}};+ const x264Preset = BrowserSafeApis.options.x264Option.getValue({+ commandLine: CliInternals.parsedCli,+ }).value;+const res = await internalRenderMediaOnCloudrun({cloudRunUrl,serviceName: undefined,diff --git a/packages/lambda/src/cli/commands/render/render.ts b/packages/lambda/src/cli/commands/render/render.tsindex a8afa6b1ee..82b7729205 100644--- a/packages/lambda/src/cli/commands/render/render.ts+++ b/packages/lambda/src/cli/commands/render/render.ts@@ -2,6 +2,7 @@ import {CliInternals} from '@remotion/cli';import {ConfigInternals} from '@remotion/cli/config';import type {LogLevel} from '@remotion/renderer';import {RenderInternals} from '@remotion/renderer';+import {BrowserSafeApis} from '@remotion/renderer/client';import {NoReactInternals} from 'remotion/no-react';import {downloadMedia} from '../../../api/download-media';import {getRenderProgress} from '../../../api/get-render-progress';@@ -84,7 +85,6 @@ export const renderCommand = async (offthreadVideoCacheSizeInBytes,colorSpace,deleteAfter,- x264Preset,} = CliInternals.getCliOptions({type: 'series',isLambda: true,@@ -92,6 +92,10 @@ export const renderCommand = async (logLevel,});+ const x264Preset = BrowserSafeApis.options.x264Option.getValue({+ commandLine: CliInternals.parsedCli,+ }).value;+let composition: string = args[1];if (!composition) {Log.info('No compositions passed. Fetching compositions...');