Skip to content

Instantly share code, notes, and snippets.

@gentam
Created November 18, 2018 22:38
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save gentam/9dd0fd548518876437c1bea362759db8 to your computer and use it in GitHub Desktop.
Save gentam/9dd0fd548518876437c1bea362759db8 to your computer and use it in GitHub Desktop.
convert Audible AAX file to MP4
#!/usr/bin/env bash
[ $# -ne 1 ] && { echo >&2 "Usage: `basename $0` audiobook.aax"; exit 1; }
type ffmpeg > /dev/null 2>&1 || { echo >&2 "Error: ffmpeg required"; exit 1; }
SRC="$1"
ACTIVATION_BYTES='' # can be obtained by audible-activator <https://github.com/inAudible-NG/audible-activator>
[ "$ACTIVATION_BYTES" = '' ] && read -p '4 byte activation secret (e.g. 1CEB00DA): ' ACTIVATION_BYTES
ffmpeg -activation_bytes "$ACTIVATION_BYTES" -i "$SRC" -vn -c:a copy "${SRC%.aax}.mp4"
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment