How to convert flac files to mp3 on Mac
I have found converting flac to mp3 on Mac to be a recurring challenge. It occurred to me today that ffmpeg could probably handle this. It can do – as it turns out – very nicely.
Doing a large group of files seemed like a bit of a pain though, and being a Ruby developer my first thought was to write a Ruby command line app that could iterate through a group of files, convert them, and then optionally delete the flac files.
This was my solution: https://github.com/gordonbisnor/flac-converter/
It requires that Ruby and ffmpeg be installed. Usage can be as simple as running flac-converter if the script is placed within your directory of flac files. It does accept arguments though, to account for specifying:
- source directory
- target directory
- deleting flac files
- bit rate
- audio channels
- sample rate
- codec
It is open source under the MIT license. Contributions welcomed.
I am available for Ruby consulting work – get in touch to learn more.