Open BenMcLean opened 3 years ago
Hey there,
thanks for thinking about exporting cue sheets. This should not be too complex, m4b-tool
already supports splitting by cue sheets... here is an example how an export cue sheet could look like for an audio book:
REM GENRE Fantasy
REM DATE 1999-11-08
PERFORMER "Stephen Fry"
SONGWRITER "J. K. Rowling"
TITLE "Harry Potter and the Philosopher's stone"
FILE "harry-potter-1.m4b" m4b
TRACK 01 AUDIO
TITLE "The Boy Who Lived."
PERFORMER "Stephen Fry"
INDEX 01 00:00:00
TRACK 02 AUDIO
TITLE "The Vanishing Glass"
PERFORMER "Stephen Fry"
INDEX 01 06:42:00
Although there is a lot of missing information, it might be helpful to be able to export cue.
Unfortunately it will take some time till this will make it into the code though...
Yeah that'd be perfect. I was thinking of hacking together my own script to do it with Python or something bare bones like that, but if you can put it in m4b-tool instead, that'd be great. Appreciate anything you can do, whenever. :)
If you just need the metadata (regardless in what format), the latest pre-release already is able to export some formats within the meta
command - this is where the cue export would also be implemented. There is not only a "chapters" option - it is also possible to --export-cover
or --export-description
.
See m4b-tool help meta
for a detailed list of all available options. Some examples:
# use default export filename my-audio-book.chapters.txt
m4b-tool meta my-audio-book.m4b --export-chapters
# use specific filename
m4b-tool meta my-audio-book.m4b --export-chapters=my-chapter-export.txt
# export everything in every format that is supported
m4b-tool meta my-audio-book.m4b --export-all
You can also import chapters the same way, so an export, then editing and then import is no problem, while --import-all
will have a priority of what to import, since there are conflicting formats...
Ok, after some research it seems that cue
is clearly not meant for audiobooks (although that does not mean, that there is no way to abuse / workaround it to fit audiobooks needs). Here's why:
REM
, but this is non standard), so Chapter names would not be possible in every caseffmetadata
) are not specified or non standardSo for now i have to set this back, since m4b-tool
is mainly used for audiobooks, but I'll leave this ticket open because it also can be used for other audio files and the topic is pretty interesting.
A good (german) resource for cue sheets is: https://www.audiohq.de/viewtopic.php?id=2695
- Cuesheets can have a Maximum of 99 tracks (00-99) - so if there is an audiobook with more than 99 Chapters, a "workaround" in form of sub-indexes would be required
I'm happily using .cue as a sidecar for audiobooks, and chapters of several hundred indexes work just fine with all audio players I've tied (inluding mobile ones for Android).
Yes. sub-chapters would be nicer for navigation, but because the actual mp3 chatper spec (mp3merge supports it) is too compilcated and thus was never widely adopted imho cue is the way to go for mp3. For other formats like mp4 and ogg the chapters can be embedded.
Given that I have an m4b or wv file that already has chapters encoded into it, I'd like to output a .cue file or other playlist file with the chapter times in it. That way even programs without proper chapter support could still use the chapters