music-metadata icon indicating copy to clipboard operation
music-metadata copied to clipboard

Other m4b containers fail to retrieve all the chapters

Open jigzahoy opened this issue 4 years ago • 1 comments

Clearly understandable that includeChapters is currently an experimental feature, and thank you for your hard work! It would be an overkill just to put ffmpeg/ffprobe in my application just to get the chapters of an audiobook.

Here are the issues I found and referenced from #731

Bug description

  • .m4b with isom/iso2/mp41 container only returns one chapter but all chapter durations are present.

    • In the parseChapterTrack function, chapterTrack.chunkOffsetTable only contains only one value, and chapterTrack.sampleSizeTable is empty. Which I believe they're dependent to extract the chapter titles.
  • .m4b with M4A/isom/iso2, it doesn't return any chapter lists.

Audio file demonstrating the problem Audio files were given privately as they were copyrighted material.

jigzahoy avatar Jan 19 '21 12:01 jigzahoy

I had a quick look to the decoding of both files you provided. It's complex the chapter encoding, I need to find a bit more time to get my head around this one.

Related PR adding chapter decoding: #325.

Borewit avatar Jan 19 '21 19:01 Borewit