Skip to content

feat: add optional gif/mp4 export - #25

Merged
HarrisJDCampbell merged 3 commits into
HarrisJDCampbell:mainfrom
dxnnystyles:feat/issue-10-gif-mp4
Oct 30, 2026
Merged

HarrisJDCampbell merged 3 commits into
HarrisJDCampbell:mainfrom
dxnnystyles:feat/issue-10-gif-mp4

Conversation

@dxnnystyles

Copy link
Copy Markdown
Contributor

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 passed
  • npm run demo — passed
  • node --check src/export.mjs and node --check bin/hoops.mjs — passed
  • git diff --check — passed
  • generated and checked genuine gif and mp4 samples; the gif animates and the mp4 plays

optional tools

local gif/mp4 export needs node 20+, playwright with chromium, and ffmpeg with the gif and libx264 encoders. 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.

@coderabbitai

coderabbitai Bot commented Oct 23, 2026 •

Copy link
Copy Markdown

Important

  • 🔍 Trigger review

This repository does not receive automatic reviews because it has fewer than 10 stars.

Run configuration
  • Source mode: Auto
  • Repository: Unavailable
  • Branch: Unavailable
  • File: No configuration file from this repository applied
  • Commit: Unavailable
  • Layers: defaults
  • Review profile: CHILL
  • Plan: Advanced
  • Run ID: 5fcb58b6-dec5-4e7b-b153-d7d7fcf4d5da
  • Autofix · Keep fixing CodeRabbit findings and required CI, and resolving merge conflicts

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands.

@dxnnystyles
dxnnystyles marked this pull request as ready for review October 23, 2026 17:08
@HarrisJDCampbell

Copy link
Copy Markdown
Owner

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 main: the export now passes max_seconds to buildTimeline, so a capped SVG and its video come out the same length. Merging!

@HarrisJDCampbell
HarrisJDCampbell merged commit 5c19a0d into HarrisJDCampbell:main Oct 30, 2026
5 checks passed
@dxnnystyles

Copy link
Copy Markdown
Contributor Author

thanks!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

GIF or MP4 export for places that don't animate SVG

2 participants