Skip to content

docs: captioned demo media + soundtrack + README gif - #58

Merged
franciszver merged 3 commits into
mainfrom
docs/demo-media-captions
Jul 24, 2026
Merged

docs: captioned demo media + soundtrack + README gif#58
franciszver merged 3 commits into
mainfrom
docs/demo-media-captions

Conversation

@franciszver

Copy link
Copy Markdown
Owner

What

Enhances the demo-media pipeline and publishes the result:

  • Per-frame captionsapply_caption() overlays a caption bar explaining each screen (sign in → dashboard → AI Q&A math → practice → goals → progress). Captions in scripts/demo_captions.json.
  • Soundtrackscripts/_demo_audio.py synthesizes a gentle C–G–Am–F arpeggio (pure stdlib wave+math, no numpy) muxed into the mp4 via the bundled ffmpeg (--music). GIF stays silent.
  • README gif — captioned docs/assets/demo.gif (382KB) committed and embedded under the badges.

Verification

  • Regenerated from the 6 live production frames: demo.mp4 (602KB, video + AAC audio confirmed via ffmpeg probe) + captioned demo.gif. Captions viewed — legible; math frame showcases KaTeX.
  • Full suite: 540 passed, 1 skipped, 2 xfailed. black/isort/flake8 clean.
  • Gate review: MERGE-READY, 0 blockers (clipping/ffmpeg-cleanup/handle-safety verified); 1 cosmetic NIT (non-Windows font fallback).

🤖 Generated with Claude Code

https://claude.ai/code/session_016v4C1daTwNakL6QDbmy3MJ

franciszver and others added 3 commits July 24, 2026 07:56
Adds tests for apply_caption() (bottom-band caption bar overlay),
font-fallback when no TrueType font is available, and audio-mux
behavior (--music on/off) via ffmpeg stream probing. These import
apply_caption from build_demo_media and synth_music from the not-yet-
created scripts/_demo_audio.py, so this commit fails collection until
the next commit adds the implementation (verified: ImportError).

Assisted-by: Claude Code (sonnet subagent)
Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
- apply_caption() draws a semi-transparent bottom caption bar (12% of
  frame height) with centered, auto-shrinking text; tries Segoe UI /
  Arial TrueType fonts and falls back to PIL's default bitmap font.
  Applied consistently to both mp4 and gif frames after canvas
  normalization. scripts/demo_captions.json supplies the 6 frame ->
  caption mappings; --captions overrides the sidecar path.
- scripts/_demo_audio.py synthesizes a calm arpeggiated background
  track (C-G-Am-F progression, sine waves with click-free attack/decay
  envelopes, low amplitude, overall fade-in/out) with stdlib wave +
  math + array only (no numpy). mux_audio() muxes it into the mp4 via
  the bundled ffmpeg binary (video copy, aac audio); build_demo_media
  falls back to the silent mp4 with a warning if muxing fails.
  Gated behind --music (gif stays silent either way).

Assisted-by: Claude Code (sonnet subagent)
Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
Regenerated demo.mp4/demo.gif from the 6 existing demo frames with
--seconds-per-frame 3 --gif-width 900 --music. Committed the captioned
demo.gif (6 frames, ~382KB) to docs/assets/ and embedded it near the
top of README.md, just under the badges.

Assisted-by: Claude Code (sonnet subagent)
Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
@franciszver
franciszver merged commit 27b2584 into main Jul 24, 2026
5 checks passed
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.

1 participant