These scripts are helpful for tagging and tanscoding music. My most recently purchased Miho Wada album was a digital download of .wav files, so these scripts allowed me to:
These automator workflows are also available on GitHub.
First, install SoX command line tools via brew:
brew install sox
Then set up an Automator Service that receives "audio files" in "Finder.app". Use the shell "/bin/bash" and pass input "as arguments". Use the following code:
for f in "$@" do /usr/local/bin/sox "$f" "${f%.*}.flac" done
First, install FFmpeg command line tools via brew:
brew install ffmpeg
Then set up an Automator Service that receives "audio files" in "Finder.app". Use the shell "/bin/bash" and pass input "as arguments". Use the following code:
for f in "$@" do /usr/local/bin/ffmpeg -i "$f" \ -vn -ar 44100 -ac 2 -ab 192k -f mp3 "${f%.*}.mp3" done
First, install FFmpeg command line tools via brew:
brew install ffmpeg
Then set up an Automator Service that receives "audio files" in "Finder.app". Use the shell "/bin/bash" and pass input "as arguments". Use the following code:
for f in "$@" do dir=`dirname "$f"` /usr/local/bin/ffmpeg -i "$f" -i "$dir/cover.jpg" \ -map 0:0 -map 1:0 -c copy -id3v2_version 3 \ -metadata:s:v title="Album cover" \ -metadata:s:v comment="Cover (front)" "${f%.*}.tmp.mp3" mv "${f%.*}.tmp.mp3" "$f" done