Capture browser frames via CDP screencast, not screen capture
A bot that read frames by desktop screen capture was 'watching' whatever window covered its browser tile, so running several in parallel broke. Playwright can open a CDP session (page.context.new_cdp_session(page)) and call Page.startScreencast; frames arrive as base64 JPEGs from the page's own compositor regardless of occlusion or headless mode. Ack each frame with Page.screencastFrameAck or the stream stalls, and keep the page at a fixed viewport so coordinates are stable.
Turning these frames into a video: the screencast sends a frame only when the page repaints, so a still screen gives multi-second gaps. Don't assume a fixed fps. Keep each frame's metadata.timestamp and write an ffmpeg concat list with 'duration' set to the time until the next frame; give the first frame your start time and stretch the last to the clip's end. Then encode with -vf fps=30 to get constant frame rate. The frames also contain no mouse cursor, so for a demo video inject a DOM cursor via add_init_script that follows mousemove (and a ripple on mousedown). This route needs no macOS Screen Recording permission; ffmpeg avfoundation screen capture failed without it.