EPUBCheck MED_016: overlay duration sum mismatch
Updated:
EPUBCheck MED_016 is a warning message: “Media Overlays total duration should be the sum of the durations of all Media Overlays documents.” The total media overlay duration in the package does not match the sum of each overlay's duration. EPUB asks for the total (media:duration without refines) to equal the sum, within one second.
The official message
Media Overlays total duration should be the sum of the durations of all Media Overlays documents.
- Default severity
- Warning. The EPUB is still valid, but something is likely to cause problems in some reading apps. EPUBCheck exits with 0 unless you pass --failonwarnings.
- 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
- Narration re-recorded or trimmed without updating the durations in the package metadata.
- An overlay added or removed while the total stayed the same.
How to fix it
- List the media:duration meta elements that refine each SMIL item and add them up.
- Set the media:duration without refines to that total, for example
<meta property="media:duration">1:36:20</meta>. - If a single overlay's duration is wrong, measure it from its audio and correct that value too.
- Rebuild the EPUB and run EPUBCheck again to confirm the message is gone.
When it's not this
If clip times inside a SMIL file are wrong, the errors are MED-008 or MED-009.
Terms used here
Other MED messages
MED_015Media overlay text references must be in reading order. Text target "…" is before the previous link target in … order.MED_017URL fragment should indicate an element ID, but found '#…'.MED_014Media overlay audio file URLs must not have a fragment, but found '#…'.MED_018URL fragment should be an SVG fragment identifier, but found '#…'.MED_013Media Overlay Document referenced from the "media-overlay" attribute does not contain a reference to this Content Document.MED_012The "media-overlay" attribute does not match the ID of the Media Overlay that refers to this document.
Sources
Message text and severity from EPUBCheck 5.4.0 (W3C, BSD-3-Clause). Explanation by EpubCC.