Records on a throwaway Xvfb display at fixed geometry, drives the session with xdotool, and quantises through a per-clip palette so the terminal's colours survive instead of dithering.