Services->WAVto320MP3 -script (Automator/Bash)

Esa(Lackluster)Ruoho
1 min readSep 4, 2023

--

Was asked to create a simple Service that uses LAME to encode WAVs (or AIFFs, too, I guess) into 320 MP3s, using Automator.

Here’s the solution for those of you that don’t feel like going through the rigmarole that I just did — of trying a few methods and then finding 3 methods online that no longer work and then finding the fourth method that did work.

Objective: A Service, available in Finder, that takes your selected files and encodes them as MP3s at V0 320kbps, and places them in the folder.

  • Start up Automator
  • Select New Service
  • “Service receives selected” “Audio files” in “Finder.app”
  • Add a “Run Shell Script”
  • Switch Pass input to “as arguments”
  • input all this:

for f in “$@”
do
/usr/local/bin/lame -q 0 -b 320 “$f”
done

  • Add Display Notification and write according to your needs, for instance, something like:
  • Title: “WAV to 320 MP3″
  • Message: “Conversion complete.”
  • Click Save and choose your easy-to-remember filename such as 320mp3
  • Go into Finder, select a few WAVs and right-click (ctrl-click) on them, select Services->320mp3
  • Wait
  • Celebrate

--

--

Esa(Lackluster)Ruoho
Esa(Lackluster)Ruoho

Written by Esa(Lackluster)Ruoho

Electronic music composer, free-energy archivist/librarian. Some form of thinker.

No responses yet