Created
March 22, 2019 16:48
-
-
Save cosimo/27492b76c411b148c6095bf1ef456651 to your computer and use it in GitHub Desktop.
Convert any MP3 to the format required by Amazon for Alexa audio tags
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
#!/bin/bash | |
INFILE="$1" | |
OUTFILE="$2" | |
which ffmpeg > /dev/null || { | |
echo "You need ffmpeg to convert audio files to Alexa MP3 format" | |
exit 1 | |
} | |
if [ -n "$INFILE" -a -n "$OUTFILE" ]; then | |
ffmpeg -i "$INFILE" -ac 2 -codec:a libmp3lame -b:a 48k -ar 16000 "$OUTFILE" | |
else | |
echo "Usage: $0 <infile> <outfile>" | |
exit 2 | |
fi |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment