audiamus / BookLibConnect

A standalone Audible downloader and decrypter
GNU General Public License v3.0
701 stars 40 forks source link

AAX Export doesn't support Chapter mode on Sansa Clip Jam #24

Closed Sailfish closed 2 years ago

Sailfish commented 2 years ago

BookLibConnect v0.5 It appears that yesterday was the transition to the new .aaxc format which seems to no longer support the Sansa Clip MP3 player as did the the previous .aax format. BookLibConnect Export .aax format will play on the Sansa Clip; however, the chapter mode does not work, i.e., whenever I press the Chapter FWD or BACK buttons, it takes the book all the way back to the beginning.

audiamus commented 2 years ago

Well, the AAX export is still the M4B file, only renamed to AAX. The M4B file should have all the embedded chapters. Have you tried to play the M4B file with VLC or MPC-HC?

Sailfish commented 2 years ago

Interestingly, the .m4b file works fine in VLC but not the exported .aax file on the Sandisk Snasa MP3 player. Regrettably, the Sandisk MP3 player does not support .m4a nor .m4b. All of the .aax files downloaded from Audible do.

Observing the Sansa small display it appears that when I press the Fwd/Back buttons, the chapter number does increase/decrease but the audio doesn't move (or goes back to beginning of chapter.) In fact, it seems like there is something in the BookLibConnect .aax file that the player gets hung-up on since it is extremely slow to process the file when loading and when pressing buttons; although it does play okay. Could it be that the BookLibConnect .aax file contains other information than what comes from Audible and, somehow, the Sansa player gets confused by it?

audiamus commented 2 years ago

Regrettably, the Sandisk MP3 player does not support .m4a nor .m4b.

Does it support .mp4? You could rename the .aax file and test it.

Could it be that the BookLibConnect .aax file contains other information than what comes from Audible and, somehow, the Sansa player gets confused by it?

Well, as I said, that .aax file from Book Lib Connect is actually the .m4b file. The .m4b file is the result of decrypting the .aaxc file. The decrypting is performed by AAXClean. And AAXClean also restores chapter information. I don't know much about audio streams and how chapters are embedded into it. As its author told us, AAXClean is a C# port of FFmpeg C code for AAX/AAXC file handling.

There is a bug in the official release package of AAXClean which leads to an integer overflow for long or high audio quality books, messing up chapter order. Therefore, the prebuilt Book Lib Connect you install via the setup package comes with a patched version of AAXClean since Book Lib Connect 0.3. So, if the chapters in your .m4b file are sorted correctly in VLC and MPC-HC, the .m4b file should be OK.

You can always convert the Book Lib Connect pseudo .aax file in AAX Audio Converter. That was the purpose of the export function anyway. AAX Audio Converter applies additional meta data restoration. I suggest to convert to .mp3. Your player may support .mp3 embedded chapters, but I'd recommend to split the book into chapter files, because AAX Audio Converter will be able to parallelize the transcoding, working much faster. And I would presume that a dedicated MP3 player supports playlists.

Sailfish commented 2 years ago

Sorry for delay in responding but below is what I've discovered.

Update: 7:05pm : I purchased another title from Audible and the download *.aax file worked swimmingly. So, apparently, that previous title had issues with it. You can close this out at your convenience.

audiamus commented 2 years ago

Interestingly, neither Windows Media Player nor VLC 'recognized chapters when playing the .mp3 but VLC did when playing the .m4b version.

That observation is correct. While chapters are defined in the ID3v2 specs, as an addendum, not many tools support it. (ID3v2 is the standard for meta data in MP3.) MPC-HC does, for instance. VLC does not. I didn't know these subtleties myself in the earlier stages of AAX Audio Converter. I guess the shortcomings with MP3 embedded chapter support was one of the reasons why a number of Audible converters offer chapter splitting.

As you know, AAX Audio Converter goes beyond that and offers even shorter tracks, while still observing the chapter structure. Many audio players support playlists, so the length of a track is not an issue, and neither is transition, as long as the tracks are cut in periods of silence. Transcoding to many tracks has two advantages, as you will also know from your long experience with AAX Audio Converter: One is parallelization. We can spread the transcoding work, which is computation-intensive, across all cores of the CPU, and hereby significantly shorten the conversion process. The other is ease of navigation. I often mention that I originally used the officially endorsed iTunes procedure, burning to (virtual) CDs. That method produced 8 minute tracks. I got used to that when listening to an audiobook while driving in the car. You concentrate on traffic and can't give your full attention to the book at all times. With the steering wheel controls you can easily switch back and forth between tracks, if you need to catch up on something, without even looking on the car radio screen.

For MP4, chapters are totally different. Two formats exist, one woven into the audio stream, one external to it. They usually go by the name of their provenance and are called Quicktime and Nero, but don't ask me which one is what. Audible AAX and AAXC only have one of them, only after processing with AAX Audo Converter you will have both, thanks to ATL.net, another great Open Source project. It's also ATL.net that produces the MP3 chapters.