Skip to content

Instantly share code, notes, and snippets.

@philtgun
Last active September 9, 2021 12:34
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 philtgun/304d70727d9bda5a0aee7a9e92ddbe69 to your computer and use it in GitHub Desktop.
Save philtgun/304d70727d9bda5a0aee7a9e92ddbe69 to your computer and use it in GitHub Desktop.
Bulk convert m4a files to mp3
#!/usr/bin/env bash
# recursive find
find . -name "*.m4a" -exec bash -c 'ffmpeg -i "{}" -codec:a libmp3lame -q:a 0 "../audio-mp3/${0/.m4a}.mp3"' {} \;
# one directory
for i in *.wma; do ffmpeg -i "$i" -codec:a libmp3lame -q:a 0 "${i/.m4a}.mp3"; done
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment