Skip to content

Instantly share code, notes, and snippets.

@b1ngx
b1ngx / recorder.cjs
Created February 12, 2025 05:48 — forked from peterc/recorder.cjs
Record an HTML file to a MP4 video
// Open a supplied HTML file and record whatever's going on to an MP4.
//
// Usage: node recorder.cjs <path_to_html_file>
// Dependencies: npm install puppeteer fluent-ffmpeg
// (and yes, you need ffmpeg installed)
//
// It expects a <canvas> element to be on the page as it waits for
// that to load in first, but you can edit the code below if you
// don't want that.
//