Repository navigation
feat: add optional gif/mp4 export - #25
Conversation
|
Important
This repository does not receive automatic reviews because it has fewer than 10 stars.
|
|
This is a really nice piece of work. Seeking each animation by its delay and piping PNGs straight into ffmpeg means the video uses the exact same timeline as the SVG and leaves no temp folder behind, and keeping it out of the Action's import path keeps the Action dependency-free. I ran it locally and got a clean mp4 and gif. I pushed one commit after merging |
|
thanks! |
what i built
i added optional local gif and mp4 export to the cli. it captures deterministic frames from the existing timeline and streams them to ffmpeg, while the default svg output and github action stay dependency-free.
Closes #10
how i tested it
npm test— 22 passednpm run demo— passednode --check src/export.mjsandnode --check bin/hoops.mjs— passedgit diff --check— passedoptional tools
local gif/mp4 export needs node 20+, playwright with chromium, and ffmpeg with the gif and
libx264encoders. these are only used by the opt-in local export path.samples
gif: https://github.com/user-attachments/assets/129362b4-3226-43b5-8c21-fcdb44844caf
mp4: https://github.com/user-attachments/assets/2c222200-20f9-4469-a1be-04c5af78e0e8
notes
gif timing is quantized to centiseconds. exports use the full timeline, so long animations can take a while and produce larger files.