EPUBCheck MED_012: media-overlay id mismatch
Updated:
EPUBCheck MED_012 is an error message: “The "media-overlay" attribute does not match the ID of the Media Overlay that refers to this document.” The media-overlay attribute of a chapter names a different overlay from the one that refers to it. The SMIL file that narrates a chapter and the chapter's manifest item must point at each other.
The official message
The "media-overlay" attribute does not match the ID of the Media Overlay that refers to this document.
- Default severity
- Error. The EPUB breaks a rule of the specification and is invalid. Stores and Send to Kindle may reject it, and EPUBCheck exits with status 1.
- EPUBCheck version
- 5.4.0
EPUBCheck prints this ID with an underscore instead of a hyphen; this page uses the ID exactly as EPUBCheck reports it.
Typical causes
- Overlay ids renamed or swapped in the manifest.
- A chapter copied with its manifest item, keeping the original's media-overlay value.
How to fix it
- Find the SMIL file whose text elements point to the chapter EPUBCheck names.
- Set the chapter's media-overlay attribute to the manifest id of that SMIL file.
- Check the other chapters the same way: these errors usually come in groups.
- Rebuild the EPUB and run EPUBCheck again to confirm the message is gone.
When it's not this
If the attribute is missing altogether, the error is MED_010.
Terms used here
Other MED messages
MED_011EPUB Content Document referenced from multiple Media Overlay Documents.MED_013Media Overlay Document referenced from the "media-overlay" attribute does not contain a reference to this Content Document.MED_010EPUB Content Documents referenced from a Media Overlay must specify the "media-overlay" attribute.MED_014Media overlay audio file URLs must not have a fragment, but found '#…'.MED-009The time specified in the clipBegin attribute must not be the same as clipEnd.MED_015Media overlay text references must be in reading order. Text target "…" is before the previous link target in … order.
Sources
Message text and severity from EPUBCheck 5.4.0 (W3C, BSD-3-Clause). Explanation by EpubCC.