Skip to content

Instantly share code, notes, and snippets.

@Mnkai
Forked from Lana-chan/md.sh
Last active March 20, 2017 12:30
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save Mnkai/c3de690869e2d4e18bba7c9931fa86e7 to your computer and use it in GitHub Desktop.
Save Mnkai/c3de690869e2d4e18bba7c9931fa86e7 to your computer and use it in GitHub Desktop.
Zsh script for batch converting wav, flac, mp3 files into ATRAC3-LP2 format (MDLP)
#!/bin/zsh
mkdir aa3
for file in $PWD/*.(mp3|flac|wav) ; do
fullfilename=$(basename $file)
filename=${fullfilename%.*}
ffmpeg -nostats -loglevel panic -i $fullfilename -ar 44100 temp.wav
# ATRAC3Tool can be found here: https://github.com/Treeki/atrac3tool
WINEDEBUG=-all wine atrac3tool.exe temp.wav temp.aa3
mv temp.aa3 aa3/$filename.aa3
rm temp.wav
done
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment