CLIP JAM

  1. copy music from itunes to folder
  2. cd /Volumes/CLIP JAM/Music
  3. install ffmpeg via homebrew
  4. run applescript from /Volumes/CLIP JAM/Music

credit to https://gist.github.com/christofluethi/646ae60d797a46a706a5

AppleScript…

on run {input, parameters}
	tell application "Finder"
		set fileAlias to input as alias
		set fileName to name of fileAlias
		set fileExtension to name extension of fileAlias
		set AppleScript's text item delimiters to "."
		set title to text 1 thru text item -2 of fileName
		set theInputFilePath to POSIX path of fileAlias
		set theOutputFilePath to text item 1 of theInputFilePath
		set convert to do shell script "/usr/local/bin/ffmpeg '" & theOutputFilePath & ".mp3" & "' -i '" & theInputFilePath & "' -codec:a libmp3lame -qscale:a 1"
		set theOutput to theOutputFilePath & ".mp3"
	end tell
        return theOutput
end run