Skip to content

🎥 Make videos programmatically with React

Merge branch 'main' into seamless-aac-stitching

Jonny Burger3d50291cffd3
diff --cc packages/renderer/src/call-ffmpeg.ts
index 034f08048d,29cd8d5fa5..712ee95912
--- a/packages/renderer/src/call-ffmpeg.ts
+++ b/packages/renderer/src/call-ffmpeg.ts
@@@ -1,11 -1,10 +1,11 @@@
import execa from 'execa';
import type {SpawnOptionsWithoutStdio} from 'node:child_process';
import {spawn} from 'node:child_process';
- import {chmodSync} from 'node:fs';
import path from 'path';
import {getExecutablePath} from './compositor/get-executable-path';
+ import {makeFileExecutableIfItIsNot} from './compositor/make-file-executable';
import type {LogLevel} from './log-level';
+import type {CancelSignal} from './make-cancel-signal';
import {truthy} from './truthy';
export const callFf = ({
@@@ -31,11 -28,9 +31,9 @@@
logLevel,
binariesDirectory,
});
- if (!process.env.READ_ONLY_FS) {
- chmodSync(executablePath, 0o755);
- }
+ makeFileExecutableIfItIsNot(executablePath);
- return execa(executablePath, args.filter(truthy), {
+ const task = execa(executablePath, args.filter(truthy), {
cwd: path.dirname(executablePath),
...options,
});
@@@ -70,11 -57,9 +68,9 @@@ export const callFfNative = (
logLevel,
binariesDirectory,
});
- if (!process.env.READ_ONLY_FS) {
- chmodSync(executablePath, 0o755);
- }
+ makeFileExecutableIfItIsNot(executablePath);
- return spawn(executablePath, args.filter(truthy), {
+ const task = spawn(executablePath, args.filter(truthy), {
cwd: path.dirname(executablePath),
...options,
});
diff --cc packages/renderer/src/index.ts
index 56e942f143,482b166221..ca655480c0
--- a/packages/renderer/src/index.ts
+++ b/packages/renderer/src/index.ts
@@@ -134,7 -134,7 +134,8 @@@ export {OnStartData, RenderFramesOutput
export {validateOutputFilename} from './validate-output-filename';
import {makeDownloadMap} from './assets/download-map';
+ import {makeFileExecutableIfItIsNot} from './compositor/make-file-executable';
+import {getExtensionFromAudioCodec} from './get-extension-from-audio-codec';
import {validatePuppeteerTimeout} from './validate-puppeteer-timeout';
import {validateBitrate} from './validate-videobitrate';
import {
@@@ -223,7 -223,7 +224,8 @@@ export const RenderInternals =
getChromiumGpuInformation,
getPortConfig,
makeDownloadMap,
+ getExtensionFromAudioCodec,
+ makeFileExecutableIfItIsNot,
};
// Warn of potential performance issues with Apple Silicon (M1 chip under Rosetta)