Skip to content

🎥 Make videos programmatically with React

fix: disable parallel rendering in audio and image mode

辉宇d8ba29c8b305
diff --git a/packages/cli/src/get-cli-options.ts b/packages/cli/src/get-cli-options.ts
index 9b515a96ce..98f9916d74 100644
--- a/packages/cli/src/get-cli-options.ts
+++ b/packages/cli/src/get-cli-options.ts
@@ -191,10 +191,13 @@ export const getCliOptions = async (type: 'still' | 'series') => {
const proResProfile = getAndValidateProResProfile(codec);
const browserExecutable = Internals.getBrowserExecutable();
+ const isAudioOnly = Internals.isAudioCodec(codec);
+ const parallelEncoding= Internals.getParallelEncoding()&&!shouldOutputImageSequence&&!isAudioOnly;
+
return {
parallelism: Internals.getConcurrency(),
concurrentMode: Internals.getConcurrentMode(),
- parallelEncoding: Internals.getParallelEncoding(),
+ parallelEncoding,
frameRange,
shouldOutputImageSequence,
codec,
diff --git a/packages/cli/src/render.tsx b/packages/cli/src/render.tsx
index 7c6b3a2a86..51af9600e1 100644
--- a/packages/cli/src/render.tsx
+++ b/packages/cli/src/render.tsx
@@ -136,7 +136,7 @@ export const render = async () => {
steps,
})
);
- if(parallelEncoding&&!shouldOutputImageSequence){
+ if(parallelEncoding){
if (typeof crf !== 'number') {
throw new TypeError('CRF is unexpectedly not a number');
}