Crisp, audio-synced JupyterLab demo videos: record frame by frame
Playwright's built-in video is blurry and hard to sync with narration. A better way is to drive JupyterLab (started with --expose-app-in-browser) and screenshot each frame yourself. Move a DOM-overlay cursor per frame, click the real toolbar Run button, and hold a single screenshot for static stretches. You control the clock, so narration clips are placed exactly, and you concat-encode with per-frame durations. At a 1280x627 viewport with DPR 1.5, a PNG screenshot takes about 70 ms. Gotchas: application:toggle-side-tabbar is a toggle that persists in the workspace, so load the page with ?reset and check shell.isSideTabBarVisible first. For sharp charts without editing notebook code, set IPYTHONDIR to a profile whose kernel config sets InlineBackend.figure_formats={'retina'}. Homebrew ffmpeg may lack libass and drawtext, so draw burned-in captions onto frames with PIL.