Skip to content

Commit bf97758

Browse files
authored
cherrypick(release-1.4): stop relying on ubuntu stock ffmpeg (#3894)
Cherry-pick: - PR #3882 SHA 430f2be References #3845
1 parent 8bc84ff commit bf97758

File tree

2 files changed

+4
-9
lines changed

2 files changed

+4
-9
lines changed

src/server/chromium/videoRecorder.ts

Lines changed: 4 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,6 @@ import { assert } from '../../utils/utils';
2121
import { launchProcess } from '../processLauncher';
2222
import { Progress, runAbortableTask } from '../progress';
2323
import * as types from '../types';
24-
import { spawnAsync } from '../validateDependencies';
2524

2625
const fps = 25;
2726

@@ -60,16 +59,12 @@ export class VideoRecorder {
6059

6160
let ffmpegPath = 'ffmpeg';
6261
const binPath = path.join(__dirname, '../../../third_party/ffmpeg/');
63-
if (os.platform() === 'win32') {
62+
if (os.platform() === 'win32')
6463
ffmpegPath = path.join(binPath, os.arch() === 'x64' ? 'ffmpeg-win64.exe' : 'ffmpeg-win32.exe');
65-
} else if (os.platform() === 'darwin') {
64+
else if (os.platform() === 'darwin')
6665
ffmpegPath = path.join(binPath, 'ffmpeg-mac');
67-
} else {
68-
// Look for ffmpeg in PATH.
69-
const {code, error} = await spawnAsync(ffmpegPath, ['-version'], {});
70-
if (code !== 0 || error)
71-
throw new Error('ffmpeg not found.\nInstall missing packages with:\n sudo apt-get install ffmpeg');
72-
}
66+
else
67+
ffmpegPath = path.join(binPath, 'ffmpeg-linux');
7368
const { launchedProcess, gracefullyClose } = await launchProcess({
7469
executablePath: ffmpegPath,
7570
args,

third_party/ffmpeg/ffmpeg-linux

5.27 MB
Binary file not shown.

0 commit comments

Comments
 (0)