VHS on Windows produces blank or missing GIF frames. After a little debugging, I identified there were two issues:
-
ttyd ConPTY failure on Windows 11: The bundled ttyd.win32.exe (MinGW cross-compiled) fails with CreateProcessW error 123 on Windows 11 25H2. No child process spawns, so there's nothing to render. Fixed upstream in tsl0922/ttyd#1501 / PR #1502. Pre-built MSVC binary available at djdarcy/ttyd-msvc.
-
Canvas renderer unavailable in headless Chrome: Even with a working ttyd, CanvasToImage() returns empty data because WebGL isn't available in headless Chrome on Windows (particularly in RDP sessions and CI environments). The xterm.js canvas layers (xterm-text-layer, xterm-cursor-layer) exist but produce blank screenshots.
Fix:
- Switch default renderer from
canvas to dom in ttyd client options
- Add SwiftShader/ANGLE browser flags as WebGL fallback
- Detect missing canvas layers and fall back to
.xterm-screen element screenshots
Working fork with fix: djdarcy/vhs-windows-fixes (branch fix/windows-ttyd-rendering)
Related:
VHS on Windows produces blank or missing GIF frames. After a little debugging, I identified there were two issues:
ttyd ConPTY failure on Windows 11: The bundled
ttyd.win32.exe(MinGW cross-compiled) fails withCreateProcessWerror 123 on Windows 11 25H2. No child process spawns, so there's nothing to render. Fixed upstream in tsl0922/ttyd#1501 / PR #1502. Pre-built MSVC binary available at djdarcy/ttyd-msvc.Canvas renderer unavailable in headless Chrome: Even with a working ttyd,
CanvasToImage()returns empty data because WebGL isn't available in headless Chrome on Windows (particularly in RDP sessions and CI environments). The xterm.js canvas layers (xterm-text-layer,xterm-cursor-layer) exist but produce blank screenshots.Fix:
canvastodomin ttyd client options.xterm-screenelement screenshotsWorking fork with fix:
djdarcy/vhs-windows-fixes(branchfix/windows-ttyd-rendering)Related: