This is an iTerm2 snippet that uses ffmpeg to convert all AIFF files in a given folder to their corresponding MP3s
- ffmpeg
C-Style Backslash Escaping
OIFS="$IFS"
IFS=$'\n'
for file in $(find $PWD -type f -name "*.aiff"); do /<fully-qualified-base-path-for-ffmpeg-binary>/ffmpeg -i "${file}" -f mp3 -acodec libmp3lame -ab 320k -ar 44100 -y "${file%.aiff}.mp3"; done
IFS="$OIFS"
💡 Replace
<fully-qualified-base-path-for-ffmpeg-binary>
by the actual path where the ffmpeg binary is located.
In iTerm2:
cd
into the folder containing the AIFF files- Run the snippet
- Wait for the conversions to finish
- Done
The resulting MP3 files will be put together with their original AIFF corresponding.