Skip to content

🎥 Make videos programmatically with React

removed --png documentation,add bitrate for ffmpeg

Shankhadeep Dey410e4f741d25
diff --git a/packages/cli/src/image-formats.ts b/packages/cli/src/image-formats.ts
index c4c7149054..f6e57fcce2 100644
--- a/packages/cli/src/image-formats.ts
+++ b/packages/cli/src/image-formats.ts
@@ -3,10 +3,10 @@ import {OutputFormat} from 'remotion';
export type FrameFormat = 'png' | 'jpeg';
export const getFrameFormat = (format: OutputFormat): FrameFormat => {
- if (format === 'mp4' || format === 'webm-v8' || format === 'webm-v9') {
+ if (format === 'mp4') {
return 'jpeg';
}
- if (format === 'png') {
+ if (format === 'png' || format === 'webm-v8' || format === 'webm-v9') {
return 'png';
}
throw new Error('Unrecognized render mode ' + format);
diff --git a/packages/core/src/config/index.ts b/packages/core/src/config/index.ts
index 8580a1e75d..a21bc40f08 100644
--- a/packages/core/src/config/index.ts
+++ b/packages/core/src/config/index.ts
@@ -45,7 +45,7 @@ export const Config = {
*/
setPixelFormat,
/**
- * Specify what kind of output you, want, either 'mp4' or 'png'.
+ * Specify what kind of output you, want, either 'mp4' or 'png' or 'webm-v8' or 'webm-v8'.
* Default: 'mp4'
*/
setOutputFormat,
diff --git a/packages/docs/docs/cli.md b/packages/docs/docs/cli.md
index e56b243ceb..d183c28704 100644
--- a/packages/docs/docs/cli.md
+++ b/packages/docs/docs/cli.md
@@ -15,12 +15,6 @@ Besides choosing a video and output location with the command line arguments, th
- `--props`: React Props to pass to the root component of your video. Must be a serialized JSON string.
- `--concurrency`: [How many CPU threads to use.](config#setconcurrency) Minimum 1. The maximum is the amount of threads you have.
-- `--png`: [Render a PNG sequence with transparency instead.](config#setoutputformat) If you use this option, the output location you pass must be a folder name. It will override `--format` flag.
-
-:::warning
-`--png` will be deprecated in thee upcoming major version release. Use `--format=png` instead of `--png` flag.
-:::
-
- `--pixel-format`: [Set a custom pixel format. See here for available values.](config#setpixelformat)
- `--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.
diff --git a/packages/renderer/src/stitcher.ts b/packages/renderer/src/stitcher.ts
index 80ea5be20e..995abb42fc 100644
--- a/packages/renderer/src/stitcher.ts
+++ b/packages/renderer/src/stitcher.ts
@@ -47,6 +47,8 @@ export const stitchFramesToVideo = async (options: {
: 'libvpx-vp9',
'-crf',
'16',
+ '-b:v',
+ '1M',
options.force ? '-y' : null,
'-pix_fmt',
options.pixelFormat ?? 'yuv420p',