Skip to content

🎥 Make videos programmatically with React

Update get-filename.ts

Jonny Burger5e60d7f46b80
diff --git a/packages/cli/src/get-filename.ts b/packages/cli/src/get-filename.ts
index 687dae3371..af6e48891b 100644
--- a/packages/cli/src/get-filename.ts
+++ b/packages/cli/src/get-filename.ts
@@ -68,6 +68,15 @@ export const getOutputFilename = ({
}
}
+ if (codec === 'h264-mkv') {
+ if (extension !== 'mkv') {
+ Log.error(
+ 'When using the "h264-mkv" codec, the output filename must end in ".mkv".'
+ );
+ process.exit(1);
+ }
+ }
+
if (codec === 'h265') {
if (extension !== 'mp4' && extension !== 'hevc') {
Log.error(