feat(video): allow recording video at a custom fps - #42752
Conversation
| // 1920x1080 at 60fps -> scale 13.8, bitrate 13824k, 4 threads | ||
| const pixelRateScale = Math.max(1, w * h * this._fps / (800 * 450 * kDefaultFps)); | ||
| const bitrate = Math.round(pixelRateScale * 1000); | ||
| const threads = Math.min(8, Math.ceil(pixelRateScale / 4)); |
There was a problem hiding this comment.
let's trust ffmpeg's auto mode in case we allow >1 thread?
"-threads 0 or -threads auto means “choose automatically”; the generic codec option defaults to auto. Current ffmpeg also explicitly sets thread_count = 0 when you haven’t supplied a threads option."
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
- `fps` option for `page.screencast.start()`, `recordVideo`, test runner `video` and `video-start` - scale vp8 bitrate and encoder threads with the pixel rate - lock screencast frames to consecutive output slots to absorb Chromium timestamp jitter (https://issues.chromium.org/issues/562567707)
19a6e22 to
eb5e436
Compare
| width: z.number().describe('Video width'), | ||
| height: z.number().describe('Video height'), | ||
| }).optional().describe('Video size'), | ||
| fps: z.number().optional().describe('Video frame rate in frames per second, defaults to 25'), |
There was a problem hiding this comment.
should this be z.number().int().positive().optional()?
Test results for "MCP"3 failed 8587 passed, 1446 skipped Merge workflow run. |
Test results for "tests 1"2 failed 5 flaky51973 passed, 1247 skipped Merge workflow run. |
🟢 All three failures are pre-existing flakes — the PR is clearHi, I'm the Playwright bot and I took a look at the failing CI on this PR. All three failures are Windows-only MCP tests that each fail with the same error on SHAs and PRs unrelated to this one. Nothing here points at the fps change. DetailsOverall: the PR touches video/screencast encoding ( Pre-existing flake / infra
Evidence comes from the aggregated CI results database, topped up through this PR's run. Triaged by the Playwright bot - agent run |
🟢 All five failures are pre-existing flakes — the PR looks clearHi, I'm the Playwright bot and I triaged the red CI here. None of the failing tests touch video, screencast, or fps; each one fails with the same error on other PRs and on DetailsThe PR changes video/screencast recording ( Pre-existing flake / infra
Nothing to fix here; a rerun should be green, modulo the cli-session flake's 1-in-3 odds. Triaged by the Playwright bot - agent run |
8bb2c09
into
microsoft:main
Summary
fpsoption forpage.screencast.start(),recordVideo(recordVideoFpsin other languages), test runnervideoand CLI/MCPvideo-start.-b:v 1M -threads 1.