Skip to content

Instantly share code, notes, and snippets.

@sebastian-meier
Created October 22, 2023 08:33
Show Gist options
  • Save sebastian-meier/33ebb607573391aaf0b92c6736b0b8f7 to your computer and use it in GitHub Desktop.
Save sebastian-meier/33ebb607573391aaf0b92c6736b0b8f7 to your computer and use it in GitHub Desktop.
ffmpeg audio conversion mp3<>wav

for f in ./**/*.wav; do ffmpeg -y -i "$f" -c:a libmp3lame -ac 1 -q:a 2 -b:a 96k "${f/%wav/mp3}"; done

for f in ./**/*.mp3; do ffmpeg -y -i "$f" -acodec pcm_u8 -ar 22050 "${f/%.mp3/-1.WAV}"; done

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment