Skip to content

Add Plugin: html2video-for-mcode - #41

Open
Wzdhehe wants to merge 7 commits into
MiniMax-AI:mainfrom
Wzdhehe:add-plugin-html2video-for-mcode
Open

Wzdhehe wants to merge 7 commits into
MiniMax-AI:mainfrom
Wzdhehe:add-plugin-html2video-for-mcode

Conversation

@Wzdhehe

@Wzdhehe Wzdhehe commented Sep 17, 2026

Copy link
Copy Markdown

What changes

Add Plugin: html2video-for-mcode at plugins/Wzdhehe/html2video-for-mcode.

A Skill that turns a topic, outline, or script into a narrated MP4: HTML slides with staged
entrance animations, a TTS voiceover, burned-in subtitles, and an ASR pass that verifies the
voiceover says what the script says.

User value

After installing, a MiniMax Code user can ask in plain language:

帮我把这份大纲做成一条 60 秒的中文口播视频:三张关键数字、结尾一句行动号召,用深色科技主题,加中文字幕。

and get:

out/final.mp4      1920×1080 (or 1080×1920 vertical), H.264 + AAC
out/subs.srt       subtitles for platform upload
out/slide-*.mp4    per-slide segments
preview/*.png      terminal-state frames

What makes it more than a slide exporter:

  • Timing is measured, never hand-written — every slide duration and animation entrance time is
    derived from the TTS audio via ffprobe, so the picture can never lag behind the voiceover.
  • Every slide carries a title layer and a detail layer on separate animation stages, so no page
    is just a headline.
  • Animations are baked into the video — capture steps frames deterministically instead of
    screen-recording.
  • Rendering is gated — a static check refuses slides with undefined CSS variables, missing
    images, external resources, or entrance animations without an animation class: the silent
    failure modes that otherwise ship a broken-looking video while every script reports success.

Plugin submission checklist

  • Plugin lives at plugins/<github-owner>/<plugin-name>.
  • plugin.json name matches the Plugin directory.
  • README.md includes a real example prompt and expected result (bilingual: README.md +
    README.zh-CN.md).
  • LICENSE and plugin.json declare an open-source license (MIT).
  • Required executables, accounts, paid services, and supported platforms are disclosed
    (Node 18+, ffmpeg/ffprobe, Playwright Chromium; MiniMax API key or Token Plan for voice and
    ASR; Windows/macOS/Linux; PowerShell caveat documented).
  • Network destinations and data handled by the plugin are disclosed
    (api.minimaxi.com / api.minimax.io for ASR only when invoked; voice via mcode connectors
    or mmx-cli; image fetching only from URLs the user passes; no telemetry).
  • No credentials, private endpoints, hidden telemetry, installers, symlinks, or native binaries
    are included. The ASR script reads its key from an environment variable or CLI flag at
    runtime and never writes it.
  • Every scaffold TODO has been replaced.
  • npm run check passes.

Evidence

$ node scripts/validate.mjs
OK   plugin Wzdhehe/html2video-for-mcode
Validated 27 hosted Plugins and all examples.
$ echo $?
0
$ node --test          # 107 tests: 106 pass, 1 fail
✖ hosted Plugin rejects symlinks that can escape its package root

The single failure is a Windows checkout artifact, not a content problem: that test creates a
symlink fixture, and creating symlinks on Windows requires Developer Mode or elevation
(EPERM: operation not permitted, symlink …). It reproduces identically on a clean checkout
without this Plugin. CI runs on ubuntu-latest, where it passes. npm run validate — the part of
npm run check that inspects Plugins — passes with exit code 0.

Manual end-to-end test (Windows, Node 24, ffmpeg-static):

  • Scaffolded a project, generated 8 TTS clips, ran plan-timings.mjs → every slide duration and
    stage entrance time derived from measured audio.
  • check-slides.mjs correctly rejects slides with undefined CSS variables (--coral-a/--coral-b),
    missing images, external font links, and data-stage without an animation class; clean slides pass.
  • capture.mjs --mode motion produced 143 frames for an 8.6s slide; frame-diff (PSNR) confirms the
    staged entrance actually renders at its scheduled time (inf before the entrance, ~14 dB across it).
  • build-video.mjs --asr produced a 14.20s MP4 matching the expected duration exactly, full decode
    clean, out/subs.srt generated, and per-sentence ASR parts produced.
  • Theme gate: 13 themes pass WCAG contrast checks; a low-contrast brand accent (#FFB84D on white)
    is rejected with a non-zero exit code, a compliant one (#C2410C) passes.
  • ASR comparison verified offline against synthetic transcripts: simplified Chinese passes,
    traditional characters (Cantonese voice) and mismatched numbers fail with exit code 1.

Full disclosure of dependencies, network access, and data handling is in the Plugin README.


View with [code]smith Autofix with [code]smith
Need help on this PR? Tag @codesmith-bot with what you need. Autofix is disabled.

@Wzdhehe
Wzdhehe force-pushed the add-plugin-html2video-for-mcode branch 3 times, most recently from 0d50ebf to 7320ccd Compare September 17, 2026 15:13
Narrated-video pipeline: HTML slides with staged entrance animations, TTS voiceover
measured with ffprobe, burned-in subtitles, deterministic frame-stepping capture,
ffmpeg assembly, and ASR verification.

- 11 Node scripts, no build step; works with mcode connectors or mmx-cli
- 13 themes, 17 layout recipes, image framing primitives
- Subtitles confined to their own windows (no overlap); 16:9 and 9:16 canvases
- Research phase documented: source grading, cross-verification rules, notes template
- Discloses dependencies, accounts, network destinations and data handling (bilingual README)
- Validation: node scripts/validate.mjs -> OK (exit 0)
@Wzdhehe
Wzdhehe force-pushed the add-plugin-html2video-for-mcode branch from 7320ccd to 4104572 Compare September 17, 2026 15:23
Add Plugin: html2video-for-mcode

Narrated-video pipeline: HTML slides with staged entrance animations, TTS voiceover
measured with ffprobe, burned-in subtitles, deterministic frame-stepping capture,
ffmpeg assembly, and ASR verification.

- 11 Node scripts, no build step; works with mcode connectors or mmx-cli
- 13 themes, 17 layout recipes, image framing primitives
- Subtitles confined to their own windows (no overlap); 16:9 and 9:16 canvases
- Research phase documented: source grading, cross-verification rules, notes template,
  plus how to fetch official-site / press-release text (SPA rendering, PDF-first numbers)
- Discloses dependencies, accounts, network destinations and data handling (bilingual README)
- Validation: node scripts/validate.mjs -> OK (exit 0)
… them to the repo root)

Add Plugin: html2video-for-mcode

Narrated-video pipeline: HTML slides with staged entrance animations, TTS voiceover
measured with ffprobe, burned-in subtitles, deterministic frame-stepping capture,
ffmpeg assembly, and ASR verification.

- 11 Node scripts, no build step; works with mcode connectors or mmx-cli
- 13 themes, 17 layout recipes, image framing primitives
- Subtitles confined to their own windows (no overlap); 16:9 and 9:16 canvases
- Research phase documented: source grading, cross-verification rules, notes template,
  plus how to fetch official-site / press-release text (SPA rendering, PDF-first numbers)
- Discloses dependencies, accounts, network destinations and data handling (bilingual README)
- Validation: node scripts/validate.mjs -> OK (exit 0)
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