Last active
September 3, 2018 15:44
-
-
Save ironicbadger/289751a955388d0143a755073628f452 to your computer and use it in GitHub Desktop.
automated audiobook DRM stripping
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
#!/bin/bash | |
# ./convert -a asdfghjk | |
# Obtain an activation_bytes string and plug it into this script with -a. | |
FILES=aax/* | |
OUTPUT=mp3 | |
while getopts a: option | |
do | |
case "${option}" | |
in | |
a) ACTIVATION=${OPTARG};; | |
esac | |
done | |
for f in $FILES | |
do | |
echo "Processing Audiobook $f ..." | |
fileshort=$( echo "$f" | cut -c 5- ) | |
ffmpeg -y -activation_bytes $ACTIVATION -i $f -ab 320k $OUTPUT/${fileshort%????}.mp3 | |
echo "Processing of Audiobook $f complete..." | |
echo "#########" | |
done |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment