Convert animated GIFs to MP4 to cut file size (#119)#125
Merged
Conversation
Re-encode the 27 GIFs referenced from published lessons to H.264 MP4 (crf 23, faststart, even-dimension scale) and swap each `` to a muted autoplay/loop `<video aria-label="…">` (single-line `<video src>` form inside table cells). Removes all 50 unreferenced/orphaned GIFs (the converted originals plus commented-out and never-referenced clips). For the 2 clips that already had a same-name source MP4 in the repo, the source MP4 is used rather than a GIF transcode — and the oversized 13.6 MB Arduino_LEDBlink_Pin3.mp4 is re-encoded down to 1.2 MB at source quality. OG social cards: 8 arduino pages had `image:` pointing at a hero GIF that's now a `<video>`. Regenerated static posters via generate_og_posters.py and repointed `image:` at `assets/og/<page>.jpg` (social crawlers can't use video). Updated the website-dev.md front- matter example to led-fade's real poster path to match. signals/ GIFs are untouched (migrating to makeabilitylab/signals, #116). Net: ~119 MB removed (112.7 MB GIFs + 12.4 MB from the LEDBlink re-encode, vs 5.8 MB of new MP4s/posters). `bundle exec jekyll build` clean; built _site has zero .gif refs in arduino/electronics/esp32/ sensors and all videos/posters resolve. html-proofer link-check + media-a11y CI gates are the backstop. Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Re-encodes the GIFs referenced from published lessons to H.264 MP4 and removes the originals, per #119. Builds on #120 (
movies/→videos/), following the agreed "rename first, then convert" order.What changed
libx264 -crf 23 -pix_fmt yuv420p -movflags +faststart -an, with an even-dimension scale filter), and eachswapped to a muted autoplay/loop<video aria-label="alt">. Table cells use the single-line<video src=…>form so they stay inside the table..mp4, that source is used instead of re-deriving from the degraded GIF. The oversized 13.6 MBArduino_LEDBlink_Pin3.mp4was re-encoded to 1.2 MB at source quality (it was even bigger than its GIF).image:to a hero GIF that's now a<video>; social crawlers can't render video, so I regenerated static posters withgenerate_og_posters.pyand repointedimage:atassets/og/<page>.jpg. Updated thewebsite-dev.mdfront-matter example to led-fade's real poster path to stay accurate.Out of scope
signals/GIFs are untouched — those notebooks are migrating tomakeabilitylab/signals(#116).Net size impact
~119 MB removed: 112.7 MB of GIFs + 12.4 MB from the LEDBlink re-encode, against 5.8 MB of new MP4s + posters.
Verification
bundle exec jekyll buildclean (Jekyll 4)_sitehas zero.gifrefs in arduino/electronics/esp32/sensors; all MP4s + posters resolve; heroes render as<video><video>elements carryaria-label(media-a11y gate) — CI's html-prooferlink-check+media-a11yare the backstopNote / possible follow-up
The
electronics/assets/gifs/dir now holds.mp4files (the dir name is a slight misnomer). Left as-is to keep this PR focused; could be renamed in a small follow-up if desired.🤖 Generated with Claude Code