Use the CCapture JavaScript library to compile the frames from your p5.js sketch into a webm file, and then convert this webm file to MP4 (or other useful formats) using FFmpeg.
Use the CCapture JavaScript library to compile the frames from your p5.js sketch into a webm file, and then convert this webm file to MP4 (or other useful formats) using FFmpeg.