Skip to content

Automate the conversion of AAX files to files that you can play in any software on any device

License

Notifications You must be signed in to change notification settings

brainthinks/Audible-AAX-Converter

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

18 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Audible AAX Converter

Put your legally purchased and obtained audiobooks from Audible on the device and player of your choosing, not Amazon's.

Table of Contents

Mission Statement

Amazon/Audible claims that they do not allow you to keep your library, or at least retain access to it, if you don't pay monthly or yearly.

According to their website (as of 2020):

When your membership is canceled your membership will remain active until the
end of your final billing period. After that, you will no longer be able to
listen to the thousands of included Audible Originals, audiobooks, and podcasts.
Even if they are already in your Library. You can continue to listen to free
podcasts without membership.

I thought, like with most other services, that if I paid for an individual item, I would not need to pay a recurring service fee to continue to have access to that item. I can no longer afford to pay a monthly/yearly fee, but I will lose my entire library of audiobooks if I stop.

I want to have access to the things that I pay for on my own terms.

The goals of the project are to allow you to:

  1. Retrieve your activation bytes from Audible (via mkb79/audible-cli), allowing you to decrypt your AAX and AAXC files.
  2. Download your entire library (via mkb79/audible-cli).
  3. Decrypt and convert your AAX and AAXC files to MKV files.
  4. Convert your MKV files to mp3 so they can be played on most devices and players.
  5. PRESERVE your original AAX, AAXC, MKV, images, and metadata.
  6. Close your account if you wish, and still have access to the content you paid for.

Use

Follow the steps below, in order, to get your audiobooks as easily-playable mp3s.

Linux (Mint, Ubuntu)

Prerequisites

TODO

You'll need at least ffmpeg (I'm currently using 4.4.2-0ubuntu0.22.04.1) and jq:

sudo apt install ffmpeg jq

Getting your activation bytes

This is essentially your decryption key for your AAX files, and possibly also partially for AAXC files. Check out the excellent mkb79/audible-cli project.

Use that project to retrieve your activation bytes, and store them somewhere, such as in ./config/activation_bytes.txt.

Downloading your library

Once again, see the excellent mkb79/audible-cli for a tool that will allow you to download your entire library.

audible list

# Note you can replace `-a ASIN` with `--all` to download your entire library.
# In my example command here, I prefer to get the AXX files, since that makes
# decryption simpler, but in some cases, AAXC is the only option. That's fine,
# as this project can now decrypt either format.
audible download -a "${ASIN}" \
    --aax-fallback \
    --pdf \
    --cover \
    --cover-size 1215 \
    --chapter

Decrypting your AAX and AAXC files to MKV

Note that even though this project has "converter" in the title, this step doesn't actually perform any re-encoding of AAX or AAXC files. Instead, the information contained in the files is extracted in its original form, stripped of encryption, and placed in a more open "container" that you can then play on the device or software of your choosing. This allows us to archive our legally-obtained audiobooks with zero loss in quality and no messy / lossy transcodings or re-encodings (such as from AAX to WAV to FLAC to preserve the audio quality). It also allows you to keep the cover art and metadata (such as chapters!), which is something that transcoders of AAX files typically do not retain. Also, since the files are almost simply copied and pasted, this script will convert your AAX and AAXC files about as fast as your hard drive can copy data.

  1. All commands are assumed to be run from the project directory
    1. e.g. if you run ls, you should see README.md etc.
  2. Create a config file
    1. cp ./config/convert_aax_config.sample.sh ./config/convert_aax_config.sh
  3. Modify the values in ./config/convert_aax_config.sh. Each var is documented in the file.
  4. Run the script!
    1. ./src/cli/convert_aax.sh

When the script has completed, you can find your files in the directories you supplied in ./config/convert_aax_config.sh.

Converting your MKV files to mp3

You should now be able to play your MKV files with the player of your choosing, though MANY players cannot handle files this large / long. The only one I could get to work on my machine was Celluloid. VLC and SMPlayer fail. Since these huge files in MKV format are not necessarily the most portable, I use them strictly for archival purposes. Since each book is typically many hours long, I want them to be in a format that just about any device or program can play, and can keep track of. In my experience, most media players on Android devices have difficulty seeking huge files. If I try to skip around, I am often sent back to the very beginning of the book, and skip ahead by 4 hours to get back to the point where I stopped listening. Even if I don't seek manually, but use a program that can seek to the time I was at when I stopped listening, the player can't do it, and I am sent back to the beginning.

In my experience, the easiest way to get around these limitations is to split the books up by Chapter, so that each Chapter is its own file. Since doing that, I have not had a problem seeking and skipping around, and the player I use can resume the book where I last left off.

The player I recommend for this (at least on Android) is Voice Audiobook app, which is on the Google Play store, FDroid, and GitHub:

To put these books in a format that is most easily played on the most devices and the most players (in my experience), my script will do the following:

  1. Create a single folder per book
    • I used to do a folder for the author, then a folder for the title, but some players, such as Voice, "prefer" the books to not be in nested folders.
  2. Split the book into Chapters, one file per Chapter (as defined by the Audible metadata).
  3. Convert each chapter to mp3
    • Remember, you still have the original archived / preserved as a lossless MKV
  4. Generate the playlist (m3u file) and cover art

Here's how to do it:

  1. All commands are assumed to be run from the project directory
    • e.g. if you run ls, you should see README.md etc.
  2. Create a config file
    • cp ./config/convert_mkv_config.sample.sh ./config/convert_mkv_config.sh
  3. Modify the values in ./config/convert_mkv_config.sh. Each var is documented in the file.
  4. Run the script!
    • ./src/cli/convert_mkv.sh

Note that going from MKV to mp3 takes significantly longer than going from AAX to MKV, since each audio file has to be re-encoded.

Windows

TODO

MacOS

TODO

References

About

Automate the conversion of AAX files to files that you can play in any software on any device

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published