π₯ Make videos programmatically with React
crf Tooltip
Patric Salvisberg88548275d512
diff --git a/packages/cli/src/editor/components/RenderModal/RenderModalPicture.tsx b/packages/cli/src/editor/components/RenderModal/RenderModalPicture.tsxindex e837ae4c0a..cad8690934 100644--- a/packages/cli/src/editor/components/RenderModal/RenderModalPicture.tsx+++ b/packages/cli/src/editor/components/RenderModal/RenderModalPicture.tsx@@ -138,6 +138,7 @@ export const RenderModalPicture: React.FC<{onValueChanged={setCrf}value={crf}step={1}+ hint={BrowserSafeApis.options.crfOption}/>) : null}{qualityControlType === 'bitrate' && renderMode !== 'still' ? (diff --git a/packages/renderer/src/client.ts b/packages/renderer/src/client.tsindex 02f93261ff..2ebcef9942 100644--- a/packages/renderer/src/client.ts+++ b/packages/renderer/src/client.ts@@ -11,6 +11,7 @@ import {getFileExtensionFromCodec,} from './get-extension-from-codec';import {isAudioCodec} from './is-audio-codec';+import {crfOption} from './options/crf';import {scaleOption} from './options/scale';import {DEFAULT_PIXEL_FORMAT, validPixelFormats} from './pixel-format';import {proResProfileOptions} from './prores-profile';@@ -31,5 +32,6 @@ export const BrowserSafeApis = {defaultCodecsForFileExtension,options: {scaleOption,+ crfOption,},};diff --git a/packages/renderer/src/options/crf.tsx b/packages/renderer/src/options/crf.tsxnew file mode 100644index 0000000000..36eace8eac--- /dev/null+++ b/packages/renderer/src/options/crf.tsx@@ -0,0 +1,16 @@+import type {RemotionOption} from './option';++export const crfOption: RemotionOption = {+ name: 'CRF',+ cliFlag: '--crf',+ description: (+ <>+ No matter which codec you end up using, there's always a tradeoff+ between file size and video quality. You can control it by setting the so+ called CRF (Constant Rate Factor). The lower the number, the better the+ quality, the higher the number, the smaller the file is β of course at the+ cost of quality.+ </>+ ),+ ssrName: 'crf',+};