🎥 Make videos programmatically with React
webm-v9 -> vp9
Jonny Burger194eb265ca5d
diff --git a/packages/cli/src/get-filename.ts b/packages/cli/src/get-filename.tsindex ae7aab4b29..8a8d53eb3b 100644--- a/packages/cli/src/get-filename.ts+++ b/packages/cli/src/get-filename.ts@@ -23,7 +23,7 @@ export const getOutputFilename = (renderMode: OutputFormat): string => {) {filename += '.mp4';}- if (renderMode === 'vp8' || renderMode === 'webm-v9') {+ if (renderMode === 'vp8' || renderMode === 'vp9') {filename += '.webm';}}@@ -37,7 +37,7 @@ export const getOutputFilename = (renderMode: OutputFormat): string => {if (extension === 'webm') {if (renderMode === 'mp4') {console.info(- 'You have specified a .webm extension, encoding it using the default VP8 codec. To use VP9 codec use --format=webm-v9 flag.'+ 'You have specified a .webm extension, encoding it using the default VP8 codec. To use VP9 codec use --format=vp9 flag.');Config.Output.setOutputFormat('vp8');renderMode = 'vp8';@@ -49,7 +49,7 @@ export const getOutputFilename = (renderMode: OutputFormat): string => {process.exit(1);}}- if (renderMode === 'vp8' || renderMode === 'webm-v9') {+ if (renderMode === 'vp8' || renderMode === 'vp9') {if (hasExtension && extension !== 'webm') {console.error('The output filename must end in .webm.');process.exit(1);diff --git a/packages/cli/src/image-formats.ts b/packages/cli/src/image-formats.tsindex d0ac34f763..9bcb74bf4c 100644--- a/packages/cli/src/image-formats.ts+++ b/packages/cli/src/image-formats.ts@@ -8,7 +8,7 @@ export const getFrameFormat = (format: OutputFormat): FrameFormat => {format === 'h264' ||format === 'h265' ||format === 'vp8' ||- format === 'webm-v9'+ format === 'vp9') {return 'jpeg';}diff --git a/packages/cli/src/render.tsx b/packages/cli/src/render.tsxindex 549bccb1cb..e22dd2c5ba 100644--- a/packages/cli/src/render.tsx+++ b/packages/cli/src/render.tsx@@ -46,7 +46,7 @@ export const render = async () => {renderMode === 'h264' ||renderMode === 'h265' ||renderMode === 'vp8' ||- renderMode === 'webm-v9'+ renderMode === 'vp9') {await validateFfmpeg();}@@ -125,7 +125,7 @@ export const render = async () => {renderMode === 'h264' ||renderMode === 'h265' ||renderMode === 'vp8' ||- renderMode === 'webm-v9'+ renderMode === 'vp9') {process.stdout.write(`🧵 (3/${steps}) Stitching frames together...\n`);await stitchFramesToVideo({diff --git a/packages/core/src/config/render-mode.ts b/packages/core/src/config/render-mode.tsindex 6a58e62365..14ebd8d349 100644--- a/packages/core/src/config/render-mode.ts+++ b/packages/core/src/config/render-mode.ts@@ -1,11 +1,4 @@-const validRenderModes = [- 'png',- 'mp4',- 'h264',- 'h265',- 'vp8',- 'webm-v9',-] as const;+const validRenderModes = ['png', 'mp4', 'h264', 'h265', 'vp8', 'vp9'] as const;export type OutputFormat = typeof validRenderModes[number];diff --git a/packages/docs/docs/cli.md b/packages/docs/docs/cli.mdindex db55dde60e..9f85e56710 100644--- a/packages/docs/docs/cli.md+++ b/packages/docs/docs/cli.md@@ -19,7 +19,7 @@ Besides choosing a video and output location with the command line arguments, th- `--config`: Specify a location for the Remotion config file.- `--quality`: [Value between 0 and 100 for JPEG rendering quality](config#setquality). Doesn't work when `--png` is set.- `--overwrite`: [Write to output even if file already exists.](config#setoverwriteoutput)-- `--format`: [Either `mp4`(is an alias for 'h264') or 'h264' or 'h265' or `png` or `vp8` or `webm-v9`](config#setoutputformat). If you don't supply `--format` flag `--format=mp4` is the default behaviour which uses the default h264 codec.+- `--format`: [Either `mp4`(is an alias for 'h264') or 'h264' or 'h265' or `png` or `vp8` or `vp9`](config#setoutputformat). If you don't supply `--format` flag `--format=mp4` is the default behaviour which uses the default h264 codec.:::infoIf you supply `--png` and `--format` flag both, `--format` flag will take precedence over `--png` flag.diff --git a/packages/docs/docs/config.md b/packages/docs/docs/config.mdindex f511a86529..9368a033f1 100644--- a/packages/docs/docs/config.md+++ b/packages/docs/docs/config.md@@ -67,7 +67,7 @@ The [command line flag](cli) `--pixel-format` will take precedene over this opti### setOutputFormat()-Either `'mp4'` or `'h264'` or `'h265'` or `'png'` or `'vp8'` or `'webm-v9'`. Use the PNG sequence option if you want transparency in your output.+Either `'mp4'` or `'h264'` or `'h265'` or `'png'` or `'vp8'` or `'vp9'`. Use the PNG sequence option if you want transparency in your output.```tsxConfig.output.setOutputFormat('png');