🎥 Make videos programmatically with React
separate audio to
Jonny Burger48c68bbc4503
diff --git a/packages/it-tests/src/rendering/rendering.test.ts b/packages/it-tests/src/rendering/rendering.test.tsindex f7c74534db..67ef67c3da 100644--- a/packages/it-tests/src/rendering/rendering.test.ts+++ b/packages/it-tests/src/rendering/rendering.test.ts@@ -382,24 +382,20 @@ test("Should render a still that uses the staticFile() API and should apply propfs.unlinkSync(out);});-test("Dynamic duration should work, and render from inside src/", async () => {+test("Dynamic duration should work", async () => {const randomDuration = Math.round(Math.random() * 18 + 2);const task = await execa(- path.join(- process.cwd(),- "..",- "example",- "node_modules",- ".bin",- "remotion"- ),+ "pnpm",[+ "exec",+ "remotion","render","src/index.ts","dynamic-duration",`--props`,`{"duration": ${randomDuration}}`,- "--public-dir=packages/example/public",+ "--separate-audio-to",+ "audio.wav",outputPath,],{diff --git a/packages/renderer/src/validate-output-filename.ts b/packages/renderer/src/validate-output-filename.tsindex e237826c1a..09fcaea75b 100644--- a/packages/renderer/src/validate-output-filename.ts+++ b/packages/renderer/src/validate-output-filename.ts@@ -54,7 +54,10 @@ export const validateOutputFilename = <T extends Codec>({resolvedAudioCodec as (typeof supportedAudioCodecs)[T][number]].possible;- if (!acceptableExtensions.includes(extension as FileExtension)) {+ if (+ !acceptableExtensions.includes(extension as FileExtension) &&+ !separateAudioTo+ ) {throw new TypeError(`When using the ${codec} codec with the ${resolvedAudioCodec} audio codec, the output filename must end in one of the following: ${acceptableExtensions.join(', ',