How to Remove the DRM on Amazon Audible Files - Updated

How to Remove the DRM on Amazon Audible Files - Updated

Editor’s Note: When I first published this article, the https://audible-converter.ml/ shortcut method still worked. As of August 2023, that site is down. The method below using RainbowCrack still works perfectly.

Why You Should Care

As Amazon continues to expand their collection of books, music, and audiobooks, licensing disputes with publishers and authors will continue to cause problems. What this means for us as users is that we could lose access to media we purchased on Amazon’s platform. This has happened before and will happen again when you least expect it.

So here’s how to take back what’s yours.

Prerequisites

You’ll need:

  • A Linux machine (bare metal, VM, or WSL2)
  • Command line access
  • Your Audible audiobook files

If you’re using WSL2, you’ll need to copy files from the WSL instance into your Windows home folder locations.

Understanding .aax Files

Amazon’s audiobooks arrive in a DRM-locked format: .aax. This proprietary format only works with approved players like iTunes, VLC, and a few others.

I love to self-host and keep things on my own servers, so lugging around .aax files that only work in specific software is a no-go for me. The solution is converting them to .m4b format.

Why .m4b over .mp3?

  • Chapter support
  • Better sound quality at low bitrates
  • Robust metadata support

While .mp3 is more universal, it lacks these features. Apps exist that track your position in .mp3 audiobooks, but I’ve found most don’t work exactly how I’d like them to.

Step 1: Download Your .aax Files

Log into your Audible account and click the Library tab. You may need to use a computer or enable desktop mode on mobile.

Audible Library

Download your audiobooks. Some larger books may have multiple file downloads, but if your internet speed allows, grab the full-sized version. This saves you from combining files later.

Step 2: Install ffmpeg

On Debian/Ubuntu:

$ sudo apt install ffmpeg

For Arch or Fedora, use your distro’s package manager.

Step 3: Get Your Activation Hash

Run ffprobe (included with ffmpeg) to extract the file’s checksum. The important part: all your Audible files use the same activation code, so you only need to do this once.

$ ffprobe your-favorite-book.aax 

Look for this line in the output:

[mov,mp4,m4a... [aax] file checksum == 123456789abcdef123456789abcdef

Finding the checksum

Copy that checksum string - you’ll need it next.

Step 4: Crack the Activation Code with RainbowCrack

You need a specific fork of RainbowCrack from inAudible-NG’s GitHub. Do not use the rainbowcrack package from your distro’s repo - it won’t work.

Clone the rainbow tables and crack your hash:

$ cd ~/Downloads
$ git clone https://github.com/inAudible-NG/tables.git
$ cd tables/
$ ./rcrack . -h 123456789abcdef123456789abcdef

Running git clone

Running rcrack

The output will give you your 8-character activation code after “hex:”. Save this code - you’ll use it for all your Audible files.


Outdated Method: The site https://audible-converter.ml/ used to crack these hashes instantly, but it’s been down since August 2023. If it comes back online, you can skip the RainbowCrack step above.


Step 5: Convert to .m4b

Now convert your .aax files to .m4b using your activation code. The conversion takes only seconds, even for large files:

$ cd ~/Downloads
$ ffmpeg -activation_bytes your_activation_bytes_here -i filename.aax -vn -c:a copy output.m4b

That’s it. You now have a DRM-free .m4b file playable in virtually any audio player.

Easy Mode: Batch Conversion

If you have multiple files, use this one-liner. Make sure you’re in the directory with your .aax files and replace your_activation_bytes_here with your actual activation code:

Simple one-liner:

$ for i in *.aax; do ffmpeg -y -activation_bytes your_activation_bytes_here -i "$i" -map_metadata 0 -id3v2_version 3 -codec:a copy -vn "${i%.aax}.m4b"; done

Script with thumbnail extraction:

#!/bin/bash
# Replace with your actual activation bytes
activationBytes="put-your-activation-bytes-here"

for m in *.aax; do
  basename=${m%.aax}
  
  # Extract audio stream
  ffmpeg -activation_bytes $activationBytes -i ${basename}.aax -map_metadata 0 -id3v2_version 3 -codec:a copy -vn ${basename}.m4b
  
  # Extract cover art
  ffmpeg -activation_bytes $activationBytes -i ${basename}.aax -an -vcodec copy ${basename}.jpg
done

Extra: Merging Multiple .m4b Files

If you downloaded your audiobook in parts, here’s how to merge them into a single file:

# Convert m4b files to aac
$ ffmpeg -i file1.m4b -acodec copy file1.aac
$ ffmpeg -i file2.m4b -acodec copy file2.aac

# Merge aac files
$ cat file1.aac file2.aac >> filenew.aac

# Convert merged file back to m4b
$ ffmpeg -i filenew.aac -acodec copy -bsf:a aac_adtstoasc filenew.m4b

Final Thoughts

After running through these steps, you now own your audiobooks without right relying on big corporations to host them or control what you can do with them. You can back them up, play them on any device, and never worry about losing access due to licensing disputes.

Self-hosting isn’t just about control - it’s about true ownership of what you’ve paid for. Hopefully this sparked an interest in taking back more of your digital property.