馃殌 Feature Request
Allow Playwright鈥檚 built-in video recorder to use an explicitly supplied FFmpeg executable through PLAYWRIGHT_FFMPEG_PATH, set in the environment of the Playwright driver/server process.
This would change executable selection only. Playwright would continue to choose its command-line arguments and output format, and use its bundled FFmpeg when the variable is unset. An invalid configured path should produce an error naming that path.
The selection appears localized to VideoRecorder.start:
-const ffmpegPath = registry.findExecutable('ffmpeg')!.executablePathOrDie(this._screencast.page.browserContext._browser.sdkLanguage());
+const ffmpegPath = process.env.PLAYWRIGHT_FFMPEG_PATH || registry.findExecutable('ffmpeg')!.executablePathOrDie(this._screencast.page.browserContext._browser.sdkLanguage());
This proposal covers runtime selection only: playwright install would continue to install bundled FFmpeg. For remote use, the server operator would configure the variable; it would not be a client-supplied context option.
Example
PLAYWRIGHT_FFMPEG_PATH=/opt/tools/ffmpeg npx playwright test
With video recording enabled, Playwright would use this executable with its own recording arguments.
Motivation
Using a supplied executable with Playwright鈥檚 built-in recorder currently requires workarounds such as copying or symlinking it into Playwright鈥檚 versioned cache. An explicit path would avoid depending on private registry and cache details, including when the cache is read-only.
Related requests:
That concern may also apply to a path-only option: it still exposes FFmpeg as part of the built-in recorder鈥檚 contract. The userland approach gives consumers full control, but also makes them responsible for recorder lifecycle and frame timing when they only need to substitute the executable.
Does that decision rule out a path-only driver/server override as well, or would this narrower option be acceptable? I can contribute the implementation, tests, and documentation after maintainer approval for community contribution.
Prepared by Codex under delegation.
馃殌 Feature Request
Allow Playwright鈥檚 built-in video recorder to use an explicitly supplied FFmpeg executable through
PLAYWRIGHT_FFMPEG_PATH, set in the environment of the Playwright driver/server process.This would change executable selection only. Playwright would continue to choose its command-line arguments and output format, and use its bundled FFmpeg when the variable is unset. An invalid configured path should produce an error naming that path.
The selection appears localized to
VideoRecorder.start:This proposal covers runtime selection only:
playwright installwould continue to install bundled FFmpeg. For remote use, the server operator would configure the variable; it would not be a client-supplied context option.Example
PLAYWRIGHT_FFMPEG_PATH=/opt/tools/ffmpeg npx playwright testWith video recording enabled, Playwright would use this executable with its own recording arguments.
Motivation
Using a supplied executable with Playwright鈥檚 built-in recorder currently requires workarounds such as copying or symlinking it into Playwright鈥檚 versioned cache. An explicit path would avoid depending on private registry and cache details, including when the cache is read-only.
Related requests:
page.screencast.start({ onFrame }).That concern may also apply to a path-only option: it still exposes FFmpeg as part of the built-in recorder鈥檚 contract. The userland approach gives consumers full control, but also makes them responsible for recorder lifecycle and frame timing when they only need to substitute the executable.
Does that decision rule out a path-only driver/server override as well, or would this narrower option be acceptable? I can contribute the implementation, tests, and documentation after maintainer approval for community contribution.
Prepared by Codex under delegation.