Libation icon indicating copy to clipboard operation
Libation copied to clipboard

Libation not downloading best available quality

Open gitaiuser20 opened this issue 1 year ago • 13 comments

Libation when set to "Audio quality to request from Audible: High" and "Download my books in the original audio format (Lossless)" is not getting the best available quality.

For the book Words of radiance by brandon sanderson read by kate reading and Michael kramer, when i attempt to download it i get a file that is 1.28 gb in size, when i set "Audio quality to request from Audible: Normal" i get a file that is around 600-700mb, however on the Audible app on android on high quality setting I'm getting a file that is 2.7ish gb, and has much better quality than the high quality one on audible. i believe this higher quality version is a relatively recent addition that may not have been available when the book first came out a few years ago.

gitaiuser20 avatar Oct 10 '24 20:10 gitaiuser20

I don't have Words of Radiance, but I do have Way of Kings in my library. Does this give you a similar discrepancy?

rmcrackan avatar Oct 11 '24 02:10 rmcrackan

Yes, i just attempted WoK, on android file size is 2539mb, the m4b from Libation is 1.21 GB when "Audio quality to request from Audible: High", and 616 mb when "Audio quality to request from Audible: Normal"

I don’t know if this is helpful knowledge, but i tried using Book Lib Connect which is similar to your software,and i had a similar issue. there is unfortunately no Audible for PC atm to compare with however.

gitaiuser20 avatar Oct 11 '24 14:10 gitaiuser20

update: I just tried to do the same with the book Leviathan Wakes by James F. A. Coley, and there is the same issue. The file I got from Libation set to high quality is 522 MB, whereas the file I got from Audible Android is 861 MB, and the one from Audible is much clearer.

I'm thinking Audible recently added a new tier of higher quality (since I'm pretty sure that up until recently the quality libation got was the same as the high that was on audible) and libation is not getting this higher tier

gitaiuser20 avatar Oct 11 '24 18:10 gitaiuser20

@gitaiuser20 Can you compare the files downloaded with Libation and the Android app using MediaInfo or another tool which can show you the codec. I’m think you have activated „Spatial Audio“ on the Android Audible app? Then the „huge“ audiobook downloaded with Android can be in Dolby Atmos format.

mkb79 avatar Oct 11 '24 18:10 mkb79

i tried turning off spatial audio and redownloaded, I'm getting the same size file.

as for checking them, when i try to look for the audiobook files on my android phone, i found loads of folders with exo files, so not sure what to check tbh

gitaiuser20 avatar Oct 11 '24 18:10 gitaiuser20

How do you know that the audiobook downloaded with the Android app are larger? You have to look for files with the extension aax, aaxc or mp4 (if spatial is enabled)!

mkb79 avatar Oct 11 '24 18:10 mkb79

when i click download on the app as it is downloading i get the file size.

now that I'm checking again, there are folders with names ending in .mp4, but inside it are more folders and inside them are the exo files.

gitaiuser20 avatar Oct 11 '24 18:10 gitaiuser20

As far as I could read about exo files this are chunk files and merged, to the target file, when all parts are downloaded. MP4 hints that these are Spatial audio files with another codec (Dolby Atmos)!

mkb79 avatar Oct 11 '24 18:10 mkb79

if this is the dolby atmos format, is there anyway of downloading them using libation?

gitaiuser20 avatar Oct 11 '24 19:10 gitaiuser20

It is possible but need some knowledge. You can read here some backgrounds about these topic.

mkb79 avatar Oct 11 '24 19:10 mkb79

i have absolutely no experience or coding knowledge unfortunately, but thanks for your responses

gitaiuser20 avatar Oct 11 '24 19:10 gitaiuser20

I've been looking around on audible website, and it doesn't seem like the titles i mentioned have dolby atmos, at least it's not mentioned anywhere from what i can find, i wonder what this means

gitaiuser20 avatar Oct 11 '24 19:10 gitaiuser20

I've been experimenting some more and checking Audible, according to this Audible page turning off spatial audio on the app means you will not download the Dolby Atmos even if it is available for a book, and turning it on or off doesn't make any difference to file size or quality of the books I've tried (also Audible doesn't say the books i tested have dolby atmos).

Another thing of note, for The Way of Kings, when i set the quality to Standard on my android the file size is still different the Standard one i get from Libation (standard from libation is 616 mb, while from my audible app it's 829 mb.

i think that maybe Audible has been updating the files they had with ones of higher quality and for some reason Libation is not getting those higher quality files.

gitaiuser20 avatar Oct 20 '24 21:10 gitaiuser20

Saw this thread and wanted to test. On the ios app, with or without spatial audio enabled the download was 2.78GB. The corresponding *.aax file downloaded by libation was 1.3GB. Funnily enough my folder with both the aax and the m4b also summed up to 2.78GB. A coincidence I'm sure. :-) There are two different publishers of the audiobook, so the size difference compared to OP might be due to that.

Merkapt avatar Nov 07 '24 18:11 Merkapt

but why would my Libation be downloading a version from one publisher and my android app from another publisher? and why is there a noticeable difference in quality ? I've been playing the libation version and audible version side by side with multiple books and the audio quality difference is very noticeable

(others I've tried recently are gardens of the moon, leviathan wakes and oathbringer, i think orconomics was also the same, interestingly Rhythm of War (book 4 of the stormlight archive) actually has the same size file and sound quality as that in the android app unlike the earlier books in the series that got the new higher quality. there is definitely something here, it could be that those books have a higher quality but it's in mp4 like another comment suggested (even though they aren't dolby books) so Libation doesn't get that higher quality. it's not just downloading duplicates, especially considering a lot of the bigger size files books don't add up to double the Libation file.

gitaiuser20 avatar Nov 22 '24 20:11 gitaiuser20

I am experiencing this same thing now with Wind and Truth by Sanderson

ScrolBar avatar Dec 20 '24 04:12 ScrolBar

I'm observing the same when trying to download Wind and Truth by Brandon Sanderson (Audible US market).

Using Libation (11.1), after decryption into mp4, resulting size is almost 1,7GiB (1754733k). This is using the "Audio quality to request from Audible: High" in settings.

When trying to download on iOS (version 4.35.1) or Android (3.90.0) apps, with Download High quality enabled (Spatial audio setting has no effect as the book is not in Dolby Atmos), the resulting size is almost 3,5GiB. When looking at the downloaded files (Android only) I see around 9 directories full of *.exo files, each approximately 30MiB in size.

I did listening test on iPhone 16 speakers, between the Audible version and Libation decrypted MP4 (played via MP3 book player), and I can't tell any difference - it sounds exactly the same (to me). Could it be just an ineffective way of downloading on the mobile apps (and I guess the web player will be the same), but for only some books?

I tried also Orwell's 1894 dramatized by Audible that's in Spatial audio, and size was: 200MiB from Libation (MP4), 200MiB when downloaded on Android/iOS without Spatial audio, and 1,2GiB when downloaded with Spatial audio (iOS only, can't do that on rooted Android). So here Libation and iOS/Android versions are the same size.

In any case, version downloaded by Libation seems of same (to me) quality, so I have no concern. But as seen above, different books behave differently, so any additional insight to this topic would be appreciated.

rsipka avatar Dec 20 '24 14:12 rsipka

Maybe to some the difference inst that noticeable but I notice it with headphones on for sure. It sounds like really low bit rate audio (because it is) which distorts the narrators voice a bit and just sounds less pleasant to listen to

ScrolBar avatar Dec 20 '24 22:12 ScrolBar

This is still an issue, and I think it primarily applies to longer books.

The ideal way to diagnose this would be to have an Android phone (which I don't have anymore) and use an on-device SSL inspection and packet capture app to catch all the HTTPS queries before they leave the phone, to see what the Audible app is actually doing differently to Libation when downloading books. Did this type of thing many years ago but bit out of practice now.

Something like this: https://medium.com/@roy2477/decrypting-android-app-ssl-traffic-c480e2143743

EpicPilgrim avatar Feb 11 '25 09:02 EpicPilgrim

@mkb79 How did you handle the quality drop? I found your issue and changelog but I couldn't find how you actually addressed it.

rmcrackan avatar Feb 11 '25 12:02 rmcrackan

@mkb79 How did you handle the quality drop? I found your issue and changelog but I couldn't find how you actually addressed it.

In the past, in addition to "normal" and "high", there was also "extreme" as a quality setting. But "extremes" have not existed for a while. Therefore, I only support the first two.

But the crucial question is, what does the Android Audible app download for files? If I were you, I would connect the mobile phone to the computer, if possible, and search for the files and then look with a tool like MediaInfo to see which codec is actually used with which quality.

mkb79 avatar Feb 11 '25 12:02 mkb79

But the crucial question is, what does the Android Audible app download for files?

I get a directory called Internal shared storage\Android\data\com.audible.application\files\exoCache\bk_adbl_063268_44_128-xhe.mp4 full of .exo files. This is for "This Inevitable Ruin" that downloads as 64kbps from a web browser and Libation, but 128kbps on the mobile app.

samszotkowski avatar Feb 11 '25 14:02 samszotkowski

An update. I downloaded and tested audible-cli and it downloads at the correct quality. Had to learn some ffmpeg magic to convert it to m4a, but it's full quality when done this way. So there's some difference between how Libation does it, and how audible-cli does it.

EpicPilgrim avatar Feb 12 '25 02:02 EpicPilgrim

@EpicPilgrim

I downloaded and tested audible-cli and it downloads at the correct quality.

This isn't the case for me. I tried the following commands with the latest Audible CLI from pipx:

audible download -a B004FUHT2S -q best --aax

audible download -a B004FUHT2S -q best --aaxc

Both commands resulted in a file that's the same size and quality as Libation obtains: ~64Kbps stereo AAC at 22050Hz, around 263 MB. The version downloaded by the Audible iOS app is 559 MB and sounds noticeably better.

Are we running the same version of Audible CLI?

>audible --version
audible-cli, version 0.3.1 (up-to-date)

jscholes avatar Feb 12 '25 03:02 jscholes

Both commands resulted in a file that's the same size and quality as Libation obtains: ~64Kbps stereo AAC at 22050Hz, around 263 MB. The version downloaded by the Audible iOS app is 559 MB and sounds noticeably better.

Are we running the same version of Audible CLI?

Yes we are. Ok, this is weird. I just re-downloaded the same book with Libation that I tried downloading yesterday, and now it's double the file size, in the same full quality that audible-cli downloaded earlier. Looking at yesterday's download, it was still 44khz, but only ~64kbps. Today's is 44khz and ~128kbps.

Feel like there's something on Audible's side that we don't get to see that has a determination of what quality we get when we request the offline copies. A packet sniff of the unencrypted traffic from legit Audible apps would be very interesting to see.

EpicPilgrim avatar Feb 12 '25 03:02 EpicPilgrim

Ok, this is weird. I just re-downloaded the same book with Libation that I tried downloading yesterday, and now it's double the file size, in the same full quality that audible-cli downloaded earlier. Looking at yesterday's download, it was still 44khz, but only ~64kbps. Today's is 44khz and ~128kbps.

Exact same experience here -- yesterday it was 64k from Libation or 128k (in three parts) from audible-cli, today it's 128k all in one part from Libation. So it seems like maybe an Audible issue? The book in question did just release about 36 hours ago.

samszotkowski avatar Feb 12 '25 16:02 samszotkowski

I'm experiencing this with books that were released multiple decades ago (i.e. they have reviews on Audible from before 2005). So I don't think recent releases has anything to do with it.

jscholes avatar Feb 12 '25 16:02 jscholes

This inevitable ruin in particular i think is an audible issue (they may not have fully uploaded or made the 128kbps version available initially maybe) because even on my android when it first released i could only download the 64kbps version but now i can download it full quality.

That said, I've been experiencing this issue with many other books and most/all of them were released years ago.

gitaiuser20 avatar Feb 12 '25 16:02 gitaiuser20

This is reminiscent of yt-dlp, where sometimes you have to list out all the formats for a video several times before the actual highest quality video/audio formats appear as an option. You could download with a best quality flag two times and get two different results because YouTube can lie about what formats are actually available. Don't know if it's the same idea here, but it's a thought.

samszotkowski avatar Feb 12 '25 16:02 samszotkowski

I wonder if it has anything to do with this?

https://aws.amazon.com/blogs/networking-and-content-delivery/cloudfront-migration-series-part-2-audible-plus-the-turning-point/

jscholes avatar Feb 12 '25 16:02 jscholes