Created
December 23, 2021 08:56
-
-
Save allen0125/d4c20ba1a9aaffd536d48b6ae1f02967 to your computer and use it in GitHub Desktop.
Audio to wav
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
filelist=$(find . -name '*.mp3' -o -name '*.mp4' -o -name '*.m4a') | |
OLDIFS="$IFS" | |
IFS=$"\n" | |
for filename in *.mp3 *.mp4 *.m4a | |
do | |
if [$filename == '.DS_Store' || $filename == ffmpeg_foo_to_wav.sh] | |
then | |
continue | |
fi | |
# ffmpeg -i $filename -acodec libmp3lame -ab 128k mp3/"${filename%.*}".mp3 | |
ffmpeg -i $filename -acodec pcm_s16le -ar 44100 -ac 1 wav/"${filename%.*}".wav | |
done | |
IFS=$OLDIFS |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment