How workeffortwaste/gsap-video-export works
gsap-video-export renders a GSAP animation deterministically into video or PNG frames. A CLI user or ESM caller enters the export API, which normalizes the URL, launches Puppeteer, optionally applies cookies and scripts, inspects the GSAP timeline, advances each frame, captures a selected DOM region, optionally post-processes images, and stores temporary PNGs. The encoder then produces the configured video, while info and export metadata return to the caller. The sampled source is concentrated in index.js; some documented options are represented at subsystem level.
Main entry points: index.js Export API · cli.js CLI adapter
Components 17
Entry points
- CLI adapter
cli.js - Export API
index.js
Browser rendering
- URL and page
index.js - Browser session
index.js - Animation page
- Timeline inspector
index.js - Frame advancer
index.js - Frame hooks
index.js
Frame processing
- Screenshot capture
index.js - Post processor
index.js - Temporary frames
index.js
Encoding output
- PNG output
index.js - FFmpeg encoder
index.js - Video output
index.js - Export metadata
index.js
Other components
- User
- FFmpeg runtime
Connections 22
- User → CLI adapter: runs CLI
- User → Export API: calls API
- CLI adapter → Export API: invokes export
- Export API → URL and page: normalizes URL
- URL and page → Browser session: opens page
- Browser session → Animation page: loads animation
- Export API → Browser session: configures browser
- Browser session → Timeline inspector: evaluates timeline
- Timeline inspector → Animation page: reads GSAP
- Export API → Frame advancer: advances frames
- Frame advancer → Animation page: updates animation
- Export API → Frame hooks: runs hooks
- Frame hooks → Animation page: prepares frame
- Export API → Screenshot capture: captures frame
- Screenshot capture → Temporary frames: writes PNG
- Export API → Post processor: processes image
- Post processor → Temporary frames: writes processed PNG
- Export API → PNG output: exports frames
- Temporary frames → FFmpeg encoder: reads PNGs
- FFmpeg encoder → FFmpeg runtime: runs encoder
- FFmpeg encoder → Video output: writes video
- Export API → Export metadata: returns metadata