Last active
August 2, 2019 07:46
-
-
Save raduchiriac/b88045ca006d4f6dcf2a1147ac6c8bb6 to your computer and use it in GitHub Desktop.
Basic workflow for converting FLAC and WAV files to MP3 straight from the context menu
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Make sure you have ffmpeg installed (`brew install ffmpeg`) | |
#!/bin/bash | |
for f in "$@"; | |
do | |
if [[ $f == *.flac ]]; then | |
/usr/local/bin/ffmpeg -i "$f" -vn -ab 320k -map_metadata 0 -id3v2_version 3 "${f%.flac}.mp3" | |
fi | |
if [[ $f == *.wav ]]; then | |
/usr/local/bin/lame -q 0 -b 320 "$f" | |
fi | |
if [[ $f == *.aiff ]]; then | |
/usr/local/bin/lame -q 0 -b 320 "$f" | |
fi | |
done |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment