# W3C Audiobooks specification

**URL:** https://community.mp3tag.de/t/w3c-audiobooks-specification/52149
**Category:** General Discussion
**Created:** [February 27, 2021, 9:22am UTC](https://community.mp3tag.de/t/w3c-audiobooks-specification/52149 "2021-02-27T09:22:15Z")
**Posts on this page:** 1
**Page:** 1

<div class="post-metadata">

### Author: ![Crissov](https://community.mp3tag.de/user_avatar/community.mp3tag.de/crissov/32/6619_2.png) [@Crissov](https://community.mp3tag.de/u/Crissov)
#### Post date: [February 27, 2021, 9:22am UTC](https://community.mp3tag.de/t/w3c-audiobooks-specification/52149/1 "2021-02-27T09:22:15Z")

</div>

[https://www.w3.org/TR/audiobooks/](https://www.w3.org/TR/audiobooks/)

If you want to produce an Audiobook according to the recently published W3C specification, you need:

- an HTML [primary entry page](https://www.w3.org/TR/audiobooks/#audio-pep) (PEP)
- a JSON-LD [manifest](https://www.w3.org/TR/audiobooks/#audio-manifest), which may be embedded inside the former
- a [table of contents](https://www.w3.org/TR/audiobooks/#audio-toc) (TOC), likely `<nav role="doc-toc">` inside the primary entry page
- a resource list
- audio files
- supplemental files like pictures

# Sample Manifest

```json
{
  "@context": [
    "https://schema.org", 
    "https://www.w3.org/ns/pub-context", 
    {"language": "%LANGUAGE%"}
  ],
  "conformsTo": "https://www.w3.org/TR/audiobooks/",
  "type": "Audiobook",
  "name": "%ALBUM%", 
  "url": "%WWW…%",
  "author" : {
    "type": "Person",
    "name": "%LYRICIST%"
  }
  "readBy": {
    "type": "Person",
    "name": "%ALBUMARTIST%",
    "id": "%WWWARTIST%"
  },
  "duration" : "PT%_total_time_raw%S",
  "readingOrder" : [{
      "type": "LinkedResource",
      "url": "%_filename_rel%",
      "encodingFormat": "%_mimetype%",
      "name": "%TITLE%",
      "duration": "PT%_length_seconds%S"
    }, {
    … // loop output 
  }], 
  "resources" : [
    {
      "type" : "LinkedResource",
      "url": "cover.jpg", 
      "rel": "cover"
    }, 
    "back.jpg", "spine.jpg", 
    "poster.jpg",
    "landscape.jpg",
    "banner.jpg", 
    "discart.jpg",
    "folder.jpg",
    "clearlogo.png",
    "clearart.png",
    "character.png",
    "icon.png",
    "booklet.pdf",
    {
      "type" : "LinkedResource",
      "url" : "sample.mp3",
      "rel" : "preview"
    }
  ]
}

```

I don’t think Mp3tag supports `%_mimetype%` for the media file yet (nor for the playlist).

The [ISO 8601-1 notation for time periods](https://en.wikipedia.org/wiki/ISO_8601#Durations) can be constructed with an `PT` prefix and `S` suffix for the seconds, but it might be a good idea to introduce dedicated variables to output conformant strings like `P2DT4H32M12S` for roughly 52.5 hours.
