Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

TOC specifying a single chapter over multiple files #118

Open
LFriedenthal opened this issue Mar 30, 2023 · 4 comments
Open

TOC specifying a single chapter over multiple files #118

LFriedenthal opened this issue Mar 30, 2023 · 4 comments

Comments

@LFriedenthal
Copy link

I see in the spec how the TOC handles media fragments within a single file.
I see publishers much more often splitting chapters across multiple files, though. Is there a proposed solution for communicating this in the TOC in a way that produces only unique TOC entries?

I have a lot of books being sent to us right now that even if they were packaged as an LPF would have a TOC like:

Opening Credits
Chapter 1
Chapter 1
Chapter 2

Because they've cut Chapter 1 into two mp3s "for time" or on some arbitrary length limit. (And some other retailers do have hard chapter runtime limits, so they require you to cut chapters up.)

@wareid
Copy link
Contributor

wareid commented Mar 30, 2023

Excellent question, we did consider this and ran into issues with how to best address it.

I think our hope was that reading applications would have the sense to condense files into single lines if they had the same title, but not sure how successful that might be.

Hopefully we can stir some conversation!

@danielweck @marisademeglio @bduga

@danielweck
Copy link
Member

danielweck commented Mar 31, 2023

Hello, I don't understand why the TOC contains two links to chapter one, in your example. The publication's reading order may indeed reference as many physical audio resources as needed (e.g. chapter1-a.mp3 followed by chapter1-b.mp3), but the TOC is meant to be a higher-level logical abstraction that defines access points at the beginning of each "chapter" (of "section" or any other relevant structural position), so here for example at the zero timestamp chapter1-a.mp3#t=0. The second physical part chapter1-b.mp3 does not need to be linked from the TOC, as during playback it will automatically be scheduled after chapter one, just as per the reading order definition.
Of course, the TOC can also link to the beginning of other (sub)parts inside individual "chapters", such as "sections" etc. For example:

  • chapter1-a.mp3#t=0 (beginning of chapter one)
  • chapter1-a.mp3#t=111 (beginning of section one inside chapter one)
  • chapter1-a.mp3#t=222 (beginning of section two inside chapter one)
  • chapter1-b.mp3#t=0 (beginning of section three inside chapter one)
  • chapter1-b.mp3#t=444 (beginning of section four inside chapter one)
  • chapter2.mp3#t=0 (beginning of chapter two)
  • chapter2.mp3#t=111 (beginning of section one inside chapter two)
  • chapter2.mp3#t=222 (beginning of section two inside chapter two)

Or am I missing something?
Thank you

@LFriedenthal
Copy link
Author

LFriedenthal commented Mar 31, 2023 via email

@mattgarrish
Copy link
Member

The TOC as communicated with Kobo's manifest.json made it pretty clear the order files were to be played in and what the TOC should say, which each short story getting identified within a single mp3.

The table of contents doesn't define the order the resources are supposed to be played in. That's defined in the manifest in the readingOrder property. What @danielweck is saying is that your reading order will list each part of chapter one:

"readingOrder": [
   { "url": "chapter1-a.mp3" ... },
   { "url": "chapter1-b.mp3" ... },
   { "url": "chapter2.mp3" ... },
   ...
]

That is what the reading system uses to determine the flow of the audiobook.

The table of contents only provides links for users to access specific points, so you can forget about the fact that chapter 1 is technically split into two physical audio files and link to the one that actually represents the start of the chapter, chapter1-a.mp3 in this case.

A program that automatically generates a table of contents based on file names will probably create duplicate entries, but then all you have to do is prune those excess entries from the TOC if they're not relevant. So long as the reading order is complete, it has no effect on playback.

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

No branches or pull requests

4 participants