Skip to content

🎥 Make videos programmatically with React

automtically render in prores if you specify .mov

Jonny Burgerb479dcabaf58
diff --git a/packages/cli/src/get-filename.ts b/packages/cli/src/get-filename.ts
index 539b34df1c..00b73a4842 100644
--- a/packages/cli/src/get-filename.ts
+++ b/packages/cli/src/get-filename.ts
@@ -5,8 +5,6 @@ import {
getUserPassedOutputLocation,
} from './user-passed-output-location';
-// TODO: Validate ProRes
-
// eslint-disable-next-line complexity
export const getOutputFilename = (
codec: Codec,
diff --git a/packages/core/src/config/codec.ts b/packages/core/src/config/codec.ts
index 05e61ac606..384a580352 100644
--- a/packages/core/src/config/codec.ts
+++ b/packages/core/src/config/codec.ts
@@ -22,6 +22,7 @@ export const getOutputCodecOrUndefined = (): CodecOrUndefined => {
export const DEFAULT_CODEC: Codec = 'h264';
+// eslint-disable-next-line complexity
export const getFinalOutputCodec = ({
codec: inputCodec,
fileExtension,
@@ -61,6 +62,16 @@ export const getFinalOutputCodec = ({
return 'mp3';
}
+ if (inputCodec === undefined && fileExtension === 'mov') {
+ if (emitWarning) {
+ console.info(
+ 'You have specified a .mov extension, using the Apple ProRes encoder.'
+ );
+ }
+
+ return 'prores';
+ }
+
if (inputCodec === undefined && fileExtension === 'wav') {
if (emitWarning) {
console.info(
diff --git a/packages/docs/docs/transparent-videos.mdx b/packages/docs/docs/transparent-videos.mdx
index f6af2425bf..84f2ff3726 100644
--- a/packages/docs/docs/transparent-videos.mdx
+++ b/packages/docs/docs/transparent-videos.mdx
@@ -11,7 +11,7 @@ If you are lucky enough to visit the website in one of those supported web brows
<TransparentVideoDemo />
-## Creating a WebM with Alpha channel
+## Creating a WebM video with Alpha channel
In order to create a transparent video, you need at least version 1.4 of Remotion. Make sure to not set any background (use the checkerboard button to ensure your video is transparent). In order to render your videos transparent, you need to change 3 settings:
@@ -35,7 +35,7 @@ You can also set the settings on the command line:
--image-format=png --pixel-format=yuva420p --codec=vp8
```
-## Creating a ProRes with Alpha channels
+## Creating a ProRes video with Alpha channels
If you want to export a transparent video for use in another video editing program, and you are using macOS, ProRes is a more suitable option.