h5p-normalize
Installation
SKILL.md
Normalize an H5P package
When a package's video takes minutes to start, the package is usually the problem, not the
player or the host. Two things inside the zip cause it: the video is deflated (compressed
inside the archive, so no byte of it can be read without everything before it), and the mp4's
index (moov) sits at the end of the file, so nothing decodes until the last byte. Both are
fixed by rewriting the container once, with the content left as it is. Do this where the
package is published, never in the learner's browser.
1. Diagnose with a dry run
npx @missing-elements/h5p-normalize course.h5p --dry-run
Read the summary at the end. The media line is the verdict:
media 22 files: 22 already as they should be → nothing to do; the problem is elsewhere
media 6 files: 4 inflated to stored, 1 mp4 index moved to front, 1 already as they should be
→ normalize it