Skip to content

🎥 Make videos programmatically with React

remove setOutputFormat()

Jonny Burger4d20aa64cb56
diff --git a/packages/cli/src/config/codec.ts b/packages/cli/src/config/codec.ts
index 14ef2bd960..e2addf5230 100644
--- a/packages/cli/src/config/codec.ts
+++ b/packages/cli/src/config/codec.ts
@@ -1,10 +1,5 @@
import type {CodecOrUndefined} from '@remotion/renderer';
import {RenderInternals} from '@remotion/renderer';
-import {Log} from '../log';
-
-const validLegacyFormats = ['mp4', 'png-sequence'] as const;
-
-type LegacyFormat = typeof validLegacyFormats[number];
let codec: CodecOrUndefined;
@@ -28,30 +23,3 @@ export const setCodec = (newCodec: CodecOrUndefined) => {
export const getOutputCodecOrUndefined = (): CodecOrUndefined => {
return codec;
};
-
-export const setOutputFormat = (newLegacyFormat: LegacyFormat) => {
- if (newLegacyFormat === undefined) {
- codec = undefined;
- return;
- }
-
- if (!validLegacyFormats.includes(newLegacyFormat)) {
- throw new Error(
- `Output format must be one of the following: ${validLegacyFormats.join(
- ', '
- )}, but got ${newLegacyFormat}`
- );
- }
-
- Log.warn(
- 'setOutputFormat() is deprecated. Use the setCodec() and setImageSequence() instead.'
- );
- if (newLegacyFormat === 'mp4') {
- codec = 'h264';
- return;
- }
-
- if (newLegacyFormat === 'png-sequence') {
- codec = undefined;
- }
-};