Skip to content

Playwright is a framework for Web Testing and Automation. It allows testing Chromium, Firefox and WebKit with a single API.

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

Andrey Lushnikov430f2bedaa73
diff --git a/src/server/chromium/videoRecorder.ts b/src/server/chromium/videoRecorder.ts
index 5225883c93..f5258d2fa0 100644
--- a/src/server/chromium/videoRecorder.ts
+++ b/src/server/chromium/videoRecorder.ts
@@ -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,
diff --git a/third_party/ffmpeg/ffmpeg-linux b/third_party/ffmpeg/ffmpeg-linux
new file mode 100755
index 0000000000..e98aea673e
Binary files /dev/null and b/third_party/ffmpeg/ffmpeg-linux differ