devops: stop relying on ubuntu stock ffmpeg (#3882)

This patch bakes ffmpeg-linux r1001 into our NPM package.

This increases NPM package size from 4.2MB to 6.7MB.

Fixes #3845
This commit is contained in:
Andrey Lushnikov 2020-09-14 19:22:00 -07:00 committed by GitHub
parent 459d857bc3
commit 430f2bedaa
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
2 changed files with 4 additions and 9 deletions

View file

@ -21,7 +21,6 @@ import { assert } from '../../utils/utils';
import { launchProcess } from '../processLauncher';
import { Progress, ProgressController } from '../progress';
import * as types from '../types';
import { spawnAsync } from '../validateDependencies';
const fps = 25;
@ -62,16 +61,12 @@ export class VideoRecorder {
let ffmpegPath = 'ffmpeg';
const binPath = path.join(__dirname, '../../../third_party/ffmpeg/');
if (os.platform() === 'win32') {
if (os.platform() === 'win32')
ffmpegPath = path.join(binPath, os.arch() === 'x64' ? 'ffmpeg-win64.exe' : 'ffmpeg-win32.exe');
} else if (os.platform() === 'darwin') {
else if (os.platform() === 'darwin')
ffmpegPath = path.join(binPath, 'ffmpeg-mac');
} else {
// Look for ffmpeg in PATH.
const {code, error} = await spawnAsync(ffmpegPath, ['-version'], {});
if (code !== 0 || error)
throw new Error('ffmpeg not found.\nInstall missing packages with:\n sudo apt-get install ffmpeg');
}
else
ffmpegPath = path.join(binPath, 'ffmpeg-linux');
const { launchedProcess, gracefullyClose } = await launchProcess({
executablePath: ffmpegPath,
args,

BIN
third_party/ffmpeg/ffmpeg-linux vendored Executable file

Binary file not shown.