Last active
September 14, 2020 08:32
-
-
Save bcremer/fd3e6b7242b82afd25e8a989f5578435 to your computer and use it in GitHub Desktop.
Script to convert audible aax files to DRM-free m4b files via ffmpeg
This file contains hidden or 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/bash | |
## extract once using https://github.com/inAudible-NG/audible-activator | |
activationBytes="" | |
for m in *.aax; do | |
basename=${m%.aax} | |
# extract audio stream | |
ffmpeg -activation_bytes $activationBytes -i ${basename}.aax -vn -c:a copy ${basename}.m4a | |
# extract thumbnail | |
ffmpeg -activation_bytes $activationBytes -i ${basename}.aax -an -vcodec copy ${basename}.jpg | |
mv ${basename}.m4a ${basename}.m4b | |
mp4art --add ${basename}.jpg ${basename}.m4b | |
mp4file --optimize ${basename}.m4b | |
done |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment