TheMetalCenter / m4b-mp3-chapters-from-cuesheets

merge audiobooks or podcasts without re-encoding (remuxing only) to single m4b with quicktime/nero chapters or mp3 with id3v2 chapters using cuesheets; also allows for renaming/editing chapters
23 stars 0 forks source link

M4B QuickTime chapter limit of 255? #14

Open TheMetalCenter opened 2 years ago

TheMetalCenter commented 2 years ago

Unable to write more than 255 chapters to an m4b file. This appears to be an inherent limitation with m4b QuickTime chapters (Nero chapters may support more than 255); ffmpeg attempts to write excess chapters to the file but only 255 are present in the output file. I'm not sure if this can be solved, unfortunately. Assuming mp3 does not share this limit (to be tested), it may be necessary to reencode the m4b to an mp3 and use id3v2.3 chapter tags. Alternatively, the m4b can be split into multiple parts (though both reencoding and splitting is against the spirit for this repo...). The best case would be the original conversion of the purchased aax file to mp3, then chapter tagging.

AudioAnchorite commented 5 months ago

Thank you for putting this comment up, I went through quite the process to try and edit the chapters on Edward Gibbon's Decline & Fall of the Roman Empire (Gibbon had awful, ignorant views on a lot of things, but the audio book is 126 hours long and has very long chapter names, which makes it ideal for testing out M4B utilities like yours).

Your comment is the only thing that shows up in search engines regarding this limit, otherwise I would have taken much longer to figure out the problems!

Also, the README needs to be changed to instruct users to put all of the files from your repository into the FFMPEG/bin folder. I had a number of errors from missing files after I put in only the ones that are currently mentioned. Solved by copying over the entire folder contents.

Finally, thank you very much for all of your work on this, it's really a fantastic set of scripts and programs, and does EXACTLY what I want (editing chapters via CUE sheet).

TheMetalCenter commented 5 months ago

I'm glad it was of help! A handful of people have saved the repo, but I think you may be the first to try it out! It's rather convoluted method so I am not surprised, but it really is convenient after the upfront work setting it up.

Thanks for the comment on the readme. It probably needs a bit more detail in parts.

AudioAnchorite commented 5 months ago

I just now finished my analysis of the spectral waveforms of the original M4B and the file that I modded your repo. It really does leave the audio streams untouched!

I have tried InAudible, AudioBook Converter, Libation, and Drax, and I could never get a solid answer regarding how those programs handled chapter editing. It seemed that some of them were really performing transcodes during the save process, due to the fact that there were marked differences in the spectral waveform comparisons.

Your repo is the real deal! This really made my day, thanks again! Hopefully someday a dev out there somewhere will incorporate this into a GUI for editing audio books.

Edit: I also just noticed that I missed one of the chapters in the CUE file and left it with 361 characters. It looks like the chapter name just gets truncated, no errors caused by it.