Created
November 18, 2018 22:38
-
-
Save gentam/9dd0fd548518876437c1bea362759db8 to your computer and use it in GitHub Desktop.
convert Audible AAX file to MP4
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/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