Last active
August 29, 2015 14:22
-
-
Save EmmanuelKasper/cf398f1b2163dd1f7541 to your computer and use it in GitHub Desktop.
Convert files for atari STE background playing: see http://atari.8bitchip.info/STEbap.html
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/sh | |
# if no parameter is passed, consider we want to convert mp3 files | |
test -n "$1" && EXT=$1 || EXT=mp3 | |
#remvove spaces and funky characters in file names | |
detox *.${EXT} | |
#shorten file names to follow FAT 8.3 convention | |
rename -v "s/(\S{8}).*/\$1.${EXT}/g" *.${EXT} | |
for F in *.${EXT} ; do | |
CURRENT_NAME=$F | |
FUTURE_NAME=$(basename $CURRENT_NAME .${EXT}) | |
echo processing $CURRENT_NAME | |
# -ar set audio sampling rate to 50066 Hz | |
# -c:a pcm_s8 convert to signed 8 bit PCM | |
# -map_metadata -1 strip metadata from file (like artist name) | |
# -f au to force AU file format since we use wae filename extension | |
avconv -i $CURRENT_NAME -ar 50066 -c:a pcm_s8 -map_metadata -1 -f au $FUTURE_NAME.wae 2>/dev/null | |
done |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment